// JavaScript Document
window.onload=function(){
	if (zXmlHttp.isSupported()){
		document.getElementById("btnConsulta").onclick=validarFormulario;
		}
	else{
		alert("AJAX is not supported by this browser");
		}
	}

function limpiarFormulario(){
	oForm=document.getElementById("frmConsulta");
	for(x=0;x<oForm.elements.length;x++){
		if (oForm.elements[x].type=="text" || oForm.elements[x].type=="textarea"){
			oForm.elements[x].value="";
			}
		}
	}
	
function saveResult(resultado){
	eval(resultado);
	}

var nuevaVen=0;
function ventanaEmergente(url,ancho,alto){
	if(nuevaVen){
		if(!nuevaVen.closed) nuevaVen.close();
		}
	nuevaVen=window.document.open(url, 'emergente', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width='+ancho+',height='+alto+'');
	}