


function Ajax(){
this.xmlhttp;
this.urlPost;
this.dresponse="";
Ajax.prototype.setReq=function(file){

if (window.ActiveXObject)
  {// code for IE6, IE5
this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    
  //alert("hello");
  }
else if(window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  this.xmlhttp=new XMLHttpRequest();
  }
 
 file=file.split("?");
 this.urlPost=file[1];
 this.xmlhttp.open("POST",file[0],true);
this.xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
}
  
  Ajax.prototype.send=function(){
  //alert(this.urlPost);
  //alert(this.xmlhttp);
  try{
  this.xmlhttp.send(this.urlPost);
  }catch(e){
  alert(e.description);
  }
  }
  
 
  
 Ajax.prototype.actions=function(act,obj){ 
  this.xmlhttp.onreadystatechange=function(){
  
  if (obj.xmlhttp.readyState==4 && obj.xmlhttp.status==200)
    {
   response = obj.xmlhttp.responseText;
   //alert("hello"+response);
   act();
    }
  
  
  };
  }
  
 
  
  
  }
  
  
function sethtml(div,content) 

        {

            var search = content;

            var script;

            

            while( script = search.match(/(<script[^>]+javascript[^>]+>\s*(<!--)?)/i))

                {

                    search = search.substr(search.indexOf(RegExp.$1) + RegExp.$1.length);

                    

                    if (!(endscript = search.match(/((-->)?\s*<\/script>)/))) break;

                    

                    block = search.substr(0, search.indexOf(RegExp.$1));

                    search = search.substring(block.length + RegExp.$1.length);

                    

                    var oScript = document.createElement('script');

                    oScript.text = block;

                    document.getElementsByTagName("head").item(0).appendChild(oScript);

                }

                

                document.getElementById(div).innerHTML=content;

            } 

            
