function createXHR() {
var request = false;
try {
request = new ActiveXObject('Msxml2.XMLHTTP');
}
catch (err2) {
try {
request = new ActiveXObject('Microsoft.XMLHTTP');
}
catch (err3) {
try {
request = new XMLHttpRequest();
}
catch (err1) {
request = false;
}
}
}
return request;
}
function ajax(page,val)
{
re=createXHR();
re.open("POST",page,true);
re.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
re.send(val);
re.onreadystatechange=function(){
if(re.readyState==4){
if (re.status == 200)
{
return re.responseText;
}else{
alert("Sorry not found");
};loading_effect(0);
}
}
}