function dS(g,dB){var text=document.createElement("p");text.innerHTML="Login";var aE=document.createElement("label");aE.innerHTML= "email";aE.htmlFor= "asyncEmail";X=document.createElement("input");X.id= "asyncEmail";X.type="text";X.onkeypress=function(event){if(event&&event.keyCode==13){if(this.V.value!="")dB(this.value,this.V.value);else this.V.focus();}};var av=document.createElement("label");av.innerHTML= "password";av.htmlFor= "asyncPassword";O=document.createElement("input");O.id= "asyncPassword";O.type= "password";O.onkeypress=function(event){event=event?event:window.event;if(event&&event.keyCode==13){if(this.bp.value!="")dB(this.bp.value,this.value);else this.bp.focus();}};X.V=O;O.bp=X;var button=document.createElement("button");button.className= "submit";button.bp=X;button.V=O;button.onclick=function(){dB(this.bp.value,this.V.value);};ap.bc(g);g.appendChild(text);g.appendChild(aE);g.appendChild(X);g.appendChild(av);g.appendChild(O);g.appendChild(button);};function dX(A){var menu=null;var C=document.getElementById(A.cX);if(C!=undefined){menu=new bC(C,A.aV);if(A.bt!=undefined)menu.bt=A.bt;if(A.cc!=undefined)menu.cc=A.cc;if(A.ac!=undefined)menu.ac=A.ac;if(A.bu!=undefined)menu.bu=A.bu;if(A.aR!=undefined)menu.aR=A.aR;if(A.aK!=undefined)menu.aK=A.aK;}return menu;};function T(){var div=document.createElement("div");div.id="Loading";var image=document.createElement("img");image.src= "/images/general/loading.gif";image.alt=image.title= "LOADING";image.style.cssFloat="none";var text=document.createElement("p");text.innerHTML="Loading";text.appendChild(image);div.appendChild(text);return div;};function bE(F){var D=null;var div=F.C;if(div!=undefined){D=new v(div);if(F.Q!=undefined)D.Q=F.Q;if(F.ae!=undefined)D.ae=F.ae;if(F.as!=undefined)D.as=F.as;if(F.aL!=undefined)D.aL(F.aL);}return D;};function dQ(f){var K=null;var C=document.getElementById(f.cX);if(C!=null){K=new I(C,f.ct);if(f.fn!=undefined)K.fn=f.fn;if(f.pause!=undefined)K.pause=f.pause;;if(f.cb!=undefined)K.cb=f.cb;if(f.bs!=undefined)K.bs=f.bs;if(f.bB!=undefined)K.bB=f.bB;if(f.U!=undefined)K.U=f.U;if(f.aj!=undefined)K.aj=f.aj;if(f.ao!=undefined)K.ao=f.ao;if(f.aQ!=undefined)K.aQ=f.aQ;}return K;};function fK(image){document.body.style.backgroundImage="url('"+image.src+"')";};function du(){var body=document.getElementById("body");var search=document.getElementById("search");if((search.bK==undefined)||(!search.bK)){body.bi(false);search.style.display="block";search.bK=true;PositionSearch();window.onresize=PositionSearch;}else{body.bi(true);search.style.display="none";search.bK=false;window.onresize=null;}return false;};function PositionSearch(){if(ap.w().indexOf("MSIE")>=0)document.getElementById("search").style.left=Math.max((document.documentElement.clientWidth/2)-481,0)+"px";else document.getElementById("search").style.left=Math.max((window.innerWidth/2)-489,0)+"px";};function TitlePopup(){TitlePopup.popup=document.createElement("DIV");TitlePopup.popup.id= "titlePopup";TitlePopup.popup.style.display= "none";document.body.appendChild(TitlePopup.popup);var elements=document.getElementsByTagName("*");for(var i=0;i<elements.length;i++){var style=elements[i].getAttribute("style");if((style!=null)&&(typeof style=='object'))style=style.cssText.toLowerCase();if(style!=null){if(style.indexOf("quotes")>=0){var d=elements[i];d.hiddenTitle=d.title;d.title=d.alt="";d.onmouseover=function(mouseEvent){var objectPosition=ap.aC(this);objectPosition.x+=this.offsetWidth;objectPosition.y+=this.offsetHeight;TitlePopup.popup.innerHTML=this.hiddenTitle;TitlePopup.popup.style.top=objectPosition.y+"px";TitlePopup.popup.style.left=objectPosition.x+"px";TitlePopup.popup.style.display= "block";if(objectPosition.x+TitlePopup.popup.offsetWidth>document.body.scrollWidth)TitlePopup.popup.style.left=(document.body.scrollWidth-TitlePopup.popup.offsetWidth)+"px";if(objectPosition.y+TitlePopup.popup.offsetHeight>document.body.scrollHeight)TitlePopup.popup.style.top=(document.body.scrollHeight-TitlePopup.popup.offsetHeight)+"px";};d.onmouseout=function(mouseEvent){TitlePopup.popup.style.display= "none";};}}}};function apImportScript(url){dg=document.createElement("script");dg.src=url;dg.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(dg);};var googlePageTracker;function googleAnylitics(){ 
	try 
	{  
		googlePageTracker = _gat._getTracker("UA-221794-1");
		googlePageTracker._initData();
		googlePageTracker._trackPageview();
	}
	catch(err) {}
	 };function gh(){googleAnylitics();if(ap.w()=="MSIE 6.0")dX({cX:"MainNav",aV:{x:20,y:26},aK:"auto"});else dX({cX:"MainNav",aV:{x:0,y:29},aK:"auto"});var K=dQ({cX:"SlideShow",ct:"/featured/SlideShow_Slides.htm",pause:7000});if(K!=null){var ai=document.getElementById("SlideShow_Controls_Pause");K.ei(ai);var J=document.getElementById("SlideShow_Controls_Previous");K.dD(J);var az=document.getElementById("SlideShow_Controls_Next");K.SetNextButton(az);}var g=document.createElement("div");g.id="asyncLogin";var aY=document.createElement("div");aY.id= "asyncBackground";ap.ah(aY,50);var cz=document.createElement("div");g.appendChild(aY);g.appendChild(cz);var dk=new ApAsyncLogin(cz,dS);if(loginAs!=null){dk.dF(dk.eR(loginAs));}document.body.appendChild(g);var body=document.getElementById("body");new n(body);var searchButtons=document.getElementsByClassName("searchButton");for(var i=0;i<searchButtons.length;i++)searchButtons[i].onclick=du;document.getElementById("search_close").onclick=du;var links=document.getElementById("search").getElementsByTagName("A");for(var i=0;i<links.length;i++){if((links[i].className=="submit")||((links[i].className=="submitText"))){links[i].onclick=function(){this.blur();var searchForm=this.parentNode;while((searchForm!=null)&&(searchForm.nodeName!="FORM"))searchForm=searchForm.parentNode;searchForm.submit();return false;}}}if(this.location.href.indexOf("#search")>0)du();var bY=document.getElementById("searchResults");if(bY!=null)bw(bY);var dq;var H=document.getElementById("bookingDates");if(H!=null)dq=new eT(H);var RHS=document.getElementById("RHS");if(RHS.className== "bookingForm")new fi();var images=document.getElementById("pictures");if(images!=null)new ba(images);aw();TitlePopup();aZ();if(!document.getElementById("search_area_jersey").checked&& !document.getElementById("search_area_guernsey").checked){document.getElementById("search_area_jersey").checked=true;document.getElementById("search_area_guernsey").checked=true;}} 
//apImportScript("/scripts/cssHax.js");
apImportScript("/scripts/ApCore.js");
apImportScript("/scripts/ApDDM.js");
apImportScript("/scripts/ApAsync.js");
apImportScript("/scripts/ApSlideShow.js");
apImportScript("/scripts/ApAsyncLogin.js");
apImportScript("/scripts/ApEvents.js");
apImportScript("/scripts/ApCMS.js");
apImportScript("/scripts/Availabilty.js");
apImportScript("/scripts/ValidateSubmit.js");
apImportScript("/scripts/BookingForm.js");
apImportScript("/scripts/ImageSwap.js");
apImportScript("/scripts/Contact.js");
apImportScript("/scripts/SearchState.js");

//apImportScript("http://www.google-analytics.com/ga.js");
apImportScript("/scripts/ga.js");

 window.onload=function(){setTimeout("gh()",100)};var loginAs=null;function bn(){var aB=bm();if(aB=="MSIE 6.0"){ax("/styles/ie6Hax.css");}if(aB=="MSIE 7.0"){ax("/styles/ie7Hax.css");}if(aB=="MSIE 8.0"){ax("/styles/ie8Hax.css");}if(aB=="Safari"){ax("/styles/safariHax.css");}};function ax(url){var head=document.getElementsByTagName("head")[0];var aJ=document.createElement("link");aJ.setAttribute("rel","stylesheet");aJ.setAttribute("type","text/css");aJ.setAttribute("href",url);head.appendChild(aJ);};function bm(){if(navigator.userAgent.indexOf("MSIE 6.0")> -1){return "MSIE 6.0";}if(navigator.userAgent.indexOf("MSIE 7.0")> -1){return "MSIE 7.0";}if(navigator.userAgent.indexOf("MSIE 8.0")> -1){return "MSIE 8.0";}if(navigator.userAgent.indexOf("Firefox")> -1){return "Firefox";}if(navigator.userAgent.indexOf("Safari")> -1){return "Safari";}if(navigator.userAgent.indexOf("Opera")> -1){return "Opera";}return "unknown";};bn();