function xmlhttpPost(iURL, iData) {
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", iURL, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
//      self.xmlHttpReq.onreadystatechange = function() {
//      if (self.xmlHttpReq.readyState == 4) {
//      myupdatepage(self.xmlHttpReq.responseText);
//      }
//      }
self.xmlHttpReq.send(iData);
}
function sendReferrer(iServer, iNotIfString) {
var myRef = document.referrer;
if (myRef.match('/' + iNotIfString + '/')) {
} else {
xmlhttpPost("/cgi-bin/refererCollect.pl", "ref=" + encodeURIComponent(myRef));
}
}
function updatepage(str){
document.getElementById("TheResult").innerHTML = str;
}
function getquerystring() {
qstr = "w=abcdef";
return qstr;
}
function xmlhttpPostCountdown(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('GET', 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() {
xmlhttpPostCountdown("/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;
parent.window.document.getElementById("sponsorsIframe").height = 1420;
*/
}
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);
}
function bookmarksite(title, url)
{
if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
} else if(document.all) { // ie
window.external.AddFavorite(url, title);
}
}
function rotateImg(iCounter)
{
var i;
var allImages = new Array();
allImages[0] = "/images/blackad2.jpg";
allImages[1] = "/images/blackad3.jpg";
allImages[2] = "/images/blackad4.jpg";
allImages[3] = "/images/blackad1.jpg";
document['BlackmacImg'].src = allImages[iCounter];
var nextC = iCounter + 1;
if (nextC > 3)
nextC = 0;
setTimeout("rotateImg(" + nextC + ")", 2500);
}

