
function createAJAXRequestObject()
{
	var request_;
	var browser = navigator.appName;

	if(browser == "Microsoft Internet Explorer")
	{
		request_ = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
		request_ = new XMLHttpRequest();
	}
	return request_;
}
function customAjaxPost(r, d)
{
	var http = new Array();	var rnow = new Date();
	http[rnow] = createAJAXRequestObject();
	http[rnow].open("get", "index.php?r=" + r, true);
	http[rnow].onreadystatechange = function(){
		if(http[rnow].readyState == 4) 
		{
			if(http[rnow].status == 200 || http[rnow].status == 304)
			{
 				document.getElementById(d).innerHTML = http[rnow].responseText;
			}
	    	}}
	http[rnow].send(null);
}
function searchSmartDisplay(f, w, u)
{
	var a = w + ".search=" + document.getElementById(w + "_search_q").value + ";";
	updateSmartDisplay(f, w, a, u);
}
function updateSmartDisplay(f, w, a, u)
{
	var http = new Array();	var rnow = new Date();
	http[rnow] = createAJAXRequestObject();
	http[rnow].open("get", "index.php?f=" + f + "&u=" + u + "&w=" + w + "&a=" + a + "&ajax_r=1", true);
	http[rnow].onreadystatechange = function(){
		if(http[rnow].readyState == 4) 
		{
			if(http[rnow].status == 200 || http[rnow].status == 304)
			{
 				document.getElementById("sd_" + w).innerHTML = http[rnow].responseText;
			}
	    	}}
	http[rnow].send(null);
}

