var InstallationUrl = ''; var bustcachevar=1; //bust potential caching of external pages after initial request? (1=yes, 0=no) var bustcacheparameter=""; function createRequestObject(){ try { xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { alert('Sorry, but your browser doesn\'t support XMLHttpRequest.'); }; return xmlhttp; }; var http = createRequestObject(); function ajaxpage(url, containerid){ var page_request = createRequestObject(); if (bustcachevar) bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime() page_request.open('GET', url+bustcacheparameter, true) page_request.send(null) page_request.onreadystatechange=function(){ loadpage(page_request, containerid) } } function loadpage(page_request, containerid){ if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)) { document.getElementById(containerid).innerHTML=page_request.responseText; }; } function refreshImg(){ var url = InstallationUrl + 'form.php'; doRefresh(url, displayImg); }; function doRefresh(url, callback) { http.open('POST', url, true); http.onreadystatechange = displayImg; http.send(null); }; function displayImg() { if(http.readyState == 4) { var showimage = http.responseText; document.getElementById('captchaImage').innerHTML = showimage; }; }; // Ajax Captcha Alert function cCheckAlert(formObj){ if(http.readyState == 4) { var showcheck = http.responseText; if(showcheck == '1'){ flagCaptcha = true; }else{ flagCaptcha = false; }; if (flagCaptcha==false){ // stop loading form if false do not work for fuckin IE if(navigator.appName=="Microsoft Internet Explorer"){ //window.document.execCommand('Stop'); }else{ window.stop(); }; alert('Incorrect verification code!'); //return false; }; }; }; // Ajax Captcha Checker function cCheck(formObj){ if (formObj.Securecode.value && formObj.Securecode.value!='01AB') { http.open('POST', InstallationUrl + 'process.php?captcha='+formObj.Securecode.value, true); http.onreadystatechange=function(){cCheckAlert(formObj);}; http.send(null); }; }; loadCaptcha = '
'; document.writeln(loadCaptcha);