// microAjax

microAjaxLoaded = 0;

function microAjax(e, url)
{
	microAjaxLoaded = 0;

	var that = this;

	this.microAjaxRequest;
	
	if(typeof e == "object")
		{
		this.domElement = e;
		}
	else if(typeof e == "string" && document.getElementById(e))
		{
		this.domElement = document.getElementById(e);
		}
	else
		{
		// wrong elementtype
		return
		}
	
	this.requestURL = url;
	
	try
		{
		// Opera 8.0+, Firefox, Safari
		this.microAjaxRequest = new XMLHttpRequest();
		}
	catch (e) 
		{
		// Internet Explorer Browsers
		try
			{
			this.microAjaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
			}
		catch (e) 
			{
			try
				{
				this.microAjaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
				}
			catch (e)
				{
				// Browser not AJAX compatible
				return false;
				}
			}
		}

	this.microAjaxRequest.onreadystatechange = function()
		{
		if(microAjaxRequest.readyState == 4)
			{
			that.domElement.innerHTML = microAjaxRequest.responseText;
			microAjaxLoaded = 1;
			}
		}

	microAjaxRequest.open("GET", this.requestURL, true);
	microAjaxRequest.send(null); 
}


// /microAjax

