var limit = 500000;

if(typeof(XMLHttpRequest)!='undefined') {
    var getXMLHttpObj = function() { return new XMLHttpRequest(); }
} else {
    var getXMLHttpObj = function() {
        var activeXObjects = ['Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.5.0',
        'Msxml2.XMLHTTP.4.0', 'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP', 'Microsoft.XMLHTTP'];
        for(var i=0; i<activeXObjects.length; i++) {
            try{
                return new ActiveXObject(activeXObjects[i]);
            } catch(err) {}
        }
    }
}
function sendRequest(method, action, submit) {
  oXml = getXMLHttpObj();
  oXml.open(method, action, true);
  if(method=="POST" && submit!=null) {
    oXml.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    oXml.setRequestHeader("Content-length", submit.length);
    oXml.setRequestHeader("Connection", "close");
  }
  oXml.onreadystatechange = processingFunction;
  oXml.send(submit);
}
function processingFunction() {
    if(oXml.readyState!=4) return;
    eval(oXml.responseText);
}
function getRandomNum() {
  var today = new Date();
  var num = today.getTime();
  num = Math.round(Math.abs(Math.sin(num) * 1000000)) % limit;
  return num;
}

