var Req = false;function PostForm(){	var url="http://adidas.fundaventura.com/r/Adidas?OpenForm";	//var result = runAgentGet(url);	PostAsynch(url, getFormVals('FormularioAdidas'));	//vals = getMultiFormVals('FormularioAdidas')	 //PostFormAsynch(url, vals, "---------------------------267551706326815");}function CheckRutExist(rut){	var url="http://adidas.fundaventura.com/r/r?OpenAgent&" + rut + "&" + new Date();	//var result = runAgentGet(url);	runAsynch(url, CheckRutExistCK);}function CheckRutExistCK(){	if (Req.readyState == 4) {        if (Req.status == 200) {			ret = Req.responseText;			var vars= ret.split("&");			if ( vars[0] == "OK" ){				//write_usr_message("",id+"_msg",0);				return true;			} else {				//nombre = ret.substring(ret.indexOf("&n=")+3,ret.indexOf("$$"));				//UNID = ret.substring(ret.indexOf("&u=")+3,ret.indexOf("$$"));				nombre = vars[1];				UNID = vars[2];				//location="http://adidas.fundaventura.com/r/0/" + UNID				elm=document.getElementById("AySNombre");				elm.firstChild.nodeValue = nombre;				toHide=document.getElementById("formulario");				toShow=document.getElementById("AySignedup");				toHide.style.display="none";				toShow.style.display="block";			}        }    }}function SendRegInfo(){	SendRegInfoRut = getValueObj("Rut");	SendRegInfourl="http://adidas.fundaventura.com/r/S?OpenAgent&" + SendRegInfoRut + "&" + new Date();	toggle2Divs("SReminderMailDone", "SReminderMail");	runAsynch(SendRegInfourl);}function SendRegInfoCallback(){    if (Req.readyState == 4) {        if (Req.status == 200) {		// update the HTML DOM based on whether or not message is valid		        }    }}function toggleLogDivs(divToShow){ document.getElementById("loggondiv").style.display='none'; document.getElementById("loggedindiv").style.display='none'; document.getElementById(divToShow).style.display='block'; }function runAgent(strAgentName) { var objHTTP; var resp; strUrl = strAgentName; if (document.implementation.createDocument) { objHTTP = new XMLHttpRequest(); objHTTP.open("POST", strUrl, false); } else if (window.ActiveXObject) { objHTTP = new ActiveXObject("Microsoft.XMLHTTP"); objHTTP.open("POST", strUrl, false, "", ""); } objHTTP.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); objHTTP.send(); resp = objHTTP.responseText; objHTTP = null; return resp;}function runAsynch(strAgentName, callback) { 	strUrl = strAgentName; 	if (document.implementation.createDocument) 	{ 		Req = new XMLHttpRequest(); 		Req.open("POST", strUrl, false);	 }	 else if (window.ActiveXObject)	 {	 	Req = new ActiveXObject("Microsoft.XMLHTTP"); 		Req.open("POST", strUrl, false, "", "");	 }	 Req.onreadystatechange = callback;	 Req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");	 Req.send();}function PostAsynch(strAgentName, vals) { 	strUrl = strAgentName; 	if (document.implementation.createDocument) 	{ 		Req = new XMLHttpRequest(); 		Req.open("POST", strUrl, false);	 }	 else if (window.ActiveXObject)	 {	 	Req = new ActiveXObject("Microsoft.XMLHTTP"); 		Req.open("POST", strUrl, false, "", "");	 }	 //Req.onreadystatechange = callback;	 //Req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");	 //enctype="multipart/form-data"	 Req.send(vals);}function PostFormAsynch(strAgentName, vals, boundaryString) { 	strUrl = strAgentName; 	if (document.implementation.createDocument) 	{ 		Req = new XMLHttpRequest(); 		Req.open("POST", strUrl, false);	 }	 else if (window.ActiveXObject)	 {	 	Req = new ActiveXObject("Microsoft.XMLHTTP"); 		Req.open("POST", strUrl, false, "", "");	 }	 //Req.onreadystatechange = callback;	 //Req.setRequestHeader("Content-type", "multipart/form-data");	 //enctype="multipart/form-data"	 Req.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + boundaryString);	 Req.setRequestHeader('Content-Length',vals.length);	 Req.send(vals);}function runLogin(strAgentName, strparams) { var objHTTP; var resp; strUrl = strAgentName; if (document.implementation.createDocument) { objHTTP = new XMLHttpRequest(); objHTTP.open("POST", strUrl, false); } else if (window.ActiveXObject) { objHTTP = new ActiveXObject("Microsoft.XMLHTTP"); objHTTP.open("POST", strUrl, false, "", ""); } objHTTP.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); objHTTP.send(strparams); resp = objHTTP.responseText; objHTTP = null; return resp;}function runAgentGet(strAgentName) { var objHTTP; var resp; strUrl = strAgentName; if (document.implementation.createDocument) { objHTTP = new XMLHttpRequest(); objHTTP.open("GET", strUrl, false); } else if (window.ActiveXObject) { objHTTP = new ActiveXObject("Microsoft.XMLHTTP"); objHTTP.open("GET", strUrl, false, "", ""); } objHTTP.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); objHTTP.send(); resp = objHTTP.responseText; objHTTP = null; return resp;}