// JavaScript Document
function mostrar(capa){
  var obj = document.getElementById(capa)
  if(obj.style.display == "block") 
  {    obj.style.display = "none";}
  else 
  { obj.style.display = "block";}
}

function cambia(capa1,capa2){
  var obj1 = document.getElementById(capa1)
  var obj2 = document.getElementById(capa2)
  obj1.style.display = "none";
  obj2.style.display = "inline";
}

function cuentaLongitud(texto,maxlong,form)
{
 var tecla, in_value, out_value;

 if (texto.value.length > maxlong)
 {
	in_value = texto.value;
	out_value = in_value.substring(0,maxlong);
	texto.value = out_value;
	return false;
 }
 form.cuenta.value=(maxlong-texto.value.length);	
 return true;
}
//Abre una ventana nueva.
function abreventana(detalle) {
	var ancho;
	var alto;
	ancho=460;
	alto=330;
	var propiedades="scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,width="+ancho+",height="+alto+",top=0,left=0";	
	window.open(detalle,"eladelantado",propiedades);
}
//Abre una ventana de perfil de usuario.
function abreventanaPerfil(detalle) {
	var ancho;
	var alto;
	ancho=460;
	alto=600;
	var propiedades="scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,width="+ancho+",height="+alto+",top=0,left=0";	
	window.open(detalle,"eladelantado",propiedades);
}
//----------------------------------------------------

