//Abre una ventana sin controles segun las coordenadas indicadas
function NewWindow(URL, L, T, W, H)
{
  var NewWindow;
//  var L = 0;
//  var T = 20;
  //var L = screen.availWidth/2-CW-W/2;
  //var T = screen.availHeight/2-CH-H/2;
  //alert("CW="+CW+"\nCH="+CH+"\nW="+W+"\nH="+H+"\nL="+L+"\nT="+T+"\ncentro="+screen.availHeight/2);
  var Properties = "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=auto, resizable=no, copyhistory=no, fullscreen=no, left="+L+", top="+T+", width="+W+", height="+H+", alwaysRaised=yes"; 
  NewWindow = window.open(URL,"_blank", Properties);
}

function NewWindowQT(URL, L, T, W, H)
{
  var NewWindow;
var left= (screen.width - L)/2;
var top= (screen.height - T)/2;
var Properties = "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=auto, resizable=no, copyhistory=no, fullscreen=no, left="+left+", top="+top+", width="+W+", height="+H+", alwaysRaised=yes"; 
  NewWindow = window.open(URL,"_blank", Properties);
}



//Abre una ventana sin controles segun las coordenadas indicadas
function NewWindowClear(URL, L, T, W, H)
{
  var NewWindow;
//  var L = 0;
//  var T = 20;
  //var L = screen.availWidth/2-CW-W/2;
  //var T = screen.availHeight/2-CH-H/2;
  //alert("CW="+CW+"\nCH="+CH+"\nW="+W+"\nH="+H+"\nL="+L+"\nT="+T+"\ncentro="+screen.availHeight/2);
  var Properties = "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, fullscreen=no, left="+L+", top="+T+", width="+W+", height="+H+", alwaysRaised=yes"; 
  NewWindow = window.open(URL,"_blank", Properties);
}

function on(obj, bg, text)
{

   if (!obj.contains(event.fromElement)) {
		obj.style.background = bg;
		obj.style.color = text;
		obj.style.cursor = "hand";
	}
}
function off(obj, bg, text)
{
 if (!obj.contains(event.toElement)) {   
		obj.style.background = bg;
		obj.style.color = text;
		obj.style.cursor = "default";
	}
}

estado = 1;

function mostrar(obj)
{
obj.style.display = "block"
estado = 1;
}
function ocultar(obj)
{
obj.style.display = "none"
estado = 0;
}

function cambiar(obj)
{
if(estado==1)
	ocultar(obj);
else
	mostrar(obj);
}

estado_layer = 1;

function ver(obj)
{
obj.visibility = "show";
estado_layer = 1;
}

function quitar(obj)
{
obj.visibility = "hide";
estado_layer = 0;
}
function alternar(obj)
{
if(estado_layer==1)
	quitar(obj);
else
	ver(obj);
}

function inicializar(obj1, obj2, obj3, obj4, obj5, obj6, obj7, obj8)
{
ocultar(obj1);
ocultar(obj2);
ocultar(obj3);
ocultar(obj4);
ocultar(obj5);
ocultar(obj6);
ocultar(obj7);
ocultar(obj8);
quitar(obj9);
}

function cambiar_visibilidad(obj)
{
  if(obj.style.display == "none")
    obj.style.display = "block"
  else
    obj.style.display = "none"
}
