function AjaxCall(){
	this.xmldoc = false;
	this.htmltext = "";

	this.browsername = "";
	this.browsertype = -1;
	this.xmlhttp = false;
	this.onDone = function(){};

	try {
		//If the Javascript version is greater than 5.
		this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		this.browsername = "Microsoft Internet Explorer ver 5 or upper";
		this.browsertype = 0;
	} catch (e) {
		try {
			this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			this.browsername = "Microsoft Internet Explorder ver 4 or lower";
			this.browsertype = 0;
		} catch (e) {
			//Else we must be using a non-IE browser.
			this.xmlhttp = false;
		}
	}
	
	//If we are using a non-IE browser, create a javascript instance of the object.
	if (!this.xmlhttp && typeof XMLHttpRequest != 'undefined') {
		try {
			this.xmlhttp = new XMLHttpRequest();
			this.browsername = "Non Microsoft Internet Explorer browser";
			this.browsertype = 0;
		} catch (e) {
			this.xmlhttp = false;
			this.browsername = "Non AJAX browser";
		}
	}

	this.sendXMLRequest = function(serverPage) {
		this.serverPage = serverPage;
		var instance = this;
		if (this.xmlhttp) {
			this.xmlhttp.open("GET", this.serverPage);
			this.xmlhttp.onreadystatechange = function() {
				if (instance.xmlhttp.readyState == 4){
					instance.xmldoc = instance.xmlhttp.responseXML;
					 if (instance.xmlhttp.status == 200) instance.onDone();	
				}
			}
			this.xmlhttp.send(null);
		}
	}
	
	this.sendRequest = function(serverPage) {
		this.serverPage = serverPage;
		var instance = this;
		if (this.xmlhttp) {
			this.xmlhttp.open("GET", this.serverPage);
			this.xmlhttp.onreadystatechange = function() {
				if (instance.xmlhttp.readyState == 4){
					instance.htmltext = instance.xmlhttp.responseText;
					 if (instance.xmlhttp.status == 200) instance.onDone();	
				}
			}
			this.xmlhttp.send(null);
		}
		
				
	
	}
	
	this.setgetPage=function(serverPage, obj) {	
	//alert("HIHI");
		this.serverPage = serverPage;
		var instance = this;
	//	alert("HIHI");
		if (!this.xmlhttp) {
			
			obj.innerHTML = this.browser;	
		//	alert("HIHI");
		} else {
			
			this.xmlhttp.open("GET", this.serverPage);
			
			this.xmlhttp.onreadystatechange = function() {
				if (instance.xmlhttp.readyState ==  4&& instance.xmlhttp.status == 200)	{
					 instance.onDone();
				//	alert("HIHI");
			//	obj.innerHTML = instance.xmlhttp.responseText;
				//setMenu();
				}
				
			
		}
	}
	this.xmlhttp.send(null);
}
	
	//this.init();
}
