<!-- funciones ABRIR VENTANA -->var winName="titulo" function Abrir_Ventana(theURL,w,h) { 	var windowprops ="top=0,left=0,toolbar=no,location=no,status=no, menubar=no,scrollbars=yes, resizable=no,width=" + w + ",height=" + h;	window.open(theURL,winName,windowprops); } <!-- funciones de gestión MENU -->function ocultamenu(elemento){  var menu = document.getElementById(elemento);  menu.style.display = "none";}function despliega(elemento){  var menu = document.getElementById(elemento);    if(menu.style.display == "none"){      menu.style.display = "block";    }    else{      menu.style.display = "none";    }}/* 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;")}/* ajusta la altura de la capa principal al contenido ---------------------------------------------------------------------------*/function hCapa(capa) {	var altura=(document.getElementById(capa).offsetHeight>300)?document.getElementById(capa).offsetHeight:300; 	parent.parent.document.getElementById('ifr_de').style.height=(altura+150)+'px';	parent.document.getElementById('ifr_content').style.height=(altura+30)+'px';}/* ajusta la altura de la capa principal al contenido ---------------------------------------------------------------------------*/function hifr(ifr) {	var altura=(ifr.offsetHeight>450)?ifr.offsetHeight:450;	//alert(parent.document.getElementById('ifr_admin').style.height+'  '+altura);	parent.document.getElementById('ifr_admin').style.height=(altura+50)+'px';}function checkForm(f){		if (f.titulo.value=="") { alert("La noticia debe tener al menos un título (campo obligatorio)"); return false; }		re=/^[0-9][0-9]\-[0-9][0-9]\-[0-9][0-9][0-9][0-9]$/;		if(!re.exec(f.fecha.value)) { alert("La fecha no tiene un formato correcto ('dd-mm-aaaa') ");	return false; } 		else{ return true;	}		}function checkFormRuta(f){		if (f.origen.value=="" || f.destino.value=="" ) { alert("La rura debe tener un origen y un destino (campos obligatorios)"); return false; }		re=/^[0-9][0-9]\-[0-9][0-9]\-[0-9][0-9][0-9][0-9]$/;		if(!re.exec(f.fecha.value)) { alert("La fecha no tiene un formato correcto ('dd-mm-aaaa') ");	return false; } 		else{ return true;	}		}function validar(){	if (document.correo.nombre.value=='' || document.correo.email.value=='' || document.correo.mensaje.value=='')		{		alert ("Por favor, rellene los campos marcados con *");		} else cargar_mensaje('envia.php')}// aceptar solo numeros en un campo de texto// **********************************************************************************function acceptNum(evt){		var nav4 = window.Event ? true : false;	// backspace = 8, Enter = 13, '0' = 48, '9' = 57		var key = nav4 ? evt.which : evt.keyCode;		//alert(key);	return (key <= 13 || (key >= 48 && key <= 57) || (key >= 96 && key <= 105) )?true:false;}/*function solonumeros(cadena, obj, e){		//if (window.event.keyCode < 46 || window.event.keyCode == 47 || window.event.keyCode > 57) window.event.returnValue = false;		alert(cadena+' '+obj+' '+e);}*/
