function GetXmlHttpObject( handler ) { 

	var objXmlHttp = null;
	
	try {
		objXmlHttp = new ActiveXObject( "Microsoft.XMLHTTP" ); 
	} 
		
	catch( e ) {
		try {
			objXmlHttp = new ActiveXObject( "Msxml2.XMLHTTP" ); 
		  } 
		  
		catch( ex ) {
			try {
				objXmlHttp = new XMLHttpRequest(); 
			} 
		   
			catch( exc ) {
				alert( "Esse browser não tem recursos para uso do Ajax" );	
				objXmlHttp = null;		   
			}
		}
	}
	
	objXmlHttp.onreadystatechange = handler;
	return objXmlHttp;
	
	if( navigator.userAgent.indexOf( "Mozilla" ) >= 0 ) {
		objXmlHttp = new XMLHttpRequest()
		objXmlHttp.onload = handler;
		objXmlHttp.onerror = handler; 
		return objXmlHttp;
	}
}