window.addEvent("domready", function() {
	//new Accordion($$(".accordion_toggler"), $$(".accordion_content"));

	new iMask({
		onValid: function(event, obj) {obj.setStyles({"background-color":"#cfc", "border":"1px solid #0c0"})},
		onInvalid: function(event, obj) {obj.setStyles({"background-color":"#fcc", "border":"1px solid #c00"})}
	});

	var exValidatorB = new fValidator("register_form");
	
});	

var url = "ajax/inscription.php?"; // The server-side script 

function handleHttpResponse() { 
	if (http.readyState == 4) { // Split the comma delimited response into an array  
		results = http.responseText.split(","); 
		document.getElementById('city').innerHTML = results[0]; 
	} 
}

function updateCityState() {
	var pays = document.getElementById("pays").value;
	var zipValue = document.getElementById("zip").value; 
	http.open("GET", url + "zipValue="+escape(zipValue) +"&pays="+ escape(pays), true); 
	http.onreadystatechange = handleHttpResponse; 
	http.send(null);
}
