
String.prototype.trim = function()
{
    return this.replace(/^\s+|\s+$/g,'');
}




function CreateXmlHttpRequestObject()
{
                                var x = 0;
 try                              { x = new XMLHttpRequest()                   }
 catch (e1){ try                  { x = new ActiveXObject("Msxml2.XMLHTTP")    }
             catch(e2){  try      { x = new ActiveXObject("Microsoft.XMLHTTP") }
                         catch(e3){ x = 0 }
                      }
           }
 finally                   { return x }

}
