var ajax;
ajax = new ajaxWrapper();

function ajaxWrapper()
{
	var xmlHttp = null;
	var targetID = '';
	this.mode = 'GET';
	this.async = true;
	
	try
	{
		xmlHttp=new XMLHttpRequest(); 	// Firefox,	Opera 8.0+,	Safari
	}
	catch (e)
	{
		try
		{
			xmlHttp=new	ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer 6+
		}
		catch (e)
		{
			try
			{
				xmlHttp=new	ActiveXObject("Microsoft.XMLHTTP"); // InternetExplorer 5.5+
			}
			catch (e)
			{
				alert("Your	browser does not support AJAX!");
				return false;
			}
		}
	}

	
	xmlHttp.onreadystatechange=function()
	{
		if(this.async == false)
			return;
		
		if(xmlHttp.readyState != 4)
			return;
		
		//alert("async!");
		document.getElementById(targetId).innerHTML=xmlHttp.responseText;
	}
	
	
	this.setInnerHTML = function(resultTarget, requestTarget)
	{
			
		targetId = resultTarget;
		try
		{
			//alert("requestType = " + this.mode.toString() + "\nrequestTarget = " + resultTarget.toString() + "\nasync = " + this.async.toString());
			xmlHttp.open(this.mode, requestTarget, this.async);
		}
		catch(e)
		{
			alert(e.toString());
		}
		xmlHttp.send(null);
		if(this.async == false) { document.getElementById(targetId).innerHTML=xmlHttp.responseText; }
		
	}

}