function setdate(s){
			s = s.split("-");
			document.grpaidbooking_form.fday.value = s[2];
			document.grpaidbooking_form.fmonth.value = s[1];
			document.grpaidbooking_form.fyear.value = s[0];
			//alert(s);
		}
		var gihttprequestjson;
		function sendajax(s_url, s_onresponse, s_data){

			gihttprequestjson = new Request({

				url: s_url,

				data: s_data,

				onRequest: function(){
					//alert("Sending");
				},

				onComplete: function(response){
					//alert('Response is done');
				},

				onSuccess: function(jsonObj){
					s_onresponse(eval( "(" + jsonObj + ")" ), jsonObj);
				},

				onFailure: function(){
					alert('The request failed.');
				}
			});

			gihttprequestjson.send();
		}
		function getvillesofregion(field, id){
			s_data = "id="+id+"&select="+field+"&lang=<?php echo $lang; ?>";
			sendajax("http://www.quebecensaisons.com/include/getvillesofregion.php", displayvilles, s_data);
		}
		function displayvilles(jsonObj, text){
			//alert("complete\ntext:\n" + text+"\njson:\n"+jsonObj);

			//remove villes
			liste = document.getElementById(jsonObj.select);
			while(liste.options.length > 0){
				liste.removeChild(liste.options[0]);
			}

			id = 0;

			var villes = jsonObj.villes;
			if(villes.length > 0){
				villes.each(function(ville) {
					//add news
					option = document.createElement("option");
					option.value = ville.nom; //id
					option.text = ville.nom;
					liste.options[liste.options.length] = option;

					if(id == 0) id = ville.id;
				});
			}
		}