﻿// JScript 文件
function GetRequest(url)
{
     var xmlhttp;
  
     try {

            // Mozilla / Safari / IE7

             xmlhttp = new XMLHttpRequest();

      } catch (e) {

           // IE

           var XMLHTTP_IDS = new Array(
                                            'MSXML2.XMLHTTP',

                                           'Microsoft.XMLHTTP' );
       var success = false;

       for (var i=0;i < XMLHTTP_IDS.length && !success; i++) {

        try {

             xmlhttp = new ActiveXObject(XMLHTTP_IDS[i]);

              success = true;

          } catch (e) {}

      }

       if (!success) {

         throw new Error('Unable to create XMLHttpRequest.');

      }

   }

    xmlhttp.open("POST",url,false);
    xmlhttp.send();
    try
    {
        return xmlhttp;
    }
    catch(e)
    {
        return null;
    }    


}


String.prototype.Trim = function()
{
    return this.replace(/(^\s*)|(\s*$)/g, "");
}

