var nombre="&nbsp;",autor="&nbsp;",ano="&nbsp;";
		
/* JAVASCRIPTS EXTERNOS PARA CEA */

/* Imagen aleatoria de cabecera */


azar = Math.round(2-1) * Math.random() + 1;
num = Math.round(azar);

/* Fecha */
var fecha=new Date()
var nombredia=new Array("Domingo","Lunes","Martes","Mi&eacute;rcoles","Jueves","Viernes","S&aacute;bado")
var nombremes=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")

/* Menu desplegable */
function menuDOWN (id) {

if (document.getElementById) {
 var el = eval("document.getElementById('" + id + "')"); 

 if(el) {
   if (el.style.display == '') {el.style.display = 'none'}       
   if (el.style.display == 'block') {el.style.display = 'none'} else {el.style.display = 'block'}
 }
}
}
 
function hideAll (i) {
for (var j=i;j<i++;j++) { 
  if (i!=j) {
	if (document.getElementById) {var el = eval("document.getElementById('" + j + "')"); if(el){el.style.display = "none"}}
    else if (document.all) {var el = eval("document.all." + j); if (el) {el.style.display = "none"}}
  }     
}
}
 
function inicio (id) {
if (id!=0)
if (document.getElementById(id)!=null) {    
  if (document.getElementById(id).style.display=="") {document.getElementById(id).style.display="none"}
  if (document.getElementById(id).style.display=="none") {menuDOWN (id)}
  }
}

	//Buscar sólo en caso de no estar vacío
	function buscar()
	{
		f=document.forms[0];
		
		if ((f.texto.value!=null)&&(f.texto.value!=''))
		{			
			f.paginaActual.value=1;						
			
			//alert("Entra al submit");
			f.submit();
		}		
	}
	
	function buscar_bool()
	{
		f=document.forms[0];
			
		
		if ((f.texto.value!=null)&&(f.texto.value!=''))
		{	
			f.paginaActual.value=1;						
						
			return true;
		}	
		return false;	
	}
function recoge_datos(linea)
{
	l_part=linea.split(";");
	if (l_part.length>0)
	{
	  nombre=l_part[0];
	  if (l_part.length>1)
		{
			autor=l_part[1];
			if (l_part.length>2)
			{
				ano=l_part[2];
			}
		}
	}				
}


