function testWeb()
{
    var url = "";
	request = new XMLHttpRequest();
	request.onreadystatechange = changementStatut;
	request.open( "GET", url, true );
	request.send();

}

function changementStatut()
{
    if(request.readyState == 4)
    {
    // Content
    }
}



function webServ()
{
// The full path to the proxy
var url = 'http://www.flowuzz.com/lib/spoonkey/AccesService.php?Nom=' + document.spoonkeyform.SpoonKey.value;

// Create xmlhttprequest object
var xmlhttp = null;
if (window.XMLHttpRequest) {
        xmlhttp = new XMLHttpRequest();
        //make sure that Browser supports overrideMimeType
        if ( typeof xmlhttp.overrideMimeType != 'undefined') { xmlhttp.overrideMimeType('text/xml'); }
} else if (window.ActiveXObject) {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}  else {
        alert('Perhaps your browser does not support xmlhttprequests?');
}
// Create an HTTP GET request
xmlhttp.open('GET', url, true);


// Set the callback function
xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4) {
				  var valSplit = xmlhttp.responseText.split('#')
                    //alert(valSplit);
				  
                  // La civilité : radio button
				  /*
                  for(i=0; i<document.create_account_customer_form.gender.length; i++)
					{
						if(document.create_account_customer_form.gender[i].value == valSplit[2])
						{
							document.create_account_customer_form.gender[i].checked=true;
						}
					}
					*/
					
					var male  = document.getElementById("male");
					if ( valSplit[2] == "Mr")
					{
                        male.checked=true;
                    }
                    
                    var female  = document.getElementById("female");
					if ( valSplit[2] == "Mme")
					{
                        female.checked=true;
                    }
                    
                    var demoiselle  = document.getElementById("demoiselle");
					if ( valSplit[2] == "Mlle")
					{
                        demoiselle.checked=true;
                    }

				   //  Le nom : simple textbox
				  document.create_account_customer_form.last_name.value = valSplit[3];
				  //  Le prénom : simple textbox
				  document.create_account_customer_form.first_name.value = valSplit[4];
				  
				  	//email
				    document.create_account_customer_form.email_address.value = valSplit[6];
					//numero
				    //document.create_account_customer_form.Numero.value = valSplit[10];
				 	/*
                     // L'adresse
				 	if ( valSplit[10] != '' )
                     {
                        var numero_rue = valSplit[10]+', ';
                     }
				 	else
                     {
                        var numero_rue = '';
                    }
					document.create_account_customer_form.street_address.value = numero_rue+valSplit[11];
					// complement adresse
					document.create_account_customer_form.suburb.value = valSplit[13]+valSplit[19];
					// Le code postal
					document.create_account_customer_form.postcode.value = valSplit[14];
					// La ville
					document.create_account_customer_form.city.value = valSplit[15];
					*/
					
				  //date de naissance
				  var maDateSplit = valSplit[5].split('/')
				  
				  // Date de naissance jour
				  
					/*
                    for(i=0; i<document.create_account_customer_form.DDNJ.length; i++)
					{
						if(document.create_account_customer_form.DDNJ.options[i].value == maDateSplit[1])
						{
							document.create_account_customer_form.DDNJ.options[i].selected=true;
						}
					}
					
					
					
					// Date de naissance mois
					for(i=0; i<document.create_account_customer_form.DDNM.length; i++)
					{
						if(document.create_account_customer_form.DDNM.options[i].value == parseInt(maDateSplit[0]))
						{
							document.create_account_customer_form.DDNM.options[i].selected=true;
						}
					}
					// Date de naissance année
					for(i=0; i<document.create_account_customer_form.DDNA.length; i++)
					{
						if(document.create_account_customer_form.DDNA.options[i].value == maDateSplit[2])
						{
							document.create_account_customer_form.DDNA.options[i].selected=true;
						}
					}
					*/
					var dob_day  = document.getElementById("dob_day");
					dob_day.value = maDateSplit[1];
					
					var dob_month  = document.getElementById("dob_month");
					dob_month.value = maDateSplit[0];
					
					var dob_year  = document.getElementById("dob_year");
					dob_year.value = maDateSplit[2];
					

/*

				    // Le pays : listebox
					for(i=0; i<document.create_account_customer_form.country.length; i++)
					{
						if(document.create_account_customer_form.country.options[i].value == valSplit[16])
						{
							document.create_account_customer_form.country.options[i].selected=true;
						}
					}
					*/
					// Le telephone
					//document.create_account_customer_form.telephone.value = valSplit[17];
					// Le telephone portable
					//document.create_account_customer_form.portable.value = valSplit[18];
					// Etage
					//document.create_account_customer_form.Etage.value = valSplit[19];
					
					
				  
        } else {
      			// waiting for the call to complete
        }
    };
    // Make the actual request
    xmlhttp.send(null);
}