

function popXport(tipo, id){
	var windowprops ="top=0,left=0,toolbar=no,location=no,status=no, menubar=no,scrollbars=yes, resizable=no, width=800, height=700";
	switch (tipo) {
		case 'pdf' : var theURL='export/pdf.php?id='+id;			break;				
		case 'html' : var theURL='export/html.php?id='+id;		break;
		default : break;
	}	
	window.open(theURL,'',windowprops); 	
}


function currentLink(nLnk){
	for(i=2; document.getElementById('lnk'+i); i++) document.getElementById('lnk'+i).className='menu';
	if (nLnk!='lnk1') document.getElementById(nLnk).className='item';
	currentLink2('p'+nLnk);
	document.getElementById('mw').options[parseInt(nLnk.substr(3))].selected='true';
}	



function currentLink2(nLnk){
	for(i=2; document.getElementById('plnk'+i); i++) document.getElementById('plnk'+i).className='menu';
	if (nLnk!='plnk1') document.getElementById(nLnk).className='item';
}	


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(){
	if (document.correo.nombre.value=='' || document.correo.email.value=='' || document.correo.mensaje.value=='')	{
		alert('Por favor, rellene los campos obligatorios');
		return false;
	}
	else return true; 
}


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 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;")
}








