﻿// //////////////////////////////////////////////////////////////////
// © A.A Productions | aa-product.com
//
// HTTP Request v 2.1.47
//
// //////////////////////////////////////////////////////////////////
var xmlhttp;
function xmlHttpReq()
{
 var port;
 if(!port){
   try
   {
    port = new XMLHttpRequest();
   }catch(e){};
 }
 if(!port){
   try
   {
    port = new ActiveXObject('Msxml2.XMLHTTP');
   }catch(e){};
 }
 if(!port){
   try
   {
    port = new ActiveXObject('Microsoft.XMLHTTP');
   }catch(e){};
 }
 if(!port){
   try
   {
    port = new ActiveXObject('MSXML2.XMLHTTP.3.0');
   }catch(e){};
 }
 if(!port){
   try
   {
    port = new ActiveXObject('MSXML2.XMLHTTP.4.0');
   }catch(e){};
 }
 if(!port){
   try
   {
    port = new ActiveXObject('MSXML2.XMLHTTP.5.0');
   }catch(e){};
 }
 return port;
}
function sendreq(url,variables,method,callbackfunction)
{
  xmlhttp=xmlHttpReq();
 if (xmlhttp==null)
  return;
  for(var i in variables)
   variables[i] = variables[i].join('=');
   variables_ = variables.join('&');
 var req
  if(method=='get')
   req = url+(variables_=='' ? '' : '?'+variables_);
  else
  {
   req = url;
  }
 xmlhttp.onreadystatechange=callbackfunction;
 try{
  xmlhttp.open(method,req,true);
  if(method=='get')
   xmlhttp.send();
  else
  {
   xmlhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
   xmlhttp.setRequestHeader('Content-length', variables.length);
   xmlhttp.setRequestHeader('Connection', 'close');
   xmlhttp.send(variables_);
  }
 }catch(e){};
}
function httpsuccess()
{
 return xmlhttp.readyState==4 && xmlhttp.status==200;
}
function httpresponse()
{
 return xmlhttp.responseText;
}
function httpstatus()
{
 switch(xmlhttp.readyState)
 {
  case 0:
  return 'uninitialized';
   break;
  case 1:
  return 'loading';
   break;
  case 2:
  return 'loaded';
   break;
  case 3:
  return 'interactive';
   break;
  case 4:
  return 'complete';
   break;
 }
}