
function clearMenu(){
		for(i=1; document.getElementById('itm'+i); i++)  document.getElementById('itm'+i).className='menu';	
}


function currentLink(nLnk){
	for(i=1; document.getElementById('lnk'+i); i++) document.getElementById('lnk'+i).className='linkiz';
	nLnk.className='linkiz_current';
}	



function getCookie(name){
  cookie = " "+document.cookie;
  offset = cookie.indexOf(" "+name+"=");

  if (offset == -1) return undefined;

  offset += name.length+2;
  end     = cookie.indexOf(";", offset)

  if (end == -1) end = cookie.length;

  return unescape(cookie.substring(offset, end));
}



function validar(){
	//alert(getCookie("idi"));
	if (document.correo.nombre.value=='' || document.correo.email.value=='' || document.correo.mensaje.value=='')	{
		//alert( (getCookie("idi")==0) ? 'Por favor, rellene los campos obligatorios' : 'Por favor, cubra os campos obrigatorios');
		alert('Por favor, rellene los campos obligatorios');
		return 0;
	}
	else return 1; 
}


function changeImage(name,ImgName){ document.images[name].src = ImgName; }



function getParam(t){
	//alert(t);
	var params='?params=1&';
	for(var i=0; i<t.elements.length; i++){
		alert(t.elements[i].value);
		if (t.elements[i].value!="undefined") params+=t.elements[i].name+'='+t.elements[i].value+'&';
	}
		return params;
}

/* quita borde punteado de los links ---------------------------------------------------------------------------*/
function noplink() {
	lnks=document.getElementsByTagName("a").length;
	for (i=0;i<lnks;i++)
	document.getElementsByTagName("a").item(i).onfocus=new Function(" (this.blur)?this.blur():NULL;")
}


function itemMenu(itm){
	//alert(itm.className);
	for(i=1; document.getElementById('itm'+i); i++) if (document.getElementById('itm'+i).className=='item') document.getElementById('itm'+i).className='menu';
	itm.className='item';

}




/* ajusta la altura de la capa principal al contenido ---------------------------------------------------------------------------*/
function hifr(kp, limite, ifr) {
	var altura=(kp.offsetHeight>limite)?kp.offsetHeight:limite;
	//alert(altura);
	//alert(ifr.style.height);
	ifr.style.height=(altura+20)+'px';
}

function hifr2(ifr) {
	var altura=1200; //(kp.offsetHeight>limite)?kp.offsetHeight:limite;
	//alert(altura);
	//alert(ifr.style.height);
	ifr.style.height=(altura+20)+'px';
}



//function imgPreloader(vct){
function imgPreloader(){
	var vct=new Array('logo_adao.jpg', 'logoceo.jpg', 'logoxunta.jpg', 't_asociacion.jpg', 't_contacto.jpg', 't_galeria.jpg', 't_novedades.jpg', 't_quienes.jpg', 't_servicios.jpg', 't_socios.jpg');
	var vct2=new Array('b_asociacion.jpg', 'b_asociacion_o.jpg', 'b_contacto.jpg', 'b_contacto_o.jpg', 'b_galeria.jpg', 'b_galeria_o.jpg', 'b_servicios.jpg', 'b_servicios_o.jpg', 'b_socios.jpg', 'b_socios_o.jpg');
	var vct3=new Array('cab.jpg', 'fondo_division.jpg');

	for (var i in vct){ var img = new Image(); img.src="img/" + vct[i]; }
	for (var i in vct2){ var img2 = new Image(); img2.src="img/botones/" + vct2[i]; }
	for (var i in vct3){ var img3 = new Image(); img3.src="img/fondo/" + vct3[i]; }

}


function fMiCuenta(){
	parent.document.getElementById('bloque3_3').innerHTML='<p style="margin:0px 0 0 15px; border:0px solid #ccc; width:150px; height:50px; text-align:right; "><a href="admin"><img src="img/update2.jpg" /></a></p>'; 
}



function lm(){
	document.getElementById('lermais').style.display='block';
	document.getElementById('pl').style.display='none';
}












