
    <!--/*--><![CDATA[//><!--
	var xhr = false;
	function req_ajax_get(url, parameters){
		xhr = null; 
		if (window.XMLHttpRequest) {// Firefox et autres
		    xhr = new XMLHttpRequest(); 
		    if (xhr.overrideMimeType) {
				// paramètre le  type en conséquence pour anticiper le content type
				
				xhr.overrideMimeType('text/html');
			}
		} else if(window.ActiveXObject){ // Internet Explorer 
			try {
				xhr = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
		else { // XMLHttpRequest non supporté par le navigateur 
		   alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
		   xhr = false; 
		} 
		xhr.onreadystatechange = mafonction;
		xhr.open('GET', url + parameters, true);
		xhr.send(null);
	}

   function mafonction() {
      if (xhr.readyState == 4) {
         if (xhr.status == 200) {
            //alert(xhr.responseText);
            result = xhr.responseText;
            document.getElementById('type_dip').innerHTML = result;            
         } else {
            alert('Il y a eu un problème avec la requête.');
         }
      }
   }
   

	function get(obj) {
      var getstr = "?";
      for (i=0; i<obj.childNodes.length; i++) {
         if (obj.childNodes[i].tagName == "INPUT") {
            if (obj.childNodes[i].type == "text") {
               getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
            }
            if (obj.childNodes[i].type == "checkbox") {
               if (obj.childNodes[i].checked) {
                  getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
               } else {
                  getstr += obj.childNodes[i].name + "=&";
               }
            }
            if (obj.childNodes[i].type == "radio") {
               if (obj.childNodes[i].checked) {
                  getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
               }
            }
         }   
         if (obj.childNodes[i].tagName == "SELECT") {
            var sel = obj.childNodes[i];
            getstr += sel.name + "=" + sel.options[sel.selectedIndex].value + "&";
         }
         
      }
      req_ajax_get('get.php', getstr);
   }
   
    xhreq = false;
    function req_ajax(url, parameters, fonction){
        try{
            xhreq = null; 
            if (window.XMLHttpRequest) {// Firefox et autres
                xhreq = new XMLHttpRequest(); 
            } else if(window.ActiveXObject){ // Internet Explorer 
                try {
                    xhreq = new ActiveXObject("Msxml2.XMLHTTP");
                } catch (e) {
                    xhreq = new ActiveXObject("Microsoft.XMLHTTP");
                }
            }
            else { // XMLHttpRequest non supporté par le navigateur 
               alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
               xhreq = false; 
            } 
            
            xhreq.onreadystatechange = function(){
                if (xhreq.overrideMimeType) {
                    // paramètre le  type en conséquence pour anticiper le content type
                    xhreq.overrideMimeType('text/html');
                }
                if (xhreq.readyState == 4) {
                    if (xhreq.status == 200) {
                        fonction();
                    } else {
                        alert('Il y a eu un problème avec la requête.'+xhreq.responseText);
                    }
                }
            }
            xhreq.open('GET', url + parameters, true);
            xhreq.send(null);
        }
        catch(e){
            alert(e.message);
        }
	}
   
   
//--><!]]>

