 MENU_1 = false;
 MENU_2 = false;
 MENU_3 = false;
 
 function oculta_contenido_menus()
 {
  if (MENU_1 == false)
   document.getElementById("contenido_m1").style.visibility='hidden';
  if (MENU_2 == false) 
   document.getElementById("contenido_m2").style.visibility='hidden';
  if (MENU_3 == false)
   document.getElementById("contenido_m3").style.visibility='hidden';  
 }

 function redimensiona(OBJETO,TOPE,ALTO)
 {
  document.getElementById(OBJETO).style.top = TOPE + 'px';
  document.getElementById(OBJETO).style.height = ALTO + 'px'; 
 }
 
 function Amplia(OBJETO,CICLOS,OBJ_CAPA)
 {
  var CONTADOR;
  var TOPE = 334;
  var ALTURA = 27;
  var TIEMPO = 30;
  
  cierra_menus();
  document.getElementById(OBJETO).style.border = "1px solid #000000";
  document.getElementById(OBJETO).style.background = "#ffffff";    
  for(CONTADOR=1; CONTADOR<=CICLOS; CONTADOR=CONTADOR+1)
  {
   TOPE = eval(TOPE - 5);
   ALTURA = eval(ALTURA + 10);
   TIEMPO = eval(TIEMPO + 15);
   setTimeout("redimensiona('" + OBJETO + "'," + TOPE + "," + ALTURA + ")",TIEMPO);
  } 
setTimeout("document.getElementById('" + OBJ_CAPA + "').style.visibility='visible'",400); 
 // document.getElementById(OBJ_CAPA).style.visibility='visible';
 }
 
 function cierra(OBJETO,CICLOS,OBJ_CAPA)
 {  
  var CONTADOR;
  var TOPE = 334 - eval(CICLOS * 5)
  var ALTURA = 27 + eval(CICLOS * 10);
  var TIEMPO = 30;
  
  for(CONTADOR=1; CONTADOR<=CICLOS; CONTADOR=CONTADOR+1)
  {
   TOPE = eval(TOPE + 5);
   ALTURA = eval(ALTURA - 10);
   TIEMPO = eval(TIEMPO + 15);
   setTimeout("redimensiona('" + OBJETO + "'," + TOPE + "," + ALTURA + ")",TIEMPO);
  }  
  document.getElementById(OBJ_CAPA).style.visibility='hidden';  
 } 
 
 function cierra_menus()
 {  
  oculta_contenido_menus();
  if (MENU_1 == true)
  {
   cierra('menu_1',22,'contenido_m1');
   MENU_1 = false;
  } 
  if (MENU_2 == true) 
  {
   cierra('menu_2',22,'contenido_m2');
   MENU_2 = false;
  }
  if (MENU_3 == true)
  {
   cierra('menu_3',22,'contenido_m3');
   MENU_3 = false;
  }
 }
 
 function navega(BLOG)
 {
  if (BLOG != 'NULO')
   window.open(BLOG);
 }
 
 function verifica_formato_usuario()
 {
  window.document.getElementById("FALTANTE").style.visibility='hidden';
  
  if (window.document.setupform.user_name.value == "")
  {
   window.document.getElementById("FALTANTE").style.top='791px';
   marca_faltante("user_name");
   return false;   
  }
  
  if (window.document.setupform.clave.value == "")
  {
   window.document.getElementById("FALTANTE").style.top='821px';
   marca_faltante("clave");
   return false;   
  }
  
  if (window.document.setupform.user_email.value == "")
  {
   window.document.getElementById("FALTANTE").style.top='851px';
   marca_faltante("user_email");
   return false;   
  }
  
  if (window.document.setupform.ACEPTO.checked == false )
  {
   window.document.getElementById("FALTANTE").style.top='941px';
   marca_faltante("ACEPTO");
   return false;   
  }
  return true;
  
 }
 
 function verifica_formato_blog()
 {
  window.document.getElementById("FALTANTE").style.visibility='hidden';
  
  if (window.document.setupform.blog_id.value == "")
  {
   window.document.getElementById("FALTANTE").style.top='656px';
   marca_faltante("blog_id");
   return false;   
  }
  
  if (window.document.setupform.blog_title.value == "")
  {
   window.document.getElementById("FALTANTE").style.top='686px';
   marca_faltante("blog_title");
   return false;   
  }  
  
  return true;  
 }
 
 function verifica_formato_otro_blog()
 {
  window.document.getElementById("FALTANTE").style.visibility='hidden';
  
  if (window.document.setupform.blog_id.value == "")
  {
   window.document.getElementById("FALTANTE").style.top='581px';
   marca_faltante("blog_id");
   return false;   
  }
  
  if (window.document.setupform.blog_title.value == "")
  {
   window.document.getElementById("FALTANTE").style.top='611px';
   marca_faltante("blog_title");
   return false;   
  }  
  
  return true;  
 }
 
 function marca_faltante(CAMPO)
 {
  window.document.getElementById("FALTANTE").style.visibility='visible';
  window.location.href="#ANCLA_" + CAMPO;
  obj=window.document.getElementById(CAMPO);
  obj.focus();
 }
 
 function oculta_notas_usuario()
 {
  document.getElementById("NOTA_USER_NAME").style.visibility='hidden';
  document.getElementById("NOTA_CLAVE").style.visibility='hidden';
  document.getElementById("NOTA_USER_EMAIL").style.visibility='hidden';
 }
 
 function oculta_notas_blog()
 {
  document.getElementById("NOTA_BLOG_ID").style.visibility='hidden';
  document.getElementById("NOTA_BLOG_TITLE").style.visibility='hidden';
 }