function pordireccion(){
//activa el buscador de CP por direccion ya que la pagina carga por defecto el buscador por CP
document.getElementById('pestanero').style.backgroundPosition ='0 -32px';
document.getElementById('direccion').style.display='none';
document.getElementById('cp').style.display='block';
}

function fotohome(){
//esto deber?a llamar al addserver para obtener la imagen de fondo y el enlace
//SOLO PARA MAQUETA: RANDOM PARA ROTAR FOTOS Y SIMULAR ADDSERVER
var numero= Math.floor(Math.random()*5);
var foto='"url(/fotos/foto_' + numero + '.jpg)"';
document.getElementById('fotohome').style.background = eval(foto); 
document.write('<a id="clickhome" href="/jsp/prelista.jsp?lista=pbol&no=ayuntamiento"></a>');
}



function mostrar(nombreCapa){ 
document.getElementById(nombreCapa).style.visibility="visible"; 
} 

function ocultar(nombreCapa){ 
document.getElementById(nombreCapa).style.visibility="hidden";
document.getElementById(nombreCapa).style.position="absolute"; 
} 

function capafuncionalidad (lacapa){
document.write('<iframe name="' + lacapa + '" id="' + lacapa + '" frameborder="0" vspace="0" hspace="0" marginwidth="0" marginheight="0" width="508" height="0" style="margin-left:12px" scrolling="no"></iframe>');
}
function off(idd) {
document.getElementById(idd).style.height='0px';
document.getElementById(idd).style.marginTop='0px';
document.getElementById(idd).src ='';
}

function adjustIFrameSize (iframeWindow) {

	if (iframeWindow.document.height) {
		// NS
		//var iframeElement = parent.document.getElementById (iframeWindow.name);
		var iframeElement = document.getElementById (iframeWindow.name);
		iframeElement.style.height = iframeWindow.document.height + 'px';
	}
	else if (document.all) {
		// IE
		//var iframeElement = parent.document.all[iframeWindow.name];
		var iframeElement = document.all[iframeWindow.name];
		iframeElement.style.height = iframeWindow.document.body.scrollHeight + 'px';
	}
}


function msn(oMsn,Email) {
	 //Verificamos que est� logado
     if(oMsn.MyStatus == 1){
         alert("Debe iniciar su sesi�n en Messenger");
         return;
     }
	 oMsn.AddContact(0, Email); 
	 return;	
	}
