// JavaScript Document
/* 
ajax initiation 
*/
var div_to_be_back;
function sendresponse(url,method,divid)
{

	div_to_be_back= document.getElementById(divid);
	//alert(url);
	http.open(method, url+"&v="+Math.random(), true); 
    http.onreadystatechange = handleHttpResponse; 
    http.send(null); 	
}

function  handleHttpResponse()
{
  if (http.readyState == 4) 
  { 
           if(http.status==200) 
		   { 
			
			div_to_be_back.innerHTML=http.responseText;
		   }
	}
}	

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();		

