Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'am22139'@'localhost' (using password: YES) in /home/atout01/domains/atout-org.com/public_html/biodiversite/dbconnect.inc on line 4

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/atout01/domains/atout-org.com/public_html/biodiversite/dbconnect.inc on line 5

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/atout01/domains/atout-org.com/public_html/biodiversite/package.inc on line 809

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/atout01/domains/atout-org.com/public_html/biodiversite/package.inc on line 840

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/atout01/domains/atout-org.com/public_html/biodiversite/package.inc on line 840

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/atout01/domains/atout-org.com/public_html/biodiversite/package.inc on line 840

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/atout01/domains/atout-org.com/public_html/biodiversite/package.inc on line 840

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/atout01/domains/atout-org.com/public_html/biodiversite/package.inc on line 840

Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /home/atout01/domains/atout-org.com/public_html/biodiversite/javascript/scripts.php on line 15
var intTotalAmount = 0.00 ; var intTotalRegFees = 0.00 ; var intHtlDeposit = 0.00 ; var intHtlFee = 0.00 ; var listHotels = new Array() ; var firstNight = '2004-05-24' ; var lastNight = '2004-05-28' ; var nbNights = 5 ; var nbHotels = 0 ; function classHotel(IDHtl,Nom,Categorie,Map,Address,TarSg,ArrSg,DspSg,TarDb,ArrDb,DspDb,TarTw,ArrTw,DspTw) { this.IDHtl = IDHtl ; this.Nom = Nom ; this.Categorie = Categorie ; this.Map = Map ; this.Address = Address ; this.TarSg = TarSg ; this.ArrSg = ArrSg ; this.DspSg = DspSg ; this.TarDb = TarDb ; this.ArrDb = ArrDb ; this.DspDb = DspDb ; this.TarTw = TarTw ; this.ArrTw = ArrTw ; this.DspTw = DspTw ; return true;} function etoile(cat) { mesetoiles = "" ; switch(cat) { case 1 : mesetoiles = "*" ; break ; case 2 : mesetoiles = "**" ; break ; case 3 : mesetoiles = "***" ; break ; case 4 : mesetoiles = "****" ; break ; default : mesetoiles = "" ; break ; } return(mesetoiles) ; } function updateHotelSelection() { if(document.forms[0].htlarrdate.selectedIndex != 0 && document.forms[0].htldepdate.selectedIndex != 0 && document.forms[0].htlarrdate.selectedIndex < document.forms[0].htldepdate.selectedIndex + 1 && document.forms[0].roomtype.selectedIndex != 0) { document.forms[0].bookGroup[2].checked = true ; clientDates = "" ; hotelSelection = "" ; for(i = 1 ; i <= nbNights ; i ++) { if(i >= document.forms[0].htlarrdate.selectedIndex && i <= document.forms[0].htldepdate.selectedIndex) clientDates += "1" ; else clientDates += "0" ; } for(i = 1 ; i <= nbHotels ; i ++) { switch(document.forms[0].roomtype.selectedIndex) { case 1 : hotelDates = listHotels[i].DspSg ; hotelPrice = listHotels[i].ArrSg ; strRoomType = "simple" ; break ; case 2 : hotelDates = listHotels[i].DspDb ; hotelPrice = listHotels[i].ArrDb ; strRoomType = "double" ; break ; case 3 : hotelDates = listHotels[i].DspTw ; hotelPrice = listHotels[i].ArrTw ; strRoomType = "twin" ; break ; default : break ; } if(clientDates.slice(clientDates.indexOf("1"),clientDates.lastIndexOf("1") + 1) == hotelDates.slice(clientDates.indexOf("1"),clientDates.lastIndexOf("1") + 1)) { hotelSelection += "

 " + listHotels[i].Nom + " " + etoile(listHotels[i].Categorie) + "" ; hotelSelection += "
" + listHotels[i].Address + "
" ; if(listHotels[i].TarSg != 0) hotelSelection += "Simple : " + String(listHotels[i].TarSg).replace(/[.]/,",") + " €/nuit - " ; if(listHotels[i].TarDb != 0) hotelSelection += "Double : " + String(listHotels[i].TarDb).replace(/[.]/,",") + " €/nuit - " ; if(listHotels[i].TarTw != 0) hotelSelection += "Twin : " + String(listHotels[i].TarTw).replace(/[.]/,",") + " €/nuit" ; hotelSelection += "

" ; } } if(hotelSelection == "") hotelSelection = "Aucune chambre " + strRoomType + " n'est disponible
du " + document.forms[0].htlarrdate.value.substring(8,10) + "/" + document.forms[0].htlarrdate.value.substring(5,7) + "/" + document.forms[0].htlarrdate.value.substring(0,4) + " au " + document.forms[0].htldepdate.value.substring(8,10) + "/" + document.forms[0].htldepdate.value.substring(5,7) + "/" + document.forms[0].htldepdate.value.substring(0,4) + ".

Veuillez modifier vos souhaits ou contacter
Atout Organisation Science à l'adresse suivante :
biodiversite@atout-org.com

" ; else hotelSelection = "Voici la liste des hôtels dans lesquels des chambres " + strRoomType + "s sont disponibles du " + document.forms[0].htlarrdate.value.substring(8,10) + "/" + document.forms[0].htlarrdate.value.substring(5,7) + "/" + document.forms[0].htlarrdate.value.substring(0,4) + " au " + document.forms[0].htldepdate.value.substring(8,10) + "/" + document.forms[0].htldepdate.value.substring(5,7) + "/" + document.forms[0].htldepdate.value.substring(0,4) + " :

" + hotelSelection + "
" ; hotelSelection += "
" ; document.getElementById("htlListing").innerHTML = hotelSelection ; updateHotelFees('',0) ; } else { document.getElementById("htlListing").innerHTML = " " ; updateHotelFees('',0) ; } return(true) ; } function updateBookGroup() { if(document.forms[0].bookGroup[0].checked || document.forms[0].bookGroup[1].checked) { document.forms[0].htlarrdate.selectedIndex = 0 ; document.forms[0].htldepdate.selectedIndex = 0 ; document.forms[0].roomtype.selectedIndex = 0 ; updateHotelSelection() ; for(i = 0 ; i < 3 ; i ++) { document.forms[0].bkCmpTitleGroup[i].checked = false ; } document.forms[0].bkCmpNom.value = "" ; document.forms[0].bkCmpPrenom.value = "" ; } if(document.forms[0].bookGroup[0].checked || document.forms[0].bookGroup[2].checked) { for(i = 0 ; i < 3 ; i ++) { document.forms[0].shCmpTitleGroup[i].checked = false ; } document.forms[0].shCmpNom.value = "" ; document.forms[0].shCmpPrenom.value = "" ; } } function updateHotelFees(idhtl,currentDeposit) { document.forms[0].idhtl.value = idhtl ; if(currentDeposit != 0) { intHtlDeposit = currentDeposit ; intHtlFee = 12.00 ; if(Math.round(intHtlDeposit) == intHtlDeposit) document.forms[0].htlDep.value = intHtlDeposit + ",00 euros" ; else { if(Math.round(intHtlDeposit*10) == intHtlDeposit*10) document.forms[0].htlDep.value = String(intHtlDeposit).replace(/[.]/,",") + "0 euros" ; else document.forms[0].htlDep.value = String(intHtlDeposit).replace(/[.]/,",") + " euros" ; } document.forms[0].htlFee.value = "12,00 euros" ; } else { intHtlDeposit = 0 ; intHtlFee = 0 ; document.forms[0].htlDep.value = "0,00 euro" ; document.forms[0].htlFee.value = "0,00 euro" ; } updateTotalAmount() ; return(true) ; } function updateRegFees() { intTotalRegFees = 0.00 ; if(document.forms[0].galaGroup[0].checked) { document.forms[0].galaFee.value = "30,00 euros" ; intTotalRegFees += 30.00 ; } else { document.forms[0].galaFee.value = "0,00 euro" ; } if(document.forms[0].excGroup[0].checked) { document.forms[0].excFee.value = "25,00 euros" ; intTotalRegFees += 25.00 ; } else { document.forms[0].excFee.value = "0,00 euro" ; } updateTotalAmount() ; } function updateTotalAmount() { intTotalAmount = intTotalRegFees + (Math.round((intHtlDeposit + intHtlFee)*100))/100 ; if(intTotalAmount > 0) { if(Math.round(intTotalAmount) == intTotalAmount) document.forms[0].totalDu.value = intTotalAmount + ",00 euros" ; else { if(Math.round(intTotalAmount*10) == intTotalAmount*10) document.forms[0].totalDu.value = String(intTotalAmount).replace(/[.]/,",") + "0 euros" ; else document.forms[0].totalDu.value = String(intTotalAmount).replace(/[.]/,",") + " euros" ; } } else document.forms[0].totalDu.value = "0,00 euro" ; return(true) ; } function updateShCmpTitleGroup() { if(document.forms[0].shCmpNom.value == "" && document.forms[0].shCmpPrenom.value == "") { for(i = 0 ; i < 3 ; i ++) { document.forms[0].shCmpTitleGroup[i].checked = false ; } } else { document.forms[0].bookGroup[1].checked = true ; updateBookGroup() ; } } function updateBkCmpTitleGroup() { if(document.forms[0].bkCmpNom.value == "" && document.forms[0].bkCmpPrenom.value == "") { for(i = 0 ; i < 3 ; i ++) { document.forms[0].bkCmpTitleGroup[i].checked = false ; } } } function checkField(field,label) { if(field.value == "") { this.fillText += " - " + label + "\n" ; if(this.failCount == 0) { this.focusedField = field ; } this.failCount ++ ; } return(true) ; } function checkSelect(field,label) { if(field.selectedIndex == 0) { this.fillText += " - " + label + "\n" ; if(this.failCount == 0) { this.focusedField = field ; } this.failCount ++ ; return(false) ; } else return(true) ; } function checkRadio(radioBtn,label) { isChecked = false ; if(radioBtn) { for(i = 0 ; i < radioBtn.length ; i ++) { if(radioBtn[i].checked) { isChecked = true ; } } if(! isChecked) { this.fillText += " - " + label + "\n" ; if(this.failCount == 0) { this.focusedField = radioBtn[0] ; } this.failCount ++ ; } } return(true) ; } function checkMrMrs(radioBtn,label) { isChecked = false ; if(radioBtn) { for(i = 0 ; i < radioBtn.length ; i ++) { if(radioBtn[i].checked) { isChecked = true ; } } if(! isChecked) { this.failText += "Please choose Mr., Mrs., Ms., etc. " + label + "\n" ; if(this.failCount == 0) { this.focusedField = radioBtn[0] ; } this.failCount ++ ; } } return(true) ; } function checkValidDate(dayField,monthField,yearField,label) { if(yearField.value != "0000" || monthField.value != "00" || dayField.value != "00") { currentDate = new Date(yearField.value,monthField.value - 1,dayField.value) ; if(!((currentDate.getDate() == dayField.value) && (currentDate.getMonth() == monthField.value - 1) && (currentDate.getFullYear() == yearField.value))) { this.failText += "La " + label + " saisie est incorrecte.\n" ; if(this.failCount == 0) { this.focusedField = dayField ; } this.failCount ++ ; } } return(true) ; } function checkValidMail(mailField) { if(mailField.value != "") { var regxMask = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]{2,}[.][a-zA-Z]{2,3}$/ if(regxMask.exec(mailField.value) == null) { this.failText += "L'adresse électronique saisie est incorrecte.\n" ; if(this.failCount == 0) { this.focusedField = mailField ; } this.failCount ++ ; } } return(true) ; } function checkValidHotel(IDHotel) { isChecked = false ; /* if(hotelRadio) { for(i = 0 ; i < hotelRadio.length ; i ++) { if(hotelRadio[i].checked) { isChecked = true ; } } if(!isChecked) { this.failText += "Please choose an hotel in the list.\n" ; if(this.failCount == 0) { this.focusedField = hotelRadio[0] ; } this.failCount ++ ; } }*/ if(IDHotel.value != "") { isChecked = true ; } if(!isChecked) { this.failText += "Veuillez, s'il vous plait, sélectionner un hôtel dans la liste.\n" ; this.failCount ++ ; } return(true) ; } function checkForm() { this.fillText = "" ; this.failText = "" ; this.failCount = 0 ; this.focusedField = null ; this.checkField = checkField ; this.checkSelect = checkSelect ; this.checkRadio = checkRadio ; this.checkMrMrs = checkMrMrs ; this.checkValidDate = checkValidDate ; this.checkValidMail = checkValidMail ; this.checkValidHotel = checkValidHotel ; return(true) ; } function submitIt() { currentCheck = new checkForm() ; formOk = false ; with(currentCheck) { checkRadio(document.forms[0].regTitleGroup,"civilité (Mme, Melle, M.)") ; checkField(document.forms[0].nom,"nom") ; checkField(document.forms[0].prenom,"prénom") ; checkField(document.forms[0].organisme,"organisme") ; checkField(document.forms[0].ville,"ville") ; checkField(document.forms[0].pays,"pays") ; checkField(document.forms[0].email,"e-mail") ; checkValidMail(document.forms[0].email) ; if(!document.forms[0].dayOne.checked && !document.forms[0].dayTwo.checked && !document.forms[0].dayThr.checked && !document.forms[0].dayFou.checked) { fillText += " - date(s) de participation aux Journées\n" ; if(failCount == 0) { focusedField = document.forms[0].dayOne ; } failCount ++ ; } checkRadio(document.forms[0].posterGroup,"présentation d'un poster") ; if(document.forms[0].posterGroup[0].checked) { checkField(document.forms[0].posterTitre,"titre du poster") ; } checkRadio(document.forms[0].galaGroup,"participation au dîner de gala") ; checkRadio(document.forms[0].excGroup,"participation à l'excursion") ; // if(document.forms[0].excGroup[0].checked) // { // choix1 = checkSelect(document.forms[0].excchoix1,"excursion n°1 choisie") ; // choix2 = checkSelect(document.forms[0].excchoix2,"excursion n°2 choisie") ; // choix3 = checkSelect(document.forms[0].excchoix3,"excursion n°3 choisie") ; // if(choix1 && choix2 && choix3) // { // if(document.forms[0].excchoix1.value == document.forms[0].excchoix2.value // || document.forms[0].excchoix1.value == document.forms[0].excchoix3.value // || document.forms[0].excchoix2.value == document.forms[0].excchoix3.value) // { // failText += "Veuillez, s'il vous plait, choisir trois excursions différentes,\nen les classant par ordre de préférence.\n" ; // if(failCount == 0) // { // focusedField = document.forms[0].excchoix1 ; // } // failCount ++ ; // } // } // } if(intTotalAmount > 0) { checkRadio(document.forms[0].paiGroup,"mode de paiement") ; } if(failCount == 0) { formOk = true ; } else { if(fillText != "") { if((fillText.split("\n")).length == 2) { fillText = "Veuillez, s'il vous plait, compléter la rubrique suivante :\n\n" + fillText + "\n" ; } else { fillText = "Veuillez, s'il vous plait, compléter chacune des rubriques suivantes :\n\n" + fillText + "\n" ; } } alert(fillText + failText) ; if(focusedField) { focusedField.focus(); } } } return(formOk) ; }