
var xmlhttp;

function GetXmlHttpObject(){
	var xmlhttp=null;
	try {
		// Firefox, Opera 8.0+, Safari
		xmlhttp=new XMLHttpRequest();
	} catch (e)  {
		// Internet Explorer
		try {
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlhttp;
}


function get_ajax(command,value,target_id,url) {
	xmlhttp=GetXmlHttpObject()

	if (xmlhttp==null) {
		alert ("Your browser does not support AJAX!");
		return;
	}
	//alert('ajax_.php?command='+command+'&value='+value);
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState==4 || xmlhttp.readyState=="complete") {
			//if (xmlhttp.status == 200) {
			document.getElementById(target_id).innerHTML = xmlhttp.responseText;
			//}
		}
	} // Send the POST request

	xmlhttp.open('POST', url+'ajax_.php', true);
	xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlhttp.send('command='+command+'&value='+value);

}






