
function makeAjaxRequest(script,variables,md5,div) { 
	if(div=="popup") {
		document.getElementById(div).style.visibility="visible";
		//document.getElementById(div).style.width = "200px";
		//document.getElementById(div).style.height = "200px";
		document.getElementById(div).style.top = (document.body.scrollTop + 200)+"px";
	}
	setInnerHTML(document.getElementById(div),"<img src='/_img/loading.gif' border='0'/>");	
    var xhr; 
    try {
		xhr = new ActiveXObject('Msxml2.XMLHTTP');
	} catch (e) {
		try {
			xhr = new ActiveXObject('Microsoft.XMLHTTP');
		} catch (e2) {
			try {
				xhr = new XMLHttpRequest();
			} catch (e3) {
				xhr = false;
			}
		}
	}

	xhr.open('POST', script+"?md5="+md5+"&div="+div,  true); 
	xhr.onreadystatechange  = function() { 
		if(xhr.readyState  == 4) {
			if(xhr.status  == 200) {
				toReturn = xhr.responseText; 
			} else {
				toReturn = "error "+xhr.status;
			}
			if(div!='') {
				setInnerHTML(document.getElementById(div),toReturn);
				document.getElementById(div).style.visibility = "visible";
			}
		}; 
	}

	xhr.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	xhr.send(variables);  
} 