var global_ajax='tmp';
function ajax_main(url,qrystirng,result1){
global_ajax=result1;	
ajax_main1(url,qrystirng,result1)	
}
function ajax_main1(url,qrystirng,result1){
//global_ajax=result1;
 
		http.open("POST",url+qrystirng, true);
      http.onreadystatechange = handleHttpResponse; 
        http.send(null);
}

function handleHttpResponse() {  //alert(global_ajax);
        if (http.readyState == 4) {  
              if(http.status==200) { 
                  var results=http.responseText; 
              	  document.getElementById(global_ajax).innerHTML =results
				  
              } 
              } 
        } 

function getHTTPObject() { 
  var xmlhttp; 
  if(window.XMLHttpRequest){ 
    xmlhttp = new XMLHttpRequest(); 
  } 
  else if (window.ActiveXObject){ 
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
    if (!xmlhttp){ 
        xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
    } 

} 

return xmlhttp; 
} 

var http = getHTTPObject();
