function openPictureWindow(imageName,imageWidth,imageHeight,alt,posLeft,posTop){newWindow=window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);newWindow.document.open();newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');newWindow.document.write('<img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt='+alt+'>');newWindow.document.write('</body></html>');newWindow.document.close();newWindow.focus();}
function externalLinks(){if(!document.getElementsByTagName)return;var anchors=document.getElementsByTagName("a");for(var i=0;i<anchors.length;i++){var anchor=anchors[i];if(anchor.getAttribute("href")&&anchor.getAttribute("rel")=="_blank")
anchor.target="_blank";}}
function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_validateForm(){var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;for(i=0;i<(args.length-2);i+=3){test=args[i+2];val=MM_findObj(args[i]);if(val){nm=val.name;if((val=val.value)!=""){if(test.indexOf('isEmail')!=-1){p=val.indexOf('@');if(p<1||p==(val.length-1))errors+='You do not appear to have entered a valid email address \n';}else if(test!='R'){num=parseFloat(val);if(isNaN(val))errors+='- '+nm+' must contain a number.\n';if(test.indexOf('inRange')!=-1){p=test.indexOf(':');min=test.substring(8,p);max=test.substring(p+1);if(num<min||max<num)errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';}}}else if(test.charAt(0)=='R')errors+='- '+nm+' is required.\n';}}if(errors)alert(errors);document.MM_returnValue=(errors=='');}
function setCookie(){var cookiexists=getCookie("Referer");var referer=escape(document.referrer);var referer=referer.replace("http%3A//","");var referer2=referer.replace("www.","");var myDomain=document.domain.replace("www.","");var adWords=getURLParam("PPC");if(referer2.indexOf(myDomain)==0){referer="";}
if(referer!=""&&!cookiexists){var exp=new Date()
var expires=exp.getTime()+(275*24*60*60*1000)
exp.setTime(expires);document.cookie="Referer="+referer+"; expires="+exp.toGMTString()+"; path=/";var searchfor=/ppc%253dadwords/;var searchstring=referer.toLowerCase();var matchPos1=searchstring.search(searchfor);if(matchPos1!=-1||adWords.toLowerCase()=="adwords"){document.cookie="Landed=AdWords"+"; expires="+exp.toGMTString()+"; path=/";}}}
function getURLParam(strParamName){var strReturn="";var strHref=window.location.href;if(strHref.indexOf("?")>-1){var strQueryString=strHref.substr(strHref.indexOf("?")).toLowerCase();var aQueryString=strQueryString.split("&");for(var iParam=0;iParam<aQueryString.length;iParam++){if(aQueryString[iParam].indexOf(strParamName.toLowerCase()+"=")>-1){var aParam=aQueryString[iParam].split("=");strReturn=aParam[1];break;}}}
return unescape(strReturn);}
function getCookie(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1)
{c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}
return"";}
function ValidateFeedback(Form)
{if(Form.name.value=="")
{alert("Please enter your Name");Form.name.focus();return(false);}
if(Form.email.value=="")
{alert("Please enter your Email Address");Form.email.focus();return(false);}
if(Form.phone.value=="")
{alert("Please enter a telephone number on which we can contact you");Form.phone.focus();return(false);}
if(Form.comments.value=="")
{alert("Please enter your feedback");Form.comments.focus();return(false);}
return(true);}
function ValidateReservation(Form)
{if(Form.fname.value=="")
{alert("Please enter your First Name");Form.fname.focus();return(false);}
if(Form.lname.value=="")
{alert("Please enter your Last (Family) Name");Form.lname.focus();return(false);}
if(Form.email.value=="")
{alert("Please enter your Email Address");Form.email.focus();return(false);}
if(Form.phone.value=="")
{alert("Please enter a telephone number on which we can contact you");Form.phone.focus();return(false);}
if(Form.address1.value=="")
{alert("Please enter your Address");Form.address1.focus();return(false);}
if(Form.city.value=="")
{alert("Please enter your City or Town of residence");Form.city.focus();return(false);}
if(Form.state.value=="")
{alert("Please enter the State, Country or Province");Form.state.focus();return(false);}
if(Form.postcode.value=="")
{alert("Please enter your Zip or Post Code (or type 'none' if not applicable)");Form.postcode.focus();return(false);}
if(Form.arrival.value=="")
{alert("Please enter your date of arrival");Form.arrival.focus();return(false);}
if(Form.departure.value=="")
{alert("Please enter your date of departure");Form.departure.focus();return(false);}
return(true);}
