

function abrir(direccion, pantallacompleta, herramientas, direcciones, estado, barramenu, barrascroll, cambiatamano, ancho, alto, izquierda, arriba, sustituir)
{
	var opciones =  "fullscreen=" + pantallacompleta +
			",toolbar=" + herramientas +
			",location=" + direcciones +
			",status=" + estado +
			",menubar=" + barramenu +
			",scrollbars=" + barrascroll +
			",resizable=" + cambiatamano +
			",width=" + ancho +
			",height=" + alto +
			",left=" + izquierda +
			",top=" + arriba;

	var a = ""+Math.random()+"";
	var nombre="ventanaHelioStat";

	var ventana = window.open(direccion,nombre,opciones,sustituir);

	var agt=navigator.userAgent.toLowerCase();
        if (agt.indexOf("msie 5.0")==-1){
                ventana.focus();
        }


}   

function MM_reloadPage(init) 
{  //reloads the window if Nav4 resized
	if (init==true) with (navigator) 
	{
		if ((appName=="Netscape")&&(parseInt(appVersion)==4)) 
		{
			document.MM_pgW=innerWidth;
			document.MM_pgH=innerHeight;
			onresize=MM_reloadPage; 
		}
	}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}


function checkPass()
{
	if (document.getElementById("Password1").value=="")
	{
		alert ("Contrasena no especificada");
		document.getElementById("Password1").focus();
		return false;
	}
	if (document.getElementById("Password2").value=="")
	{
		alert ("Confirmacion de password no especificada");
		document.getElementById("Password2").focus();
		return false;
	}
	if (document.getElementById("Password1").value!=document.getElementById("Password2").value)
	{
		alert ("Las contraseñas no coinciden");
		document.getElementById("Password1").focus();
		return false;
	}

	return true;	 
}


function show_alarm_table() 
{
	var a = 0;
	if(document.getElementById("alarm_list").className == "collapsed")	 
	{
		document.getElementById("alarm_list").className = "";
		a = 1;	 
			
	}
	if((document.getElementById("alarm_list").className == "") && (a == 0))	 
	{
		document.getElementById("alarm_list").className = "collapsed";	 		    
	}
	
}

function show_coms_table()
{
        var a = 0;
        if(document.getElementById("coms_list").className == "collapsed")
        {
                document.getElementById("coms_list").className = "";
                a = 1;

        }
        if((document.getElementById("coms_list").className == "") && (a == 0))
        {
                document.getElementById("coms_list").className = "collapsed";
        }

}


