var E_INVALID_EMAIL = ''; var E_INVALID_CODE = 'Le code de sécurité que vous avez saisi est erroné.'; var E_MIN6CATS = ''; var E_MIN100CHARS = 'Votre texte doit comporter au moins 100 caractères.'; var E_TRAVELPERIOD = ''; var E_TRAVELCOMPANY = ''; var E_NAME = ''; var E_EMAIL = ''; var E_GENERAL_ERROR = 'Erreur à l\'envoi du formulaire'; var aItems = new Array('generalinfo','facilitiesinfo','ambiance','inforequest', 'reservationrequest', 'inspector', 'pricelist', '', '', '', '', 'review_add', 'review_display', 'review_thanks'); function fnShowCampingStartPage() { oElem = document.getElementById('CampsiteTab'); iIndex = 0; fnShowDetailItem(oElem, iIndex, true); } window.addEvent("domready", function() { aDP = new Array(); // Initialize mootools datepicker $$('input.DatePicker').each( function(el) { aDP[el.id] = new DatePicker(el, { format : sDateFormat, sLanguage : sLocale, bOnlyFuture : true }); }); }); function fnShowDetailItem(oElem, iIndex, bScrollTop) { var oItemToShow = document.getElementById(aItems[iIndex]); /* * BG - 13-4-2010 11:44:04 * Generate security image on the fly when you click tab. * Fix problems with memcache not supporting session locking properly */ d=new Date(); if (aItems[iIndex] == 'reservationrequest') { document.getElementById('reservationrequest_security').src='/imagelib/security/security-image.php?time='+d.getTime()+'&type=res'; } else if (aItems[iIndex] == 'inforequest') { document.getElementById('inforequest_security').src='/imagelib/security/security-image.php?time='+d.getTime()+'&type=info'; } else if (aItems[iIndex] == 'review_add') { document.getElementById('security').src='/imagelib/security/security-image.php?time='+d.getTime(); } if ($chk(oElem)) { $('detailtabs').getElements('UL').each(function(oUl) { for (var i = 0; i < oUl.childNodes.length; i++) { if (oUl.childNodes[i].nodeName == 'LI') oUl.childNodes[i].className = ''; } }); oElem.parentNode.className = 'current'; //Actieve tab highlighten } for (var i = 0; i < aItems.length; i++) { // Use try-catch, so we won't get JS errors if a div doesn't exist // coz it has not been filled with content yet .. try { document.getElementById(aItems[i]).style.display = 'none'; } catch(e) { } } if (bScrollTop) window.scroll(0,0); oItemToShow.style.display = 'block'; // Hide reviews //fnHideReviewDiv(); init(); } //************************************************************************** // Start Information request javascript //*************************************************************************** function fnCheckInformationForm(x) { var mesg_verplicht = ''; var velden = new Array(); var melding = ''; // Afzonderlijk melden.. if (x.info_1.checked == false && x.info_2.checked == false && x.info_3.checked == false && x.info_4.checked == false) { melding += "Sélectionnez les informations que vous désirez recevoir.\n\n"; //Selecteer de informatie die je ontvangen wil! alert(melding); x.info_1.focus() return false } // Bij elkaar melden if (!fnCheckEmpty(x.naam)) { mesg_verplicht += " - Nom\n"; //naam velden[3] = "naam"; } if (!fnCheckEmpty(x.adres)) { mesg_verplicht += " - Adresse\n"; //adres velden[4] = "adres"; } if (!fnCheckEmpty(x.plaats)) { mesg_verplicht += " - Localité\n"; //plaats velden[5] = "plaats"; } if (x.land.value == -1) { mesg_verplicht += " - Pays\n"; //land velden[6] = "land"; } if (!fnCheckEmptyBox(x,'resptaal')) { mesg_verplicht += " - Veuillez me répondre dans l\'une des langues suivantes\n"; // velden[7] = "resptaal[1]"; } if (mesg_verplicht != '') { melding += "Les champs suivants sont obligatoires :\n"; //De volgende velden zijn verplicht: melding += "------------------------------------------\n\n"; melding += mesg_verplicht; for (i=0;i<8;i++) { veld = velden[i]; elmt = document.forms["f_info"].elements[veld]; if (elmt){ elmt.focus(); break; } } alert(melding) return false; } else { if( confirm("Souhaitez-vous qu\\\'Eurocampings.net conserve provisoirement vos coordonnées, pour qu’à l’avenir elles puissent être consignées automatiquement ?\n\n- Pressez sur \\\'OK\\\' pour sauvegarder les données.\n- Pressez sur \\\'Annuler\\\' si vous ne souhaitez pas faire usage de ce service.\n\n") ){ x.use_cookie.value = 1; } return true; } } function fnMailInformationForm(x) { var camp_mail = "de.kempenheuvel@telenet.be" var allValid = fnCheckInformationForm(x) if (allValid) { if (x.mail.value.length > 5 && x.mail.value.indexOf("@") != -1 && x.mail.value.indexOf(".") != -1) { x.camp_mail.value = camp_mail sWinURL = '/dialogs/printinfo.html'; fnOpenPrintDialog(sWinURL); x.submit() } else { melding = "Les champs suivants sont incorrects :\n"; //De volgende velden zijn onjuist: melding += "------------------------------------------\n\n"; melding += " - E-mail\n"; //Email alert(melding); x.mail.focus(); } } } function fnPrintInformationLetter(x) { x.camp_mail.value = "" var allValid = fnCheckInformationForm(x) if (allValid) { sWinURL = '/dialogs/printinfo.html'; fnOpenPrintDialog(sWinURL); x.submit(); } } //************************************************************************** // END Information request javascript //*************************************************************************** //************************************************************************** // Start Reservation request javascript //*************************************************************************** function fnCheckReservationForm(x) { var mesg_verplicht = ''; var velden = new Array(); var melding = ''; if (!fnCheckEmpty(x.aankomst)) { mesg_verplicht += " - Date d\'arrivée\n"; //aankomstdatum velden[0] = "aankomst"; } if (!fnCheckEmpty(x.vertrek)) { mesg_verplicht += " - Date de départ\n"; //vertrekdatum velden[1] = "vertrek"; } if (!fnCheckEmptyBox(x,'kampeermiddel')) { mesg_verplicht += " - Équipement\n"; //kampeermiddel velden[2] = "kampeermiddel[1]"; } if (!fnCheckEmpty(x.naam)) { mesg_verplicht += " - Nom\n"; //naam velden[3] = "naam"; } if (!fnCheckEmpty(x.adres)) { mesg_verplicht += " - Adresse\n"; //adres velden[4] = "adres"; } if (!fnCheckEmpty(x.plaats)) { mesg_verplicht += " - Localité\n"; //plaats velden[5] = "plaats"; } if (x.land.value == -1) { mesg_verplicht += " - Pays\n"; //land velden[6] = "land"; } if (!fnCheckEmptyBox(x,'resptaal')) { mesg_verplicht += " - Je vous saurais gré de me faire parvenir une confirmation de réservation.Veuillez me répondre dans l\'une des langues suivantes\n"; // velden[7] = "resptaal[1]"; } if (mesg_verplicht != '') { melding = "Les champs suivants sont obligatoires :\n"; //De volgende velden zijn verplicht: melding += "------------------------------------------\n\n"; melding += mesg_verplicht + " "; for (i=0;i<8;i++) { veld = velden[i]; elmt = document.forms["f_resv"].elements[veld]; if (elmt){ elmt.focus(); break; } } alert(melding); return false; } else{ if( confirm("Souhaitez-vous qu\'Eurocampings.net conserve provisoirement vos coordonnées, pour qu’à l’avenir elles puissent être consignées automatiquement ?\n\n- Pressez sur \'OK\' pour sauvegarder les données.\n- Pressez sur \'Annuler\' si vous ne souhaitez pas faire usage de ce service.\n\n") ){ x.use_cookie.value = 1; } return true; } } function fnMailReservationForm(x) { var camp_mail = "de.kempenheuvel@telenet.be" var allValid = fnCheckReservationForm(x) if (allValid) { if (x.mail.value.length > 5 && x.mail.value.indexOf("@") != -1 && x.mail.value.indexOf(".") != -1) { x.camp_mail.value = camp_mail printreservation = open("/dialogs/printreservation.html","printreservation","width=700,height=500,left=0,top=0,scrollbars=yes,toolbar=no,menubar=yes,statusbar=no") printreservation.focus() x.submit() } else { melding = "Les champs suivants sont incorrects :\n"; //De volgende velden zijn onjuist: melding += "------------------------------------------\n\n"; melding += " - E-mail\n"; //Email alert(melding); x.mail.focus() } } } function fnPrintReservationLetter(x) { x.camp_mail.value = "" var allValid = fnCheckReservationForm(x) if (allValid) { printreservation = open("/dialogs/printreservation.html","printreservation","width=700,height=500,left=0,top=0,scrollbars=yes,toolbar=no,menubar=yes,statusbar=no"); printreservation.focus(); x.submit() } } //************************************************************************** // END Reservation request javascript //*************************************************************************** function open_calender(f) { aankomst = ""; vertrek = ""; links = screen.availWidth - ((screen.availWidth-796)/2 + 570); boven = 120; if (!isNaN(f.vertrek_j.value) && !isNaN(f.vertrek_m.value) && !isNaN(f.vertrek.value) && f.vertrek_j.value != "" && f.vertrek_m.value != "" && f.vertrek.value != "" ) aankomst = "sess_date_fend=" + f.vertrek_j.value + "-" + f.vertrek_m.value + "-" + f.vertrek.value if (!isNaN(f.aankomst_j.value) && !isNaN(f.aankomst_m.value) && !isNaN(f.aankomst.value) && f.aankomst_j.value != "" && f.aankomst_m.value != "" && f.aankomst.value != "") vertrek = "sess_date_fstart=" + f.aankomst_j.value + "-" + f.aankomst_m.value + "-" + f.aankomst.value if (aankomst != ""){ aankomst = "?" + aankomst if (vertrek != "") vertrek = "&" + vertrek } else { if (vertrek != "") vertrek = "?" + vertrek } var formname = '&formname=' + f.name; check = open("/dialogs/pop_kalender.html" + aankomst + vertrek + formname ,"check","width=560,height=270,left="+links+",top="+boven+",toolbar=no,menubar=0,status=no,scrollbars=no,resizable=no"); check.focus(); } function fnCheckEmptyBox(x,f) { validBox = false var countElements = x.elements.length for (i=0;i'; bGoogleMapsLoaded = true; init(); if (document.body.scrollHeight) { window.scrollTo(0, document.body.scrollHeight); } else if (screen.height) { // IE5 window.scrollTo(0, screen.height); } } }