Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'am22139'@'localhost' (using password: YES) in /home/atout01/domains/atout-org.com/public_html/eua/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/eua/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/eua/package.inc on line 1201

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

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

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

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

Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /home/atout01/domains/atout-org.com/public_html/eua/scripts/scripts.php on line 61
var intRegFee = 480 ; var intCmpFee = 150 ; var intRegExc = 0 ; var intCmpExc = 0 ; var intHtlDeposit = 0 ; var intHtlFee = 0 ; var listHotels = new Array() ; var dateInsc = 20040401 ; var dateLim = 20040229 ; var typeInsc = 'non member' ; var firstNight = '2004-03-31' ; var lastNight = '2004-04-03' ; var nbNights = 4 ; 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 ; break ; case 2 : hotelDates = listHotels[i].DspDb ; hotelPrice = listHotels[i].ArrDb ; break ; case 3 : hotelDates = listHotels[i].DspTw ; hotelPrice = listHotels[i].ArrTw ; break ; default : break ; } if(clientDates.slice(clientDates.indexOf("1"),clientDates.lastIndexOf("1") + 1) == hotelDates.slice(clientDates.indexOf("1"),clientDates.lastIndexOf("1") + 1)) { if(!(listHotels[i].IDHtl == "HTL-00000001" && (typeInsc == "member" || typeInsc == "non member")) && !(listHotels[i].IDHtl != "HTL-00000001" && typeInsc == "orateur total")) { hotelSelection += "

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

" ; } } } if(hotelSelection == "") hotelSelection = "Sorry, according to your request there are no more rooms available. Please contact Atout Organisation Science at eua@atout-org.com to discuss possible alternatives." ; else hotelSelection = "According to your request, these are the available hotels :

" + 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 < 5 ; i ++) { document.forms[0].bkCmpTitleGroup[i].checked = false ; } document.forms[0].bkCmpLastname.value = "" ; document.forms[0].bkCmpFirstname.value = "" ; } if(document.forms[0].bookGroup[0].checked || document.forms[0].bookGroup[2].checked) { for(i = 0 ; i < 5 ; i ++) { document.forms[0].shCmpTitleGroup[i].checked = false ; } document.forms[0].shCmpLastname.value = "" ; document.forms[0].shCmpFirstname.value = "" ; } } function updateCmpFee() { if(document.forms[0].cmpGroup[0].checked) { if(dateInsc <= dateLim) { document.forms[0].cmpamount.value = "120,00 euros" ; document.forms[0].cmpFeeAmount.value = "120,00 euros" ; intCmpFee = 120 ; } else { document.forms[0].cmpamount.value = "150,00 euros" ; document.forms[0].cmpFeeAmount.value = "150,00 euros" ; intCmpFee = 150 ; } updateTotalAmount() ; } else { for(i = 0 ; i < 3 ; i ++) { document.forms[0].cmpTitleGroup[i].checked = false ; } document.forms[0].cmpLastname.value = "" ; document.forms[0].cmpFirstname.value = "" ; document.forms[0].cmpBuffet.checked = false ; document.forms[0].cmpGala.checked = false ; document.forms[0].cmpFriBxP.checked = false ; document.forms[0].cmpSatMrs.checked = false ; document.forms[0].cmpSatCas.checked = false ; document.forms[0].cmpSunAix.checked = false ; document.forms[0].cmpSunMrs.checked = false ; document.forms[0].cmpamount.value = "0,00 euro" ; document.forms[0].cmpFeeAmount.value = "0,00 euro" ; intCmpFee = 0 ; updateCmpExc() ; } } function updateCmpInfo() { if(document.forms[0].cmpLastname.value != "" || document.forms[0].cmpFirstname.value != "") { document.forms[0].cmpGroup[0].checked = true ; if(dateInsc <= dateLim) { document.forms[0].cmpamount.value = "120,00 euros" ; document.forms[0].cmpFeeAmount.value = "120,00 euros" ; intCmpFee = 120 ; } else { document.forms[0].cmpamount.value = "150,00 euros" ; document.forms[0].cmpFeeAmount.value = "150,00 euros" ; intCmpFee = 150 ; } updateTotalAmount() ; } else { document.forms[0].cmpGroup[0].checked = false ; document.forms[0].cmpGroup[1].checked = true ; document.forms[0].cmpBuffet.checked = false ; document.forms[0].cmpGala.checked = false ; document.forms[0].cmpFriBxP.checked = false ; document.forms[0].cmpSatMrs.checked = false ; document.forms[0].cmpSatCas.checked = false ; document.forms[0].cmpSunAix.checked = false ; document.forms[0].cmpSunMrs.checked = false ; document.forms[0].cmpamount.value = "0,00 euro" ; document.forms[0].cmpFeeAmount.value = "0,00 euro" ; intCmpFee = 0 ; updateCmpExc() ; } } function updateRegExc() { intRegExc = 0 ; if(document.forms[0].regSatCas.checked) intRegExc += 95 ; if(document.forms[0].regSunAix.checked) intRegExc += 35 ; if(document.forms[0].regSunMrs.checked) intRegExc += 30 ; if(intRegExc > 0) document.forms[0].regExcAmount.value = intRegExc + ",00 euros" ; else document.forms[0].regExcAmount.value = intRegExc + ",00 euro" ; updateTotalAmount() ; } function updateCmpExc() { intCmpExc = 0 ; if(document.forms[0].cmpFriBxP.checked) intCmpExc += 95 ; if(document.forms[0].cmpSatMrs.checked) intCmpExc += 50 ; if(document.forms[0].cmpSatCas.checked) intCmpExc += 95 ; if(document.forms[0].cmpSunAix.checked) intCmpExc += 35 ; if(document.forms[0].cmpSunMrs.checked) intCmpExc += 30 ; if(intCmpExc > 0 || document.forms[0].cmpBuffet.checked || document.forms[0].cmpGala.checked) { document.forms[0].cmpExcAmount.value = intCmpExc + ",00 euros" ; document.forms[0].cmpGroup[0].checked = true ; updateCmpFee() ; } else { document.forms[0].cmpExcAmount.value = intCmpExc + ",00 euro" ; if(document.forms[0].cmpLastname.value == "" && document.forms[0].cmpFirstname.value == "") { for(i = 0 ; i < 3 ; i ++) { document.forms[0].cmpTitleGroup[i].checked = false ; } document.forms[0].cmpGroup[0].checked = false ; document.forms[0].cmpGroup[1].checked = true ; document.forms[0].cmpamount.value = "0,00 euro" ; document.forms[0].cmpFeeAmount.value = "0,00 euro" ; intCmpFee = 0 ; } updateTotalAmount() ; } } 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].htlFeeAmount.value = intHtlDeposit + ",00 euros" ; else { if(Math.round(intHtlDeposit*10) == intHtlDeposit*10) document.forms[0].htlFeeAmount.value = String(intHtlDeposit).replace(/[.]/,",") + "0 euros" ; else document.forms[0].htlFeeAmount.value = String(intHtlDeposit).replace(/[.]/,",") + " euros" ; } document.forms[0].bkgFeeAmount.value = "12,00 euros" ; } else { intHtlDeposit = 0 ; intHtlFee = 0 ; document.forms[0].htlFeeAmount.value = "0,00 euro" ; document.forms[0].bkgFeeAmount.value = "0,00 euro" ; } updateTotalAmount() ; return(true) ; } function updateTotalAmount() { intTotalUnivAmount = intRegFee + intRegExc + intCmpFee + intCmpExc ; intTotalAOSAmount = (Math.round((intHtlDeposit + intHtlFee)*100))/100 ; if(intTotalUnivAmount > 0) document.forms[0].totalUnivAmount.value = String(intTotalUnivAmount) + ",00 euros" ; else document.forms[0].totalUnivAmount.value = String(intTotalUnivAmount) + ",00 euro" ; if(intTotalAOSAmount > 0) { if(Math.round(intTotalAOSAmount) == intTotalAOSAmount) document.forms[0].totalAOSAmount.value = intTotalAOSAmount + ",00 euros" ; else { if(Math.round(intTotalAOSAmount*10) == intTotalAOSAmount*10) document.forms[0].totalAOSAmount.value = String(intTotalAOSAmount).replace(/[.]/,",") + "0 euros" ; else document.forms[0].totalAOSAmount.value = String(intTotalAOSAmount).replace(/[.]/,",") + " euros" ; } } else document.forms[0].totalAOSAmount.value = "0,00 euro" ; return(true) ; } function updateShCmpTitleGroup() { if(document.forms[0].shCmpLastname.value == "" && document.forms[0].shCmpFirstname.value == "") { for(i = 0 ; i < 5 ; i ++) { document.forms[0].shCmpTitleGroup[i].checked = false ; } } else { document.forms[0].bookGroup[1].checked = true ; updateBookGroup() ; } } function updateBkCmpTitleGroup() { if(document.forms[0].bkCmpLastname.value == "" && document.forms[0].bkCmpFirstname.value == "") { for(i = 0 ; i < 5 ; 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(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 += "Your email address is not valid.\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 += "Please choose an hotel in the list.\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,"your title") ; checkField(document.forms[0].last_name,"your last name") ; checkField(document.forms[0].first_name,"your first name") ; checkField(document.forms[0].contact_institution,"your institution") ; checkField(document.forms[0].city,"your city") ; checkField(document.forms[0].country,"your country") ; checkField(document.forms[0].email,"your email address") ; checkValidMail(document.forms[0].email) ; if((document.forms[0].regSunAix.checked && document.forms[0].regSunMrs.checked) || (document.forms[0].cmpSunAix.checked && document.forms[0].cmpSunMrs.checked)) { failText += "Please tick one excursion only, on Sunday, 4 April.\n" ; if(failCount == 0) { focusedField = document.forms[0].regSunAix ; } failCount ++ ; } if(document.forms[0].cmpGroup[0].checked || document.forms[0].cmpFriBxP.checked || document.forms[0].cmpSatMrs.checked || document.forms[0].cmpSatCas.checked || document.forms[0].cmpSunAix.checked || document.forms[0].cmpSunMrs.checked) { checkRadio(document.forms[0].cmpTitleGroup,"the title of your companion") ; checkField(document.forms[0].cmpLastname,"the last name of your companion") ; checkField(document.forms[0].cmpFirstname,"the first name of your companion") ; } if(document.forms[0].bookGroup[1].checked) { checkRadio(document.forms[0].shCmpTitleGroup,"the title of the person you share the room with") ; checkField(document.forms[0].shCmpLastname,"the last name of the person you share the room with") ; checkField(document.forms[0].shCmpFirstname,"the first name of the person you share the room with") ; } if(document.forms[0].bookGroup[2].checked) { checkSelect(document.forms[0].htlarrdate,"your arrival date") ; checkSelect(document.forms[0].htldepdate,"your departure date") ; checkSelect(document.forms[0].roomtype,"your room type") ; checkValidHotel(document.forms[0].idhtl) ; } if(failCount == 0) { formOk = true ; } else { if(fillText != "") { if((fillText.split("\n")).length == 2) { fillText = "Please complete the following field:\n\n" + fillText + "\n" ; } else { fillText = "Please complete all the following fields :\n\n" + fillText + "\n" ; } } alert(fillText + failText) ; if(focusedField) { focusedField.focus(); } formOk = false ; } if(formOk == true) { if(!document.forms[0].acceptBox.checked) { formOk = false ; alert("Please confirm that you've read and are now aware of the payment and cancellation conditions.") ; } } } return(formOk) ; } function submitPayment() { failText = "" ; if(document.forms[0].totalUnivAmount.value != "0,00 euro") { if(!document.forms[0].payModeUGroup[0].checked && !document.forms[0].payModeUGroup[1].checked && !document.forms[0].payModeUGroup[2].checked) { focusOn = document.forms[0].payModeUGroup[0] ; failText += "Please choose one payment mode for registration fee and excursions.\n" ; } } if(document.forms[0].totalAOSAmount.value != "0,00 euro") { if(!document.forms[0].payModeAGroup[0].checked && !document.forms[0].payModeAGroup[1].checked) { if(failText == "") focusOn = document.forms[0].payModeAGroup[0] ; failText += "Please choose one payment mode for hotel accommodation.\n" ; } } if(failText != "") { alert(failText) ; focusOn.focus() ; return(false) ; } else { return(true) ; } } function trim(mltstr) { while (mltstr.charAt(0) == ' ') {//remove white spaces from start mltstr=mltstr.substring(1); }//remove white spaces from start while (mltstr.charAt(mltstr.length - 1) == ' ') {//remove white spaces from end mltstr = mltstr.substring(0, mltstr.length - 1); }//remove white spaces from end return mltstr; } function hasAnyValue(anObject) { anObject.value=trim(anObject.value); if(anObject.value.length==0) { anObject.focus(); return false; } return true; } function loginCheck(myForm) { if(!hasAnyValue(myForm.login)) { alert('Please enter the Username'); myForm.login.focus(); return false; } if(!hasAnyValue(myForm.password)) { alert('Please enter the password'); myForm.password.focus(); return false; } return true; }