function file(page, method, params)
{
	// si method = GET alors params=''
	// si method = POST alors params='var1=valeur1&var2=valeur2'
	
     if(window.XMLHttpRequest){ // FIREFOX
          xhr_object = new XMLHttpRequest(); 
     }
     else if(window.ActiveXObject) {// IE
          xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 
     }
     else{ 
          return(false); 
     }
     
     xhr_object.open(method, page, false);
     
     /*xhr_object.onreadystatechange = function() {
     	if(xhr_object.readyState == 4) { 		
     	}
     }*/
     if(method=='POST'){
     	xhr_object.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
     	xhr_object.send(params);
     }
     else{
     	xhr_object.send(null);
     }
     
     return(xhr_object.responseText);
}



function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
      } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (E) {
        xmlhttp = false;
        }
      }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
      } catch (e) {
      xmlhttp = false;
      }
    }
  return xmlhttp;
  }