var ajaxGetReq;
function ajaxGetRequest(url,callback){
  ajaxGetReq = false;
  if(window.XMLHttpRequest) {
    try{ ajaxGetReq = new XMLHttpRequest();}
    catch(e){ ajaxGetReq = false;}
  }else if(window.ActiveXObject){
    try{
      ajaxGetReq = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
      try{ ajaxGetReq = new ActiveXObject("Microsoft.XMLHTTP");}
      catch(e){ ajaxGetReq = false;}
    }
  }
  if(ajaxGetReq){
    ajaxGetReq.onreadystatechange = eval(callback);
    ajaxGetReq.open("GET", url, true);
    ajaxGetReq.send("");
  }
}
var ajaxPostReq;
function ajaxPostRequest(url,data,callback){
  ajaxPostReq = false;
  if(window.XMLHttpRequest) {
    try{ ajaxPostReq = new XMLHttpRequest();}
    catch(e){ ajaxPostReq = false;}
  }else if(window.ActiveXObject){
    try{
      ajaxPostReq = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
      try{ ajaxPostReq = new ActiveXObject("Microsoft.XMLHTTP");}
      catch(e){ ajaxPostReq = false;}
    }
  }
  if(ajaxPostReq){
    ajaxPostReq.onreadystatechange = eval(callback);
    ajaxPostReq.open("POST", url, true);
    ajaxPostReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
    ajaxPostReq.send(data);
  }
}

/*SAMPLE
    var oOne;
    function get1(){
      ajaxGetRequest("http://www.paper-source.com/test.htm","get1Callback");
    }
    function get1Callback(){
      if(!oOne) oOne = ajaxGetReq;
      var state = oOne.readyState;
      if(state==4){
        var t = oOne.responseText;
        document.getElementById("one").innerHTML=t;
      }
    }
    var oTwo;
    function get2(){
      ajaxPostRequest("http://www.paper-source.com/test.htm","user=darren&zip=90028","get2Callback");
    }
    function get2Callback(){
      if(!oTwo) oTwo = ajaxPostReq;
      var state = oTwo.readyState;
      if(state==4){
        var t = oTwo.responseText;
        document.getElementById("two").innerHTML=t;
      }
    }


*/
