/** © menosdiez.com **/function Abre(page) {OpenWin = this.open(page, "Ventana", "toolbar=no,menubar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width=400px,height=300px");}function Activacapa(nombrecapa) {	if (document.getElementById(nombrecapa).style.display == "none") {      document.getElementById(nombrecapa).style.display = "";      if (nombrecapa=='buscador') {      	document.getElementById(nombrecapa+'txt').innerHTML="Ocultar";      	}     } else {       document.getElementById(nombrecapa).style.display = "none";       if (nombrecapa=='buscador') {       document.getElementById(nombrecapa+'txt').innerHTML="Mostrar";       }       }}function Enviar() {	setTimeout(	document.formulario.submit(),2000);}// MENU DESPLEGABLEstartList = function() {	if (document.all&&document.getElementById) {		navRoot = document.getElementById("menuprincipal");		for (i=0; i<navRoot.childNodes.length; i++) {			node = navRoot.childNodes[i];			if (node.nodeName=="LI") {				node.onmouseover=function() {					this.className+=" over";				}				node.onmouseout=function() {					this.className=this.className.replace(" over", "");				}			}		}	}}window.onload=startList;function vaciacampo(control){	if(!control.texto_predeterminado){		control.texto_predeterminado=control.value;	}		if(control.value==control.texto_predeterminado){		control.value='';	}}/* * Restaurar el contenido de un control de formulario, pero sólo si no se ha modificado * Nota: el control debe tener parámetro value */function campooriginal(control){	if(control.texto_predeterminado){	}		if(control.texto_predeterminado && control.value==''){		control.value=control.texto_predeterminado;	}}function muestracapaninos(valor){	if (valor=='0') {	document.getElementById("capan1").style.display = "none";	document.getElementById("capan2").style.display = "none";	}	if (valor=='1') {	document.getElementById("capan1").style.display = "";	document.getElementById("capan2").style.display = "none";	}	if (valor=='2') {	document.getElementById("capan1").style.display = "";	document.getElementById("capan2").style.display = "";	}}function enviarFormularioXML(url, formid){var peticion = false;var  testPasado = false;  try {   peticion = new XMLHttpRequest();   } catch (trymicrosoft) {   try {   peticion = new ActiveXObject("Msxml2.XMLHTTP");  } catch (othermicrosoft) { try {  peticion = new ActiveXObject("Microsoft.XMLHTTP");  } catch (failed) { peticion = false;  }     }   }   if (!peticion)   alert("ERROR AL INICIALIZAR!");             var Formulario = document.getElementById(formid);             var longitudFormulario = Formulario.elements.length;             var cadenaFormulario = ""             var sepCampos             sepCampos = ""             for (var i=0; i <= Formulario.elements.length-1;i++) {             cadenaFormulario += sepCampos+Formulario.elements[i].name+'='+encodeURI(Formulario.elements[i].value);             sepCampos="&";   }     peticion.open("POST", url,true);     peticion.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=ISO-8859-1');     peticion.onreadystatechange = function () {     if (peticion.readyState == 4) {        document.getElementById('documentos').innerHTML = "Los datos han sido enviados correctamente";   }   }   peticion.send(cadenaFormulario);}