function sendRequestAjax(){var ajaxFunction;var xmlHttp=null;var bComplete=false;addCarga();try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{xmlHttp=new XMLHttpRequest();}catch(e1){try{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}catch(e2){alert("Your browser does not support AJAX!");return false;}}}if(!xmlHttp)return null;this.connect=function(urlDesti,funcioReb,paramPost){paramPost=paramPost||'';if(xmlHttp!=null){bComplete=false;if(paramPost!=''){xmlHttp.open("POST",urlDesti,true);}else{xmlHttp.open("GET",urlDesti,true);}xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4&&!bComplete){bComplete=true;remCarga();funcioReb(xmlHttp);}};if(paramPost!=''){xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.send(paramPost);}else{xmlHttp.send(null);}}};return this;}function setOutput(){if(xmlHttp.readyState==4){var responseXML=xmlHttp.responseXML;if(ajaxFunction=="upperCase"){try{var response_stat=responseXML.getElementsByTagName('pet')[0].firstChild.data;document.getElementById('outputText').value="0-"+response_stat;}catch(e){document.getElementById('outputText').value=e.description;}}else{document.getElementById('outputText').value="not upercase-"+xmlHttp.responseText;}}}
