var xmlHttp;

function createXMLHttpRequest() {
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        xmlHttp = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
}

function updatepage(divName,str){
  document.getElementById(divName).innerHTML=str;
}

function startRequest(strURL, divName) {
	createXMLHttpRequest();
	xmlHttp.open("POST", strURL, true);
	xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlHttp.onreadystatechange = function () {
	if(xmlHttp.readyState == 4) {
		if(xmlHttp.status == 200) {
			updatepage(divName,xmlHttp.responseText);
		}
	}
	}
xmlHttp.send(null);
}


