﻿$(document).ready(function(){function a(d,e){if(window.sidebar){window.sidebar.addPanel(d,e,"")}else{if(window.opera&&window.print){var c=document.createElement("a");c.setAttribute("href",e);c.setAttribute("title",d);c.setAttribute("rel","sidebar");c.click()}else{if(document.all){window.external.AddFavorite(e,d)}}}}var b=0;$(".widgetPhotoGallery").each(function(){$(this).append("<ul style='padding: 0;'></ul>").addClass("shadowBoxGallery").attr({id:"gallery"+b});$(this).find(".galleryImgThumb").each(function(){var e=$(this).css("backgroundImage");var e=e.replace("url(","").replace(")","");e=e.replace(/\s/g,"%20");var d=$(this).attr("href");d=d.replace(/\s/g,"%20");var c=$(this).attr("title");$("#gallery"+b+" ul").append("<li class='shadowBoxThumbs'><a title='"+c+"' href="+d+" rel='shadowbox[gallery"+b+"]'><img src="+e+" /></a></li>")});b+=1});$(".shadowBoxThumbs").css({"list-style-type":"none",display:"inline"});$(".galleryImgFullShell, .imgDescriptionShell, .imgPreviousNextShell, .imgThumbnailsOuterShell").remove();Shadowbox.setup()});$(document).ready(function(){if($("ul#subNavDownLinks").length){$("#subNav").remove()}$("#sash").prependTo($("header"))});function validate(d){error="";var e=new Date();var a;var g;var f;var h;g=d.numChildren.value;f=d.numAdults.value;h=d.numberOfRooms.value;a=d.arrivaldate.value.split("/");var b=new Date();arrival_day=a[1];arrival_month=a[0];arrival_year=a[2];b.setMonth(arrival_month-1);b.setDate(arrival_day);b.setYear(arrival_year);departure=d.departuredate.value.split("/");var c=new Date();departure_day=departure[1];departure_month=departure[0];departure_year=departure[2];c.setMonth(departure_month-1);c.setDate(departure_day);c.setYear(departure_year);if(b<e){error+="Arrival date is prior to current date\n"}if(c<e){error+="Departure date is prior to current date\n"}if(c<=b){error+="Departure date cannot be earlier than arrival date\n"}if(error==""){document.hiddenbookingform.numRooms.value=h;document.hiddenbookingform.numChildren.value=g;document.hiddenbookingform.numAdults.value=f;document.hiddenbookingform.arrivalDay.value=arrival_day;document.hiddenbookingform.arrivalMonth.value=arrival_month;document.hiddenbookingform.arrivalYear.value=arrival_year;document.hiddenbookingform.departureDay.value=departure_day;document.hiddenbookingform.departureMonth.value=departure_month;document.hiddenbookingform.departureYear.value=departure_year;dcsMultiTrack("DCSext.ecommercedelivery","Customers Delivered to Booking Engine");document.hiddenbookingform.submit();return false}else{alert(error);return false}};
