var text;

function ajaxObject(url) {                                   
	var that=this;                                
	var updating = false;                             
	this.callback = function() {}                           

	this.update = function(url) {                              
		if (updating==true) { return false; }                       
		updating = true;                                               
		var AJAX = null;                                               
		if (window.XMLHttpRequest) {                                  
			AJAX=new XMLHttpRequest();                                
		} else {                                                   
			AJAX=new ActiveXObject("Microsoft.XMLHTTP");               
		}                                                              
		if (AJAX==null) {                                             
			alert("Your browser doesn't support AJAX.");               		
			return false;                                              
		} else {
			AJAX.onreadystatechange = function() {                    
				if (AJAX.readyState==4 || AJAX.readyState=="complete") { 
					text =  AJAX.responseText;
					delete AJAX;                                          
					updating=false;                                       
					that.callback();                                      
				}                                                       
			}  
			                                                     
			AJAX.open("GET", url, true);                                
			AJAX.send(null);                                            
			return true;                                               
		}                                                              
	}
}                               

function updateContent() {
	//document.getElementById('progress').style.display = '';
	document.getElementById('ranking').innerHTML = text;
}

