var black_overlay=document.getElementById("black_overlay");var white_content=document.getElementById("white_content");var topbarslideshow=document.getElementById("topbarslideshow");function isIE(){if(navigator.userAgent.indexOf("MSIE")!=-1){return true}return false}function floatElement(a,b){if(isIE()){a.style.styleFloat=b}else{a.style.cssFloat=b}}function MenuButtonOver(b){var c=b.id.split("_");if(b.parentNode.parentNode.parentNode.id=="footermenubar"){b.style.backgroundPosition="-"+c[1]+"px -60px"}else{b.style.backgroundPosition="0px -"+c[1]+"px"}}function MenuButtonOut(b){var c=b.id.split("_");if(b.parentNode.parentNode.parentNode.id=="footermenubar"){b.style.backgroundPosition="-"+c[1]+"px -90px"}else{b.style.backgroundPosition="-200px -"+c[1]+"px"}}function detailsBoxOn(a){if(a){if(!/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(a)){alert("Invalid Email Address");return false}}document.getElementById("black_overlay").style.display="block";document.getElementById("white_content").style.display="block";document.getElementById("topbarslideshow").style.left="-2000px";if(a){document.getElementById("detailsEmail").value=a}}function detailsBoxOff(){document.getElementById("black_overlay").style.display="none";document.getElementById("white_content").style.display="none";document.getElementById("topbarslideshow").style.left="0px"}function validateDetailsForm(){if(document.getElementById("field51").value!="field51"||document.getElementById("getincognito").value!="getincognito"){alert("Sorry, there was a technical error processing the form");return false}if(!/^[A-Za-z .]{1,100}$/.test(document.getElementById("detailsName").value)){alert("The first name field must only contain letters, dots and spaces and be between 1 and 100 characters in length");return false}if(!/^[A-Za-z0-9 .\n\r]{1,255}$/.test(document.getElementById("detailsAddress").value)){alert("The address field must only contain letters, numbers, dots, commas and spaces and be between 1 and 255 characters in length");return false}document.getElementById("detailsEmail").value=document.getElementById("detailsEmail").value.toLowerCase();if(!/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(document.getElementById("detailsEmail").value)){alert("The email address you entered is invalid");return false}if(!document.getElementById("checkSkiHolidays").checked&&!document.getElementById("checkHoneymoons").checked&&!document.getElementById("checkWinterSun").checked&&!document.getElementById("checkLongHaul").checked&&!document.getElementById("checkCruiseHolidays").checked&&!document.getElementById("checkSummerHolidays").checked&&!document.getElementById("checkCityBreaks").checked&&!document.getElementById("checkFlightsFromOxford").checked&&!document.getElementById("checkTailorMade").checked&&!document.getElementById("checkSpecialInterestTours").checked){alert("Please select at least one area of interest");return false}if(!/^[0-9 ]{1,30}$/.test(document.getElementById("detailsNumber").value)){alert("The contact number field must only contain numbers and spaces and be between 1 and 30 characters in length");return false}if(!/^(.|\r|\n){1,1000}$/.test(document.getElementById("detailsHolidayRequirements").value)){alert("The holiday requirements field must be between 1 and 1000 characters in length");return false}if(!/^[0-9,\$\u00A3]{1,10}$/.test(document.getElementById("detailsBudget").value)){alert("The budget field must only contain numbers, commas and dollar/pound signs and be between 1 and 10 characters in length");return false}if(!/^[A-Za-z .]{1,100}$/.test(document.getElementById("detailsAdvertised").value)){alert('The "Where have you seen us advertised field must only contain letters, dots and spaces and be between 1 and 100 characters in length');return false}return true}function submitDetailsForm(){if(!validateDetailsForm()){return false}document.getElementById("details-message").style.display="block";$("detailsForm").set("send",{url:"scripts/submitGreatOffersForm.php",method:"post",onFailure:function(a){alert("Sorry, there was an error submitting the form, please try again later.");document.getElementById("details-message").style.display="none";detailsBoxOff()},onSuccess:function(b,a){if(b=="noerror"){alert("Form submitted, thank you.");document.getElementById("details-message").style.display="none";detailsBoxOff()}else{alert("Sorry, there was an error submitting the form, please try again later.");document.getElementById("details-message").style.display="none";detailsBoxOff()}}});document.getElementById("detailsForm").send();return false}function responseDetailsForm(a,b){}function topBarEmailAddressKeyUp(){if(event.keyCode&&event.keyCode==13){detailsBoxOn(document.getElementById("topBarEmailAddress").value)}};