
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 clearMenu(){ for(i=1; document.getElementById('lnk'+i); i++) document.getElementById('lnk'+i).className='item';	}
function currentLink(nLnk){  clearMenu(); nLnk.className='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 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;
}



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 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';

}

function hifr(kp, limite, ifr) {
	var altura=(kp.offsetHeight>limite)?kp.offsetHeight:limite;
	ifr.style.height=(altura+20)+'px';
}


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 peich(url){ window.open (url,"", "toolbar=no, location=no, directories=no, status=0, menubar=no, scrollbars=no, resizable=no,width=730, height=465 ");}










