
/* hack del puto IE para evitar el parpadeo en los rollovers */
if(document.uniqueID && !window.XMLHttpRequest ){
	document.execCommand("BackgroundImageCache",false,true)
}

/* 
	esta función es un hack para I5+/IE6
	"añade" la capacidad de hover a los elementos LI, claseándolos
*/

startList = function()
{
	if (document.all&&document.getElementById) 
	{
		// para el menú principal
		navRoot = document.getElementById("nav1");
		for (i=0; i<navRoot.childNodes.length; i++) 
		{
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") 
			{
				node.onmouseover=function() 
				{
					this.className+=" over";
				}
				
				node.onmouseout=function() 
				{
					this.className=this.className.substring(0,this.className.indexOf(" "));
				}
			}
  		}
 	}
	
	/* hack para IE6, evitando que quite una imagen del menu si tienes el ratón sobre el menú, al cargar la página */
	document.getElementById("nav1").style.display = "block";
	
	maxFoto = new Window('winMaxFoto', {
		width:300, height:200, 
		resizable: false, minimizable: false, maximizable: false
	})

	/*
		,showEffectOptions: {duration:0.5}
	*/	
	
}
window.onload=startList;

function Pagina(npagg) {
	form = document.forms["miForm1"];
	form.npag.value = npagg;
	form.submit();
}

function Foto(idd,ancho,alto) {
	maxFoto.setZIndex(9);
	maxFoto.setSize(ancho,alto);
	maxFoto.setURL('foto.asp?id='+escape(idd));
	maxFoto.showCenter();
}

function ChangeDate() {
	form = document.forms["miForm"];
	if (form.search_date.value = 'dd/mm/aaaa') {
		form.search_date.value = '';
	}
	document.getElementById("search_date").className = 'campoDate';
}

function ChangeToDate() {
	form = document.forms["miForm"];
	if (form.search_todate.value = 'dd/mm/aaaa') {
		form.search_todate.value = '';
	}
	document.getElementById("search_todate").className = 'campoDate';
}

function ChangeKeyword() {
	form = document.forms["miForm"];
	if (form.search_keyword.value = 'Palabras de búsqueda') {
		form.search_keyword.value = '';
	}
	document.getElementById("search_keyword").className = 'campoKeyword';
}

