function ajaxObject(url, divId, callbackFunction)
{
	var that=this;      
	this.updating=false;
     
	this.update = function(passData)
	{
		that.AJAX = null;                          
		if(window.XMLHttpRequest){              
			that.AJAX=new XMLHttpRequest();              
		}else{                                  
			that.AJAX=new ActiveXObject("Microsoft.XMLHTTP");
    	}
    		
		if(that.updating || that.AJAX==null){return false;}
		                        
		that.AJAX.onreadystatechange = function()
		{  
			if(that.AJAX.readyState==4)
			{      
				that.updating=false;
				
				/* strip out <!startstatic .... endstatic--> and place into seperate div.
					var onlyStaticResponse = that.AJAX.responseText.match(/(<!--startstatic((.|\n)*)endstatic-->)/ig,"");

					if(onlyStaticResponse)
					{
						var pureStaticContentResponse = onlyStaticResponse[0].replace(/(<!--startstatic|endstatic-->)/ig,"");
						var newelname = divId.replace(/(ajax_content_)/ig,"ajax_content_static_");
						document.getElementById(newelname).innerHTML = pureStaticContentResponse;
					}
				*/

				if(divId)
				{
					var obj = document.getElementById(divId);
					obj.innerHTML = that.AJAX.responseText;                
				}
				that.callback(that.AJAX.responseText);                                      
			}                                                      
		}                                                        
			
		that.updating = true;                              
		
		var uri=urlCall;
		if(passData != undefined){
			uri += '?'+passData; 
		}
		that.AJAX.open("GET", uri, true);                             
		that.AJAX.send(null);                                         
	            
		
		return true;                                                                                                                     
	}
	
	var urlCall = url;        
	this.callback = callbackFunction || function () { };
}
