function updatepage(str){
document.getElementById("TheResult").innerHTML = str;
}
function getquerystring() {
qstr = "w=abcdef";
return qstr;
}
function xmlhttpPost(strURL) {
var xmlHttpReq = false;
var self = this;
// Mozilla/Safari
if (window.XMLHttpRequest) {
self.xmlHttpReq = new XMLHttpRequest();
}
// IE
else if (window.ActiveXObject) {
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('POST', strURL, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function() {
if (self.xmlHttpReq.readyState == 4) {
updatepage(self.xmlHttpReq.responseText);
}
}
self.xmlHttpReq.send(getquerystring());
}
function xmlhttpPostCountdown() {
xmlhttpPost("/cgi-bin/getCountdown.pl");
}
function xmlhttpPostCheckheader(strURL) {
var xmlHttpReq = false;
var self = this;
// Mozilla/Safari
if (window.XMLHttpRequest) {
self.xmlHttpReq = new XMLHttpRequest();
}
// IE
else if (window.ActiveXObject) {
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('POST', strURL, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.setRequestHeader('REFERER', 'TESTREFERER');
self.xmlHttpReq.setRequestHeader('X-REQUESTED-WITH', 'UTILS.JS');
self.xmlHttpReq.onreadystatechange = function() {
//if (self.xmlHttpReq.readyState == 4) {
//updatepage(self.xmlHttpReq.responseText);
//}
}
self.xmlHttpReq.send(getquerystring());
}
function doCheckheader() {
xmlhttpPostCheckheader("/cgi-bin/checkheader.pl");
}
function fixHeight() {
var thisSize = parent.window.document.getElementById("right-hand").offsetHeight - 65;
if (thisSize < 450)
thisSize = 450;
parent.window.document.getElementById("myIframe").height = thisSize;
}
function updateAuthCode(str){
document.forms[0].authCodeStr.value = str;
}
function xmlhttpPostNEW(strURL, iElementToUpdate) {
var xmlHttpReq = false;
var self = this;
// Mozilla/Safari
if (window.XMLHttpRequest) {
self.xmlHttpReq = new XMLHttpRequest();
}
// IE
else if (window.ActiveXObject) {
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('POST', strURL, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function() {
if (self.xmlHttpReq.readyState == 4) {
//document.getElementById(iElementToUpdate).innerHTML = str;
updateAuthCode(self.xmlHttpReq.responseText);
}
}
self.xmlHttpReq.send(getquerystring());
}
function createAuthCode() {
xmlhttpPostNEW("/cgi-bin/getAuthCode.pl", document.forms[0].authCodeStr.value);
}
