// JavaScript Document
var ajax=new myajax; 
function isIE(){ 
	if(window.ActiveXObject)return true;
	return false; 
} 
function create_ActiveX() { 
	if(isIE()){ 
	  return {http:new ActiveXObject("Microsoft.XMLHTTP"),dom:new ActiveXObject("Microsoft.XMLDOM")}; // IE 
	}else{ 
	  return {http:new XMLHttpRequest(),dom:document.implementation.createDocument("","",null)}; // Non-IE browsers 
	} 
}

function myajax(){
	this.xmlhttp = create_ActiveX().http; 
	this.doc= create_ActiveX().dom; 
	this.doc.async=false; 

	this.get=function (url) { 
	  var this_obj = this; 
	  this.xmlhttp.onreadystatechange = function() { 
		  if(this_obj.xmlhttp.readyState == 4) { 
		   if(this_obj.xmlhttp.status == 200) { 
			//alert(this_obj.xmlhttp.getAllResponseHeaders()); 
			this.html=this_obj.xmlhttp.responseText; 
			alert(this_obj.xmlhttp.responseText) 
		   
		   } else { 
			alert('There was a problem with the request. ('+this_obj.xmlhttp.status+')'); 
		   } 
		  } 
		} 
		this.xmlhttp.open("GET", url, true); 
		this.xmlhttp.send(null); 
		return true; 
	} 

	this.load=function(file,Pnode){ 
		this.xmlhttp.open("GET",file,false);
		this.xmlhttp.send();
		this.doc=this.xmlhttp.responseXML;
	  	if(this.doc!=null){
			var z=this.doc.getElementsByTagName(Pnode); 
			var c=z.item(0).firstChild.nodeValue; 
			return c; 
	  	} 
	  return false; 
	}
} 
//ajax.get("tt.txt") 
//var msg=ajax.load("versions.xml","num"); 
//alert(msg) 

