// JavaScript Document



function book_test(formulaire) {var message=''var todaydate=new Date()var today=new Date(todaydate.getFullYear(),todaydate.getMonth(), todaydate.getDate())//test de la datechoixdate=new Date(formulaire.FirstSelectMonth.options[formulaire.FirstSelectMonth.selectedIndex].value.substring(0,4), eval(formulaire.FirstSelectMonth.options[formulaire.FirstSelectMonth.selectedIndex].value.substring(4,6))-1, formulaire.FirstSelectDay.options[formulaire.FirstSelectDay.selectedIndex].value)if (today<=choixdate) { } else {message='Wrong date: please check and modify your query.'}// affichage du message d'erreurif (message!='') alert(message);else{ formulaire.submit();}}// you may use/modify this code, but please give credit as a courtesy// script by Arash Ramin (http://www.digitalroom.net)function setCurrentDate() {  // changes the date selector menus to the current date  var currentDate = new Date();  setDays();  document.AVP.FirstSelectDay.selectedIndex = currentDate.getDate() - 1;}function setDays() {  var Monthlong = document.PW.FirstSelectMonth.options[document.PW.FirstSelectMonth.selectedIndex].value;  var m=Monthlong.substring(4,6)  var y=eval(Monthlong.substring(0,4))  // find number of days in current month  days = 31;  if ( (m == "04") || (m == "06") || (m == "09") || (m == "11") ) {    days = 30;  }  else if (m == "02") {    // check for leapyear - Any year divisible by 4, except those divisible by 100 (but NOT 400)    if ( (Math.floor(y/4) == (y/4)) && ((Math.floor(y/100) != (y/100)) || (Math.floor(y/400) == (y/400))) )      days = 29    else      days = 28  }  // if (days in new month > current days) then we must add the extra days  if (days > document.PW.FirstSelectDay.length) {    for (i = document.PW.FirstSelectDay.length; i < days; i++) {      document.PW.FirstSelectDay.length = days;      document.PW.FirstSelectDay.options[i].text = i + 1;      document.PW.FirstSelectDay.options[i].value = i + 1;    }  }    // if (days in new month < current days) then we must delete the extra days  if (days < document.PW.FirstSelectDay.length) {    document.PW.FirstSelectDay.length = days;    if (document.PW.FirstSelectDay.selectedIndex == -1)       document.PW.FirstSelectDay.selectedIndex = days - 1;  }}var CityNameFR = new Array ("PARIS");var CityValueFR = new Array ("PAR");var PropertyNamePAR = new Array ("Hotel de la Sorbonne","Hotel des Grands Hommes","Hotel du Pantheon","Hotel Eiffel Park","Hôtel Ferrandi","Hotel le Jardin de l'Odeon");var PropertyValuePAR = new Array ("1001","1015","1016","1018","7113","1017");function fillcity( formulaire, country ) {newcountry = country.replace(/ /,'');if ( country.length == 0 ) {    formulaire.city.length = 1;    formulaire.city.options[0] = new Option("[Show all cities/towns]");    formulaire.city.options[0].value = '';      formulaire.property.length = 1;    formulaire.property.options[0] = new Option("[Show all properties]");    formulaire.property.options[0].value = '';        return;  }  newOptions = eval('CityName'+newcountry);  newOptionsvalue = eval('CityValue'+newcountry);  formulaire.city.length = 1;  formulaire.city.options[0] = new Option("[Show all cities/towns]");  formulaire.city.options[0].value = '';  formulaire.city.options[0].selected = true;      formulaire.property.length = 1;  formulaire.property.options[0] = new Option("[Show all properties]");  formulaire.property.options[0].value = '';  formulaire.property.options[0].selected = true;    for ( i=0; i<newOptions.length; i++ ) {    formulaire.city.length=i+1;    thisEntry = newOptions[i];    newOption = new Option( thisEntry );    newOption.value = newOptionsvalue[i]    formulaire.city.options[i+1] = newOption;  }  }function fillproperty( formulaire, city ) {newcity = city.replace(/ /,'');if ( city.length == 0 ) {    formulaire.property.length = 1;    formulaire.property.options[0] = new Option("[Show all properties]");    formulaire.property.options[0].value = '';        return;  }  newOptions = eval('PropertyName'+newcity);  newOptionsvalue = eval('PropertyValue'+newcity);    formulaire.property.length = 1;  formulaire.property.options[0] = new Option("[Show all properties]");  formulaire.property.options[0].value = '';  formulaire.property.options[0].selected = true;        for ( i=0; i<newOptions.length; i++ ) {    formulaire.property.length=i+1;    thisEntry = newOptions[i];    newOption = new Option( thisEntry );    newOption.value = newOptionsvalue[i]    formulaire.property.options[i+1] = newOption;      }  }function popopenurl(url) {windowprops = "height=500,width=600,location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no";window.open(url, "Popup", windowprops);}function popopenurlscroll(url) {windowprops = "height=500,width=600,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no";window.open(url, "Popup", windowprops);}
