function ajax_class()
{
	var AR; // Ajax Request
	var AD; // Ajax Destination
}
ajax_class.prototype={
	process:function()
	{
		if(AR.readyState<4){AJAX_OBJ.loader();}
		if(AR.readyState==4){if(AR.status==200){response=AR.responseText; AD.innerHTML=response;}else{AD.innerHTML="Error: Status ddd "+AR.status;}}				
	},
	toload:function(URL, destination)
	{
		if(!document.getElementById(destination)){this.error(destination); return false;}		
		AD=document.getElementById(destination);
		if(window.XMLHttpRequest){AR=new XMLHttpRequest(); AR.onreadystatechange=this.process; AR.open("GET", URL, true); AR.send(null);} 
		else if (window.ActiveXObject){AR = new ActiveXObject("Microsoft.XMLHTTP");if(AR){AR.onreadystatechange=this.process;AR.open("GET", URL, true);AR.send();}}			
	},
	loader:function(){AD.innerHTML="<div align='center' style='padding-top:80px;'><img src='http://www.mdmebel.com/design/loading_32x32.gif'></div>";},
	error:function(destination){alert("Произошла ошибка. Элемент с id='"+destination+"' не найден");} 
}

