/* *******************************************************************************************
	Funcions de suport AJAX	
   ******************************************************************************************* */
function GetXmlHttpObject() {

	// Declaració de variables
	var xmlHttp=null;
	
	// Obtenir xmlHttp
	try {
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
		
	} catch (e) {

		// Internet Explorer
		try {
		  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	
	// Retorn la funció
	return xmlHttp;
}

function xmlHttpSendGet (xmlHttp, url, callBack) {

	xmlHttp.onreadystatechange=callBack;
	xmlHttp.open("GET",  url, true);
	xmlHttp.send(null);			
	
}

function xmlHttpSendPost (xmlHttp, url, callBack) {

	xmlHttp.onreadystatechange=callBack;
	xmlHttp.open("POST",  url, true);
	xmlHttp.send(null);			
	
}

/* *******************************************************************************************
	Verificar si el navegador suporta AJAX	
   ******************************************************************************************* */
if (GetXmlHttpObject()==null) {
	alert ("Your browser does not support AJAX!");
} 			
