try {
	AJAXHttp = new XMLHttpRequest(); /* e.g. Firefox */
} catch(e) {
	try {
		AJAXHttp = new ActiveXObject("Msxml2.XMLHTTP");  /* some versions IE */
	} catch (e) {
		try {
			AJAXHttp = new ActiveXObject("Microsoft.XMLHTTP");  /* some versions IE */
		} catch (E) {
			AJAXHttp = false;
		} 
	} 
}

function getAjaxObj(){
	return AJAXHttp;
}


function GetXMLHttpObject()
{
	var ajaxObj = null;

	try 
	{
		ajaxObj = new XMLHttpRequest(); /* e.g. Firefox */
	} 
	catch(e) 
	{
		try 
		{
			ajaxObj = new ActiveXObject("Msxml2.XMLHTTP");  /* some versions IE */
		} 
		catch (e) 
		{
			try 
			{
				ajaxObj = new ActiveXObject("Microsoft.XMLHTTP");  /* some versions IE */
			} 
			catch (E) 
			{
				//AJAXHttp = false;
			} 
		} 
	}

	return ajaxObj;
}

function getLoadingTextData(){
	return "<img src='./includes/client_template/images/icons/loading.gif'> <div style='display: inline; position: relative; top: -5px; left: 10px; font-weight: bold; color: red;'>Loading data, please wait...</div>";
}

function getLoadingTextDataAdmin(){
	return "<img src='../includes/client_template/images/icons/loading.gif'> <div style='display: inline; position: relative; top: -5px; left: 10px; font-weight: bold; color: red;'>Loading data, please wait...</div>";
}

function DisplayLoadingTextData(data){
	return "<img src='./includes/client_template/images/icons/loading.gif'> <div style='display: inline; position: relative; top: -5px; left: 10px; font-weight: bold; color: red;'>" + data + "</div>";
}

function openTradeTypeHelp(){
	w = 450;
	h = 400;
	newWin = window.open("index.php?action=search_trade_types&is_popup=1", "win", "height="+h+",width="+w+",scrollbars=1,resizable=1,help=0,top=200, left=300");
	newWin.moveTo(screen.availWidth/2-(w/2),screen.availHeight/2-(h/2));
	newWin.focus();
}