sjsr_cnt=0;

sjsr_arr=new Array();

function SJSRResponse(id, str) {
  sjsr_arr[id].response=str;
  sjsr_arr[id].onResponse();
}

function SimpleJSRequest() {
  sjsr_cnt=sjsr_cnt+1;
  sjsr_arr[sjsr_cnt]=this;
  this.id=sjsr_cnt;
  this.response='';
  this.onResponse = function() {}
  this.query = function(url, str) {
    if (this.js!=null) {document.body.removeChild(this.js)}
    this.js=document.createElement('script');
    this.js.language='JavaScript';
    this.js.src=url+'?sjsr_id='+this.id+'&sjsr_nc='+Math.random()+'&sjsr_qs='+str;
    document.body.appendChild(this.js);
  }
}

