function ajax_do_call(url,fuseAction,postVars,callbackFunc)
{	
	//alert('aayaa');
	//alert(url);alert(postVars);
	//return false;
	var isPost = (postVars && postVars.length > 0);
	//alert(isPost);
	var xmlHttp = GetXmlHttpObject();
	if (xmlHttp == null)
	{
		alert ("Your browser does not support AJAX!");
		return;
	}
	//Creating url to send through ajax
	

	if (!isPost) {
		if (url.indexOf('?') == -1) {
			url += '?' + uncache();
		} else {
			url += '&' + uncache();
		}
	}
	//alert(url);
	xmlHttp.onreadystatechange = function() {		
		if (xmlHttp.readyState == 4) { //This function will execute on receive
			var callback;
			var extra_data = false;	
			var data = xmlHttp.responseText;
			callback = callbackFunc;
			//pageTracker._trackPageview("/ajax_request/"+url ); 			 
			callbackFunc(data, extra_data);
		}
	};

	if (typeof(gaTrackAjaxRequest) == 'function') gaTrackAjaxRequest(url);

	//Send data to the url through ajax
	if (isPost) {	
	//alert("post");
		xmlHttp.open("POST", url, true);
		xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttp.setRequestHeader("Content-Length", postVars.length);
		xmlHttp.setRequestHeader("Connection", "close");
		xmlHttp.send(postVars);
	} else {	
	//alert("get");
		xmlHttp.open("GET", url, true);
		xmlHttp.send(null);
	}
}

// Intialize XMLHTTP object
function GetXmlHttpObject()
{	
	var A;	
	if (window.XMLHttpRequest) {
		A = new XMLHttpRequest();
	} else {
		var msxmlhttp = new Array(
		'Msxml2.XMLHTTP.6.0',
		'Msxml2.XMLHTTP.3.0',
		'Msxml2.XMLHTTP',
		'Microsoft.XMLHTTP');
		for (var i = 0; i < msxmlhttp.length; i++) {				
			try {				
				A = new ActiveXObject(msxmlhttp[i]);
				break;
			} catch (e) {
				A = null;
			}
		}
	}

	return A;
}

function uncache(){
	var d = new Date();
	var time = d.getTime();

	return 'time='+time;
}

function AjaxRequestPS(url, options) {
	if (typeof(Ajax) != "undefined" && Ajax.Request) {
		if (typeof(gaTrackAjaxRequest) == 'function') gaTrackAjaxRequest(url);

		return new Ajax.Request(url, options);
	} else {
		return null;
	}
}

function AjaxUpdaterPS(element, url, options) {
	if (typeof(Ajax) != "undefined" && Ajax.Updater) {
		if (typeof(gaTrackAjaxRequest) == 'function') gaTrackAjaxRequest(url);

		return new Ajax.Updater(element, url, options);
	} else {
		return null;
	}
}
