var ajax = {
	xml : '',
	get_html : function (url, object_name, url_params, metodo, return_result, is_xml){  
		var xmlHttp;
		
		if ( !url_params ) url_params = '';
	
		try{    // Firefox, Opera 8.0+, Safari    
			xmlHttp=new XMLHttpRequest();    
		}catch (e){    // Internet Explorer    
			try{      
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
			}catch (e){      
				try{        
					xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        
				}catch (e){        
					alert("Your browser does not support AJAX!");        
					return false;        
				}      
			}    
		}
	
	    xmlHttp.onreadystatechange=function(){
									if(xmlHttp.readyState==4){
										if (xmlHttp.status==200){
											if ( object_name != '' ){
												if ( is_xml ){
													this.xml = xmlHttp.responseXML;
													$("#"+object_name).html(this.xml.getElementsByTagName("html")[0].childNodes[0].nodeValue);
													eval(this.xml.getElementsByTagName("script")[0].childNodes[0].nodeValue);
												}else{
													$("#"+object_name).html(xmlHttp.responseText);
												}
											}else{
												if( return_result )
													ajax_result_ok();
											}
										}else{
											if ( object_name != '' ){
												$("#"+object_name).html('');
											}else{
												if( return_result )
													ajax_result_ko();
											}
										}
							        }
		}
	
		try{
		    if(metodo=='POST'){
		    	xmlHttp.open("POST",url,true);
		    	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
				xmlHttp.setRequestHeader("Content-length", url_params.length);
				xmlHttp.setRequestHeader("Connection", "close");
			    xmlHttp.send(url_params);  
		    }else{
			    xmlHttp.open("GET",url+"?"+url_params,true);
			    xmlHttp.send(null);  
			}
		}catch(e){
			alert(e);
		}
	}	
};