var isNS4=(document.layers) ? 1 : 0;
var isIE4=(document.all) ? 1 : 0;
var isMoz=((document.getElementById) && !(isIE4)) ? 1 : 0;
function getWindowWidth()
{
	if (isNS4)
    	return(window.innerWidth);
	if (isIE4)
    	return(document.body.clientWidth);
	return(-1);
}
function getWindowHeight()
{
	if (isNS4)
    	return(window.innerHeight);
	if (isIE4)
    	return(document.body.clientHeight);
	return(-1);
}
window.onresize = resize;
function resize ()
{
	var w = getWindowWidth();
	var h = getWindowHeight();
	if (document.all["tablaMain"])
	{
		document.all["tablaMain"].width = w;
		document.all["tablaMain"].height = h;
	}
}
resize ();
function agregar_favoritos(url,titulo){
   if ((navigator.appName=="Microsoft Internet Explorer") && 
         (parseInt(navigator.appVersion)>=4)) {
      window.external.AddFavorite(url,titulo);
   } else { 
      if(navigator.appName == "Netscape") 
         alert("Presione Crtl+D para agregar este sitio en sus Bookmarks"); 
		 //window.external.AddFavorite(url,titulo);
   }
} 
function agregar_inicio(url)
{
//incluye esta línea justamente al comienzo del body
//<IE:HOMEPAGE ID="obj_pagina_inicio" />
obj_pagina_inicio.style.behavior='url(#default#homepage)';
obj_pagina_inicio.setHomePage(url)
}
function cargar_ventana(url, anchura, altura)
{
	window.open(url, 'descarga', 'width=anchura, height=altura, scrollbars=no, resizable=no, menubar=no');
}