window.onload = function() { 
try {Nifty("div#info1,div#info2,div#contenido","same-height none")} catch(e){}
try {Nifty("div.redondeado")} catch(e){}
try {Nifty("div#ruta","top")} catch(e){}
try {Nifty("div#contenido","br")} catch(e){}
try {Nifty("div#zonaContenido","tr")} catch(e){}
try {Nifty("div#zonaPie","bottom")} catch(e){}
try {Nifty("div#pie","bottom")} catch(e){}
try {Nifty("h2.redondeado","top");Nifty("h3.redondeado","top");Nifty("li.redondeado","top")} catch(e){}
try {$("googleMap").focus();$("zonaCabecera").focus();} catch(e){}
try {var Tips1 = new Tips($$('.Tips1'));} catch(e){}
loadAJAX();
} 
window.onunload = function() {try{GUnload()} catch(e){}}
function displayForm(formulario){$("divADM").innerHTML=$(formulario).innerHTML;muestraADM() }
function muestraADM(){var ancho="700";var alto="480";var izquierda=((screen.width/2)-(ancho/2));var arriba=document.body.scrollTop+20;$("divADM").style.top=arriba+"px";$("divADM").style.left=izquierda+"px";$("divADM").style.width=ancho+"px";$("divADM").style.height=alto+"px";$("divADM").style.display="inline";}
function ocultaADM(){$("divADM").style.display="none";}
function leidoPrivacidad(este){$("submit").disabled=true;if (este.checked) $("submit").disabled=false;}
function getAjax(url,param,contenedor) {
$(contenedor).innerHTML="<img src='images/cargando.gif' />"
var miAjax = new Ajax(url,
{
	method:'GET',
	data:param.replace(/&amp;/g, "&"),
	update:$(contenedor)
});
miAjax.request();
}

// -----------------------------------------------------------------------------------------------------
// PARA LICITACIONES
function loadAJAX() {
$$('DIV.AJAX').each(function(e) {
	ejecutaAJAX(e);
});
}
// -----------------------------------------------------------------------------------------------------
// Ejecutar AJAX - al cargar
// -----------------------------------------------------------------------------------------------------
function ejecutaAJAX(e) {
var href = "/eayto/apl/" + e.title + "&aj=ajax";
var target = e.id;
var myAjax1 = new Ajax(href, {
	method: 'POST', 
	update: target, 
	evalScripts: true,
	autoCancel: true,
	onFailure: function () { alert("Se ha producido un error: " + href); }
}).request();
}
// -----------------------------------------------------------------------------------------------------
