function loadfd(form){checkVal=document.DateSelect.fd.selectedIndex;if(checkVal==30){checkVal=checkVal-1;}
document.DateSelect.td.options[checkVal+1].selected=1;}
function loadfm(form){checkVal=document.DateSelect.fm.selectedIndex;document.DateSelect.tm.options[checkVal].selected=1;}
function loadfy(form){checkVal=document.DateSelect.fy.selectedIndex;document.DateSelect.ty.options[checkVal].selected=1;}
var wdArray=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")
function setWkd(form){for(var i=0;i<document.DateSelect.fy.length;i++){if(document.DateSelect.fy.options[i].selected)
var fyear=document.DateSelect.fy.options[i].text;if(document.DateSelect.ty.options[i].selected)
var tyear=document.DateSelect.ty.options[i].text;}
var checkinDate=new Date(fyear,document.DateSelect.fm.selectedIndex,document.DateSelect.fd.selectedIndex+1);var checkoutDate=new Date(tyear,document.DateSelect.tm.selectedIndex,document.DateSelect.td.selectedIndex+1);document.DateSelect.inWd.value="("+wdArray[checkinDate.getDay()]+")"
document.DateSelect.outWd.value="("+wdArray[checkoutDate.getDay()]+")"
var numNights=Math.round((checkoutDate-checkinDate)/86400000)
if(numNights<1)numNights="?????";else if(numNights==1)numNights;else numNights;form.lengthStay.value=numNights
document.all["stay"].innerHTML=numNights;}
function submitlangform(){document.langform.submit();}
function chkdaterange(){var ar,de
errmsg="";ar=(document.DateSelect.fy.value+document.DateSelect.fm.value+document.DateSelect.fd.value)*1;de=(document.DateSelect.ty.value+document.DateSelect.tm.value+document.DateSelect.td.value)*1;today=20100305*1;if((document.DateSelect.fm.value==2&&document.DateSelect.fd.value>29)||(document.DateSelect.tm.value==2&&document.DateSelect.td.value>29))
{errmsg=errmsg+"Wrong Date Period.\n";}
else if((document.DateSelect.fm.value==4&&document.DateSelect.fd.value>30)||(document.DateSelect.fm.value==6&&document.DateSelect.fd.value>30)||(document.DateSelect.fm.value==9&&document.DateSelect.fd.value>30)||(document.DateSelect.fm.value==11&&document.DateSelect.fd.value>30)||(document.DateSelect.tm.value==4&&document.DateSelect.td.value>30)||(document.DateSelect.tm.value==6&&document.DateSelect.td.value>30)||(document.DateSelect.tm.value==9&&document.DateSelect.td.value>30)||(document.DateSelect.tm.value==11&&document.DateSelect.td.value>30))
{errmsg=errmsg+"Wrong Date Period.\n";}
else if(ar>=de)
{errmsg=errmsg+"Wrong Date Period.\n";}
else if(ar<today||de<today)
{errmsg=errmsg+"The dates selected are invalid.\nArrival Date entered is prior to today's date.\n";}
if(errmsg!="")
{alert(errmsg);return false;}}
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
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_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}
var fadeimages=new Array()
fadeimages[0]=["images/preview/01.jpg","",""]
fadeimages[1]=["images/preview/02.jpg","",""]
fadeimages[2]=["images/preview/03.jpg","",""]
fadeimages[3]=["images/preview/04.jpg","",""]
fadeimages[4]=["images/preview/05.jpg","",""]
fadeimages[5]=["images/preview/06.jpg","",""]
fadeimages[6]=["images/preview/07.jpg","",""]
fadeimages[7]=["images/preview/08.jpg","",""]
fadeimages[8]=["images/preview/09.jpg","",""]
fadeimages[9]=["images/preview/10.jpg","",""]
fadeimages[10]=["images/preview/11.jpg","",""]
var fadebgcolor="white"
var fadearray=new Array()
var fadeclear=new Array()
var dom=(document.getElementById)
var iebrowser=document.all
function fadeshow(theimages,fadewidth,fadeheight,borderwidth,delay,pause,displayorder){this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=20
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if(typeof displayorder!="undefined")
theimages.sort(function(){return 0.5-Math.random();})
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array()
for(p=0;p<theimages.length;p++){this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]}
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
if(iebrowser&&dom||dom)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
if(iebrowser&&dom||dom)
this.startit()
else{this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()",this.delay)}}
function fadepic(obj){if(obj.degree<100){obj.degree+=10
if(obj.tempobj.filters&&obj.tempobj.filters[0]){if(typeof obj.tempobj.filters[0].opacity=="number")
obj.tempobj.filters[0].opacity=obj.degree
else
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"}
else if(obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if(obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if(obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101}
else{clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")?obj.canvasbase+"_0":obj.canvasbase+"_1"
obj.tempobj=iebrowser?iebrowser[obj.nextcanvas]:document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj,obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)?obj.nextimageindex+1:0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()",obj.delay)}}
fadeshow.prototype.populateslide=function(picobj,picindex){var slideHTML=""
if(this.theimages[picindex][1]!="")
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if(this.theimages[picindex][1]!="")
slideHTML+='</a>'
picobj.innerHTML=slideHTML}
fadeshow.prototype.rotateimage=function(){if(this.pausecheck==1)
var cacheobj=this
if(this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()},100)
else if(iebrowser&&dom||dom){this.resetit()
var crossobj=this.tempobj=iebrowser?iebrowser[this.curcanvas]:document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")?this.canvasbase+"_1":this.canvasbase+"_0"}
else{var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src}
this.curimageindex=(this.curimageindex<this.postimages.length-1)?this.curimageindex+1:0}
fadeshow.prototype.resetit=function(){this.degree=10
var crossobj=iebrowser?iebrowser[this.curcanvas]:document.getElementById(this.curcanvas)
if(crossobj.filters&&crossobj.filters[0]){if(typeof crossobj.filters[0].opacity=="number")
crossobj.filters(0).opacity=this.degree
else
crossobj.style.filter="alpha(opacity="+this.degree+")"}
else if(crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if(crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if(crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101}
fadeshow.prototype.startit=function(){var crossobj=iebrowser?iebrowser[this.curcanvas]:document.getElementById(this.curcanvas)
this.populateslide(crossobj,this.curimageindex)
if(this.pausecheck==1){var cacheobj=this
var crossobjcontainer=iebrowser?iebrowser["master"+this.slideshowid]:document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}}
this.rotateimage()}
var thumbgallery={enableTitle:true,enableTransition:true,hideimgmouseout:false,iefilterstring:'progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)',iefiltercapable:document.compatMode&&window.createPopup?true:false,preloadedimages:[],targetlinks:[],alreadyrunflag:false,loadimage:function(linkobj){var imagepath=linkobj.getAttribute("href")
var showcontainer=document.getElementById(linkobj.getAttribute("rev").split("::")[0])
var dest=linkobj.getAttribute("rev").split("::")[1]
var description=(thumbgallery.enableTitle&&linkobj.getAttribute("title"))?linkobj.getAttribute("title"):""
var imageHTML='<img src="'+imagepath+'" style="border-width: 0" />'
if(typeof dest!="undefined")
imageHTML='<a href="'+dest+'">'+imageHTML+'</a>'
if(description!="")
imageHTML+='<br />'+description
if(this.iefiltercapable){showcontainer.style.filter=this.iefilterstring
showcontainer.filters[0].Apply()}
showcontainer.innerHTML=imageHTML
this.featureImage=showcontainer.getElementsByTagName("img")[0]
this.featureImage.onload=function(){if(thumbgallery.iefiltercapable)
showcontainer.filters[0].Play()}
this.featureImage.onerror=function(){if(thumbgallery.iefiltercapable)
showcontainer.filters[0].Stop()}},hideimage:function(linkobj){var showcontainer=document.getElementById(linkobj.getAttribute("rev").split("::")[0])
showcontainer.innerHTML=""},cleanup:function(){if(this.featureImage){this.featureImage.onload=null;this.featureImage.onerror=null;this.featureImage=null}
this.showcontainer=null
for(var i=0;i<this.targetlinks.length;i++){this.targetlinks[i].onclick=null
this.targetlinks[i].onmouseover=null
this.targetlinks[i].onmouseout=null}},addEvent:function(target,functionref,tasktype){var tasktype=(window.addEventListener)?tasktype:"on"+tasktype
if(target.addEventListener)
target.addEventListener(tasktype,functionref,false)
else if(target.attachEvent)
target.attachEvent(tasktype,functionref)},init:function(){this.iefiltercapable=(this.iefiltercapable&&this.enableTransition)
var pagelinks=document.getElementsByTagName("a")
for(var i=0;i<pagelinks.length;i++){if(pagelinks[i].getAttribute("rel")&&/enlargeimage:/i.test(pagelinks[i].getAttribute("rel"))){var initType=pagelinks[i].getAttribute("rel").split("::")[1]
if(initType=="mouseover"){this.preloadedimages[this.preloadedimages.length]=new Image()
this.preloadedimages[this.preloadedimages.length-1].src=pagelinks[i].href
pagelinks[i]["onclick"]=function(){return false}}
pagelinks[i]["on"+initType]=function(){thumbgallery.loadimage(this)
return false}
if(this.hideimgmouseout)
pagelinks[i]["onmouseout"]=function(){thumbgallery.hideimage(this)}
this.targetlinks[this.targetlinks.length]=pagelinks[i]}}}}
if(document.addEventListener)
thumbgallery.addEvent(document,function(){thumbgallery.alreadyrunflag=1;thumbgallery.init()},"DOMContentLoaded")
else if(document.all&&document.getElementsByTagName("a").length>0){thumbgallery.alreadyrunflag=1
thumbgallery.init()}
thumbgallery.addEvent(window,function(){if(!thumbgallery.alreadyrunflag)thumbgallery.init()},"load")
thumbgallery.addEvent(window,function(){thumbgallery.cleanup()},"unload")

function internetRate(){
	showModalDialog ("internet-rates.html", "dialogWidth:620px; dialogHeight:600px; location:no; status:no; dialogLeft:0; dialogTop:0");
}
function Cancellations(){
	showModalDialog ("cancellations.html", "dialogWidth:620px; dialogHeight:600px; location:no; status:no; dialogLeft:0; dialogTop:0");
}
