function createAjaxObj(){
var httprequest=false
if (window.XMLHttpRequest){ // if Mozilla, Safari etc
httprequest=new XMLHttpRequest()
if (httprequest.overrideMimeType)
httprequest.overrideMimeType('text/xml')
}
else if (window.ActiveXObject){ // if IE
try {
httprequest=new ActiveXObject("Msxml2.XMLHTTP");
} 
catch (e){
try{
httprequest=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){}
}
}
return httprequest
}

function ajax_loadcontent( url, elementID )
{
	this.url = url;
	this.elementID = elementID;
	this.ajaxobj = createAjaxObj();
	this.getContent();
}

ajax_loadcontent.prototype.getContent=function () {
	var thisObj = this;
	if (this.ajaxobj)
	{
		this.ajaxobj.onreadystatechange=function(){thisObj.initialize()}
		this.ajaxobj.open('GET', this.url, true);
		this.ajaxobj.send(null);
	}
}

ajax_loadcontent.prototype.initialize=function()
{	
	if (this.ajaxobj.readyState == 4){
		document.getElementById( this.elementID ).innerHTML = this.ajaxobj.responseText;
	}
}
