// Do not edit this compressed file. Download, rename & edit the master version of it.
gPopUpMsg="";function clearField(field){if(field.value==field.defaultValue)field.value="";}
function checkField(field){if(field.value=="")field.value=field.defaultValue;}
function tellAFriend(propType,theURL){PopUp.openWin("tell_a_fiend.html",0,0,1,0,600,560,1,1,2);PopUp.linkToWin();gPopUpMsg="Check out this "+propType+" offered by Tropical Villa Vacations. Point your browser to "+theURL;}
function pageType(pattern1,pattern2){var thisPage=document.location.href;return(thisPage.indexOf(pattern1)!=-1||thisPage.indexOf(pattern2)!=-1);}
function getHeaderPhotos(){var yachtPg=(fileName=="yacht.html"||qStr&&qStr.indexOf("yacht-")>=0);var calPg=(fileName=="calendar.html"||fileName=="calendar.aspx"||fileName=="calendar-villa.aspx"||fileName=="calendar-villa.html");var photoGal=(qStr&&qStr.getVal("data")&&qStr.getVal("data").substring(0,3)=="pg-");var nRandom=(yachtPg)?7:getRandomNum(null);var photos='<IMG SRC="images/header_photo' + nRandom + '.jpg" BORDER=0 WIDTH=428 HEIGHT=151 HSPACE=0 VSPACE=0>';var randomDisplay=(!qStr||qStr.indexOf("data=")==-1||yachtPg||calPg||photoGal);if(randomDisplay)return photos;else{var phot1=(Villa.HeaderPhotoTitle1);var phot2=(Villa.HeaderPhotoTitle1);if(!phot1&&!phot2)return photos;else{var bordCol='#fed901';document.write("<STYLE>.imgBorder { border:1px solid "+bordCol+" }</STYLE>");var IMG_WID='148';var IMG_HGT='110';var imgMsg1='';var imgMsg2='';if(local){imgMsg1='NAME:header1.jpg  Width:'+IMG_WID+'  Height:'+IMG_HGT;imgMsg2='NAME:header2.jpg  Width:'+IMG_WID+'  Height:'+IMG_HGT;}
var phot1Str='';var pH='';phot2Str='';var phot1Tit='';var phot2Tit='';var imgPath="images/"+dataFile.replace(/^data\/fs-|\.js$/g, "" ) + "/";
if(phot1){phot1Str='<TD><IMG SRC="' + imgPath + '/header1.jpg" BORDER=0 WIDTH='+IMG_WID+' HEIGHT='+IMG_HGT+'  HSPACE=0 VSPACE=5 ALT="' + imgMsg1 + '" onMouseover="self.status=alt; return true;" CLASS=imgBorder></TD>';phot1Tit='<TD ALIGN=center CLASS=fSize9>'+Villa.HeaderPhotoTitle1+'</TD>';}
if(phot1&&phot2)pH='<TD WIDTH=30>&nbsp;</TD>';if(phot2){phot2Str='<TD><IMG SRC="' + imgPath + '/header2.jpg" BORDER=0 WIDTH='+IMG_WID+' HEIGHT='+IMG_HGT+' HSPACE=0 VSPACE=5 ALT="' + imgMsg2 + '" onMouseover="self.status=alt; return true;" CLASS=imgBorder></TD>';phot2Tit='<TD ALIGN=center CLASS=fSize9>'+Villa.HeaderPhotoTitle2+'</TD>';}
var html='<TR>'+phot1Str+pH+phot2Str+pH+'</TR><TR>'+phot1Tit+pH+phot2Tit+pH+'</TR>';}
photos=''+'<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=428><!--NESTED-->'+'<TR>'+'<TD><!--NESTED-->'+'<TABLE ALIGN=center BORDER=0 CELLSPACING=0 CELLPADDING=0>'+html+'</TABLE>'+'</TD>'+'</TR>'+'</TABLE>';}
return photos;}
function getPageHeader(pageTitle){if(pageTitle||fileName=="listings.html"){var pageHeader="<table align='center' border='0' cellspacing='0' cellpadding='0'><tr><td style='padding:0px 0px 15px 0px;'><img src='images/LogoTVV02.png' border='0' width='235' height='118' hspace='0' vspace='0'></td></tr>";if(pageTitle)pageHeader+="<tr><td style='text-align:center; padding:0px 0px 15px 0px; font-size:13pt; font-variant:small-caps;'>"+pageTitle+"</td></tr>";pageHeader+="</table>"}
else{var pageHeader="<FORM NAME=pull_down_top><DIV ALIGN=center><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><!-- MASTER --><TR>";var logoReferrer=GetCookie("tvvReferrer");pageHeader+="<TD align='center' WIDTH=358 HEIGHT=71><IMG SRC='images/LogoTVV02.png' BORDER=0 WIDTH=235 HEIGHT=118 HSPACE=0 VSPACE=0 onClick='if(GetCookie(\"ReportErrors\") == null ) { if( confirm ( \"REFERRER: "+logoReferrer+"\\n\\nADMIN: Enable error reporting for troubleshooting purposes?\" ) ) { SetCookie(\"ReportErrors\", true, null, \"/\"); defaultStatus=\"ADMIN: Running in deep-check mode; full error reporting enabled\"; document.oncontextmenu = null; document.onmousedown = null; document.onmouseup = null; } } else { if( confirm ( \"ADMIN: Disable error reporting for troubleshooting purposes?\" ) ) { DeleteCookie(\"ReportErrors\", \"/\"); defaultStatus=\"ADMIN: Running in normal mode; full error reporting disabled\"; document.oncontextmenu = noContextMenu; document.onmousedown = noRightClick; document.onmouseup = noRightClick; } }' onMouseOver='if(GetCookie(\"ReportErrors\") == \"true\" ) self.status=\"ADMIN: Full Error Reporting Enabled\"; return true;' onMouseOut='self.status=\"\"; return true;'></TD></TR><TR><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><!-- NESTED --><TR><TD>&nbsp;</TD><TD WIDTH=40>&nbsp;</TD><TD>"+getHeaderPhotos()+"</TD></TR></TABLE><!-- NESTED --></TD></TR></TABLE><!-- MASTER --></DIV></FORM>";}
pageHeader+="<div style='position:absolute; top:12px; right:12px;'>"+getPullDown('top')+"</div>";return pageHeader;}
function getDataFile(type){var dataFile="null";if(qStr)dataFile="data/"+qStr.getVal("data");return dataFile;}
function buildMenu(Link,theEvent){if(window.DM){var propInfo="";var propID=Link.id.replace(/^pLink/, "" );
for(var nProp=0;nProp<Villas.length;nProp++){var PropRecord=Villas[nProp];if(PropRecord[0]==propID){var loc=PropRecord[2];var island=List.getIsland(PropRecord[3],PropRecord[0]);var nBdrms=(PropRecord[4][0]==PropRecord[4][1])?PropRecord[4][0]:PropRecord[4][0]+"-"+PropRecord[4][1];var nBaths=(PropRecord[5][0]==PropRecord[5][1])?PropRecord[5][0]:PropRecord[5][0]+"-"+PropRecord[5][1];var pool=(PropRecord[6])?"Y":"N";var spa=(PropRecord[7])?"Y":"N";var ac=(PropRecord[8])?"Y":"N";var rates=(PropRecord[9][0]==PropRecord[9][1])?PropRecord[9][0]:PropRecord[9][0]+"-"+PropRecord[9][1];var maxOcc=(PropRecord[10][0]==PropRecord[10][1])?PropRecord[10][0]:PropRecord[10][0]+"-"+PropRecord[10][1];var propTypeAbbrv=PropRecord[11];var propType=List.getSetting(PropRecord[11],PropRecord[0]);var showCal=(staffUser&&CALENDAR_RECORDS_HT[propID][5]!=4||publicUser&&CALENDAR_RECORDS_HT[propID][5]==1);var showTst=(PropRecord[16]);propInfo=loc+", "+island+" &#149; "+nBdrms+"br/"+nBaths+"ba"+"<BR>"+rates+"/nt"+" &#149; "+propType+"<BR>Pool="+pool+" &#149; Spa="+spa+" &#149; AC="+ac+"<BR>"+"Max Occupancy: "+maxOcc;propInfo=propInfo.replaceLiteral("'","&#39;");break;}}
var linkQstr="data="+"fs-"+propTypeAbbrv+"-"+propID+".js";DM.Links.summary=new Array();var nItems=0;if(propInfo){DM.Links.summary[nItems]=[propInfo,"text","This info is read-only, please click a menu item above..."];nItems++;DM.Links.summary[nItems]=["","-",""];nItems++;}
if(showCal){var page=(writeP)?"calendar-villa.aspx":"calendar-villa.html";DM.Links.summary[nItems]=["Reservation Calendar",page+"?"+linkQstr,"View our booking calendar & find open dates"];nItems++;}
if(showTst){DM.Links.summary[nItems]=["Testimonials","testmon.html?"+linkQstr,"Read what our satisfied clients said about this property..."];nItems++;}
DM.Links.summary[nItems]=["More Photos","thumbnails.html?"+linkQstr,"View photos as clickable thumbnails..."];nItems++;DM.Links.summary[nItems]=["Slide-Show","javascript:PopUp.openWin( \"ss.html?"+linkQstr+"\", 3 );","View photos via automated slide-show"];nItems++;DM.Links.summary[nItems]=["Rates & Details","fact-sheet.html?"+linkQstr,"Read our detailed Fact Sheet"];nItems++;DM.Links.summary[nItems]=[Link.innerHTML,[10,6],[0,5],[0,14],[0,4],[0,0],[10,6]];DM.start(Link,theEvent,"summary","aboveRel");}
return true;}
VillasHT=new Array();function Listings(){this.requestSpc=(qStr&&qStr.getVal("show")=="sp");this.requestPrv=(qStr&&qStr.getVal("show")=="pv");this.requestLmn=(qStr&&qStr.getVal("show")=="lm");this.requestPub=(this.requestSpc||this.requestPrv||this.requestLmn)?false:true;this.showListings=(this.requestPub||this.requestSpc||this.requestPrv);try{Villas.length=Villas.length-1;}
catch(Err){var eMsg="ERROR: Data in listings.js is malformed (bad syntax). Villas array cannot be initialized.\n\n";for(member in Err)eMsg+=member+": "+Err[member]+"\n";if(!gErrReported)reportError("Data Listings Syntax Error",eMsg);gErrReported=true;}
outer:for(var i=0;i<Villas.length;i++){Villas[i][1]=Villas[i][1].cleanIt();Villas[i][2]=Villas[i][2].cleanIt();var id=Villas[i][0];var nDups=0;for(var k=0;k<Villas.length;k++)if(id==Villas[k][0])nDups++;if(nDups>1){reportError("Data Listings Error","ERROR: listings.js contains "+nDups+" duplicate entries for a Villas referenced by \""+id+"\"");break outer;}
VillasHT[id]=Villas[i];}
this.getSetting=getSetting;this.getIsland=getIsland;this.getPrivatePopup=getPrivatePopup;this.writeListingInstructions=writeListingInstructions;this.sortAscStr=sortAscStr;this.sortDesStr=sortDesStr;this.sortAscNum=sortAscNum;this.sortDesNum=sortDesNum;this.sortMe=sortMe;this.init=init;this.getListings=getListings;this.restoreSort=restoreSort;this.filterData=filterData;this.showPics=showPics;this.collapse=collapse;this.preloadTN=preloadTN;this.preloadMsg=preloadMsg;this.showPrivate=showPrivate;this.DivImgPreloader=null;this.restoreSortTimer=0;this.initSortPageTimer=0;this.sortIndex=-1;this.sortCol=-1;this.lastRowNum=-1;this.nVillaCaching=0;this.nImgCached=0;this.preloadVerbose=0;this.preloadDelay=(this.preloadVerbose)?1000:100;this.sortNmDes=1;this.sortLcDes=1;this.sortIsDes=1;this.sortBrDes=1;this.sortBaDes=1;this.sortPlDes=1;this.sortSpDes=1;this.sortAcDes=1;this.sortRtDes=1;this.sortOcDes=1;this.sortStDes=1;this.sortScDes=1;this.sortOrDes=1;this.lastSortCol=null;this.sortState=GetCookie("sortState");if(this.sortState&&this.sortState.substring(0,2)=="12"&&(this.requestPub||this.requestPrv)){DeleteCookie("sortState");this.sortState=null;}
if(this.sortState){this.lastSortCol=parseInt(this.sortState.split("_")[0]);var lastSortOrder=parseInt(this.sortState.split("_")[1]);switch(this.lastSortCol){case 1:this.sortNmDes=lastSortOrder;break;case 2:this.sortLcDes=lastSortOrder;break;case 3:this.sortIsDes=lastSortOrder;break;case 4:this.sortBrDes=lastSortOrder;break;case 5:this.sortBaDes=lastSortOrder;break;case 6:this.sortPlDes=lastSortOrder;break;case 7:this.sortSpDes=lastSortOrder;break;case 8:this.sortAcDes=lastSortOrder;break;case 9:this.sortRtDes=lastSortOrder;break;case 10:this.sortOcDes=lastSortOrder;break;case 11:this.sortStDes=lastSortOrder;break;case 12:this.sortScDes=lastSortOrder;break;default:if(!window.gErrReported)reportError("Internal Switch/Case Error","Switch/Case Error at Listings() switch( this.lastSortCol ); Bad Switch: "+this.lastSortCol);window.gErrReported=true;}}
ListingInstructions=ListingInstructions.cleanIt();SpecialCommentary=SpecialCommentary.cleanIt();if(this.requestLmn)LastMinuteCommentary=LastMinuteCommentary.cleanIt();function getSetting(abbrev,id){if(abbrev.indexOf(" ")==-1&&typeof eval("window.Setting."+abbrev)=="string")return eval("window.Setting."+abbrev);else{if(!window.gErrReported)reportError("Data Listings Setting Error","Cannot find a match for the setting \""+abbrev+"\" for property ID \""+id+"\" in listings.js.");window.gErrReported=true;return "<span class='fColorYellow bold'>Error</span>";}}
function getIsland(abbrev,id){if(abbrev.indexOf(" ")==-1&&typeof eval("window.Island."+abbrev)=="string")return eval("window.Island."+abbrev);else{if(!window.gErrReported)reportError("Data Listings Island Error","Cannot find a match for the Island \""+abbrev+"\" for property ID \""+id+"\" in listings.js.");window.gErrReported=true;return "<span class='fColorYellow bold'>Error</span>";}}
function writeListingInstructions(){var pageTitle=ListingsTitle.Public;if(this.requestSpc)pageTitle=ListingsTitle.Specials;else if(this.requestPrv)pageTitle=ListingsTitle.Private;else if(this.requestLmn)pageTitle=ListingsTitle.LastMinute;var htm="";if(getWinWid()>=1152){htm+="<style>a.rowLink { font-size:11pt; }a.rowLink:link { font-size:11pt; }a.rowLink:visited { font-size:11pt; }a.rowLink:hover { font-size:11pt; }a.col { font-size:10pt; }a.col:link { font-size:10pt; }a.col:visited { font-size:10pt; }a.col:hover { font-size:10pt; }td.headInner { font-size:11pt; }td.listRow { font-size:11pt; }td.listRowSort { font-size:11pt; }td.listRowSortOn { font-size:11pt; }td.listRowOn { font-size:11pt; }td.listRowOff { font-size:11pt; }</style>";}
if(pageTitle)htm+="<div class='listTitle' id='listTitleDiv'>"+pageTitle+"</div>";htm+="<span id='instructions'>";if(window.ListingInstructions&&!this.requestSpc&&!this.requestLmn)htm+="<div align='center' class='listInstructions'>"+ListingInstructions+"</div>";else htm+="<br>";htm+="</span>";var spTxt=(SpecialCommentary&&this.requestSpc)?SpecialCommentary:"";var spKeys="";if(spTxt){for(key in Specials)spKeys+=key+" = "+Specials[key]+";&nbsp;&nbsp;";spKeys="<div class='fSize11 fColorWhite'>"+spTxt+"<div class='SpecialSeparator'>"+SpecialExplanation+"<br>"+spKeys+"</div></div>";}
htm+="<div align='center' class='listInstructions' id='spTxtDiv'>"+spKeys+"</div>";htm+=(window.LastMinuteCommentary&&this.requestLmn)?"<div align='center' class='listInstructions'>"+LastMinuteCommentary+"</div>":"";document.write(htm);}
function sortAscNum(a,b){return a[List.sortIndex]<b[List.sortIndex]?-1:a[List.sortIndex]>b[List.sortIndex]?1:a[List.sortIndex]==b[List.sortIndex]?List.sortIndex:a[List.sortIndex]<b[List.sortIndex]?-1:1;}
function sortDesNum(b,a){return a[List.sortIndex]<b[List.sortIndex]?-1:a[List.sortIndex]>b[List.sortIndex]?1:a[List.sortIndex]==b[List.sortIndex]?List.sortIndex:a[List.sortIndex]<b[List.sortIndex]?-1:1;}
function sortAscStr(a,b){var aU=a[List.sortIndex].toUpperCase();var bU=b[List.sortIndex].toUpperCase();return aU<bU?-1:aU>bU?1:a[List.sortIndex]==b[List.sortIndex]?List.sortIndex:a[List.sortIndex]<b[List.sortIndex]?-1:1;}
function sortDesStr(b,a){var aU=a[List.sortIndex].toUpperCase();var bU=b[List.sortIndex].toUpperCase();return aU<bU?-1:aU>bU?1:a[List.sortIndex]==b[List.sortIndex]?List.sortIndex:a[List.sortIndex]<b[List.sortIndex]?-1:1;}
function filterData(filterNum){this.requestSpc=false;this.requestPrv=false;this.requestPub=false;this.sortIndex=-1;this.sortCol=-1;switch(filterNum){case 1:this.requestSpc=true;var spKeys="";if(SpecialCommentary){spKeys="<div align=center class='fSize12 fColorWhite' style='margin:12px 0px 0px 0px;'>";for(key in Specials)spKeys+=key+" = "+Specials[key]+";&nbsp;&nbsp;";spKeys+="</div>";}
document.getElementById("listTitleDiv").innerHTML=ListingsTitle.Specials;document.getElementById("spTxtDiv").innerHTML=SpecialCommentary+spKeys;document.getElementById("ListingsDiv").innerHTML=this.getListings();break;case 2:var thisPW="";var pwCookie=GetCookie("PrivateListingsPW");if(pwCookie==PrivateListingsPW)thisPW=PrivateListingsPW;else thisPW=prompt("Password Provided by Tropical Villa Vacations:","");var pwFailed=1;if(thisPW){if(thisPW==PrivateListingsPW){this.requestPrv=true;var pwFailed=0;document.getElementById("spTxtDiv").innerHTML="";document.getElementById("ListingsDiv").innerHTML=this.getListings();SetCookie("PrivateListingsPW",PrivateListingsPW,null,"/");document.getElementById("listTitleDiv").innerHTML=ListingsTitle.Private;}
else
alert("Sorry, you've entered an incorrect password...");}
if(pwFailed){document.getElementById("sort3").checked=true;this.filterData(3);}
break;case 3:this.requestPub=true;document.getElementById("spTxtDiv").innerHTML="";document.getElementById("listTitleDiv").innerHTML=ListingsTitle.Public;break;default:if(!window.gErrReported)reportError("Internal Switch/Case Error","Switch/Case Error at List.filterData(); Bad Switch: "+filterNum);window.gErrReported=true;}
List.init(0);this.sortMe(this.lastSortCol,1);}
function restoreSort(){if(this.showListings){if(this.sortState){try{if(this.requestSpc){this.requestSpc=true;this.filterData(1);}
else if(this.requestPrv){this.requestPrv=true;this.filterData(2);}
else if(this.requestPub){this.requestPub=true;this.filterData(3);}
this.sortCol=parseInt(this.sortState.split("_")[0]);this.sortMe(this.sortCol);}
catch(Err){clearTimeout(List.restoreSortTimer);self.status="Initializing \"List.restoreSort()\" method, one moment please...";eval("List.restoreSortTimer = setTimeout( 'if( window.List ) List.restoreSort();', 250 );");}}
var picState=GetCookie("PicState");if(picState){var PicState=picState.split("_");for(var i=2;i<PicState.length;i++)PicState[i]=parseInt(PicState[i]);if(qStr=PicState[0])List.showPics(PicState[1],PicState[2],PicState[3],PicState[4]);}}}
function sortMe(sortIndex,reqFilter){function subResetSortStatus(nOmit){if(nOmit!=1)List.sortNmDes=1;if(nOmit!=2)List.sortLcDes=1;if(nOmit!=3)List.sortIsDes=1;if(nOmit!=4)List.sortBrDes=1;if(nOmit!=5)List.sortBaDes=1;if(nOmit!=6)List.sortPlDes=1;if(nOmit!=7)List.sortSpDes=1;if(nOmit!=8)List.sortAcDes=1;if(nOmit!=9)List.sortRtDes=1;if(nOmit!=10)List.sortOcDes=1;if(nOmit!=11)List.sortStDes=1;if(nOmit!=12)List.sortScDes=1;}
var showDownArr;var nCurFilter=3;switch(sortIndex){case 1:this.sortIndex=1;this.sortCol=1;if(reqFilter)this.sortNmDes=(this.sortNmDes)?0:1;if(this.sortNmDes){Villas.sort(this.sortAscStr);this.sortNmDes=0;showDownArr=0;}
else{Villas.sort(this.sortDesStr);this.sortNmDes=1;showDownArr=1;}
SetCookie("sortState",this.sortCol+"_"+((this.sortNmDes)?0:1));subResetSortStatus(this.sortCol);break;case 2:this.sortIndex=2;this.sortCol=2;if(reqFilter)this.sortLcDes=(this.sortLcDes)?0:1;if(this.sortLcDes){Villas.sort(this.sortAscStr);this.sortLcDes=0;showDownArr=0;}
else{Villas.sort(this.sortDesStr);this.sortLcDes=1;showDownArr=1;}
SetCookie("sortState",this.sortCol+"_"+((this.sortLcDes)?0:1));subResetSortStatus(this.sortCol);break;case 3:this.sortIndex=3;this.sortCol=3;if(reqFilter)this.sortIsDes=(this.sortIsDes)?0:1;if(this.sortIsDes){Villas.sort(this.sortAscStr);this.sortIsDes=0;showDownArr=0;}
else{Villas.sort(this.sortDesStr);this.sortIsDes=1;showDownArr=1;}
SetCookie("sortState",this.sortCol+"_"+((this.sortIsDes)?0:1));subResetSortStatus(this.sortCol);break;case 4:this.sortIndex=Villas[0].length;this.sortCol=4;if(reqFilter)this.sortBrDes=(this.sortBrDes)?0:1;for(var i=0;i<Villas.length;i++)Villas[i][this.sortIndex]=(Villas[i][4][0]+Villas[i][4][1])/2;if(this.sortBrDes){Villas.sort(this.sortAscNum);this.sortBrDes=0;showDownArr=0;}
else{Villas.sort(this.sortDesNum);this.sortBrDes=1;showDownArr=1;}
SetCookie("sortState",this.sortCol+"_"+((this.sortBrDes)?0:1));subResetSortStatus(this.sortCol);break;case 5:this.sortIndex=Villas[0].length;this.sortCol=5;if(reqFilter)this.sortBaDes=(this.sortBaDes)?0:1;for(var i=0;i<Villas.length;i++)Villas[i][this.sortIndex]=(Villas[i][5][0]+Villas[i][5][1])/2;if(this.sortBaDes){Villas.sort(this.sortAscNum);this.sortBaDes=0;showDownArr=0;}
else{Villas.sort(this.sortDesNum);this.sortBaDes=1;showDownArr=1;}
SetCookie("sortState",this.sortCol+"_"+((this.sortBaDes)?0:1));subResetSortStatus(this.sortCol);break;case 6:this.sortIndex=6;this.sortCol=6;if(reqFilter)this.sortPlDes=(this.sortPlDes)?0:1;if(this.sortPlDes){Villas.sort(this.sortAscNum);this.sortPlDes=0;showDownArr=0;}
else{Villas.sort(this.sortDesNum);this.sortPlDes=1;showDownArr=1;}
SetCookie("sortState",this.sortCol+"_"+((this.sortPlDes)?0:1));subResetSortStatus(this.sortCol);break;case 7:this.sortIndex=7;this.sortCol=7;if(reqFilter)this.sortSpDes=(this.sortSpDes)?0:1;if(this.sortSpDes){Villas.sort(this.sortAscNum);this.sortSpDes=0;showDownArr=0;}
else{Villas.sort(this.sortDesNum);this.sortSpDes=1;showDownArr=1;}
SetCookie("sortState",this.sortCol+"_"+((this.sortSpDes)?0:1));subResetSortStatus(this.sortCol);break;case 8:this.sortIndex=8;this.sortCol=8;if(reqFilter)this.sortAcDes=(this.sortAcDes)?0:1;if(this.sortAcDes){Villas.sort(this.sortAscNum);this.sortAcDes=0;showDownArr=0;}
else{Villas.sort(this.sortDesNum);this.sortAcDes=1;showDownArr=1;}
SetCookie("sortState",this.sortCol+"_"+((this.sortAcDes)?0:1));subResetSortStatus(this.sortCol);break;case 9:this.sortIndex=Villas[0].length;this.sortCol=9;if(reqFilter)this.sortRtDes=(this.sortRtDes)?0:1;for(var i=0;i<Villas.length;i++){if(typeof Villas[i][9][0]=="number")Villas[i][this.sortIndex]=(Villas[i][9][0]+Villas[i][9][1])/2;else{var lo=Number.POSITIVE_INFINITY;var Rates=Villas[i][9];for(var k=0;k<Rates.length-2;k++)if(Rates[k][0]<lo)lo=Rates[k][0];Villas[i][this.sortIndex]=lo;}}
if(this.sortRtDes){Villas.sort(this.sortAscNum);this.sortRtDes=0;showDownArr=0;}
else{Villas.sort(this.sortDesNum);this.sortRtDes=1;showDownArr=1;}
SetCookie("sortState",this.sortCol+"_"+((this.sortRtDes)?0:1));subResetSortStatus(this.sortCol);break;case 10:this.sortIndex=Villas[0].length;this.sortCol=10;if(reqFilter)this.sortOcDes=(this.sortOcDes)?0:1;for(var i=0;i<Villas.length;i++)Villas[i][this.sortIndex]=(Villas[i][10][0]+Villas[i][10][1])/2;if(this.sortOcDes){Villas.sort(this.sortAscNum);this.sortOcDes=0;showDownArr=0;}
else{Villas.sort(this.sortDesNum);this.sortOcDes=1;showDownArr=1;}
SetCookie("sortState",this.sortCol+"_"+((this.sortOcDes)?0:1));subResetSortStatus(this.sortCol);break;case 11:this.sortIndex=11;this.sortCol=11;if(reqFilter)this.sortStDes=(this.sortStDes)?0:1;if(this.sortStDes){Villas.sort(this.sortAscStr);this.sortStDes=0;showDownArr=0;}
else{Villas.sort(this.sortDesStr);this.sortStDes=1;showDownArr=1;}
SetCookie("sortState",this.sortCol+"_"+((this.sortStDes)?0:1));subResetSortStatus(this.sortCol);break;case 12:this.sortIndex=12;this.sortCol=12;if(reqFilter)this.sortScDes=(this.sortScDes)?0:1;if(this.sortScDes){Villas.sort(this.sortAscStr);this.sortScDes=0;showDownArr=0;}
else{Villas.sort(this.sortDesStr);this.sortScDes=1;showDownArr=1;}
SetCookie("sortState",this.sortCol+"_"+((this.sortScDes)?0:1));subResetSortStatus(this.sortCol);break;default:if(!window.gErrReported)reportError("Internal Switch/Case Error","Switch/Case Error at List.sortMe; Bad Switch: "+sortIndex);window.gErrReported=true;}
document.getElementById("ListingsDiv").innerHTML=this.getListings();if(this.sortCol<12){var Span=document.getElementById("a"+sortIndex);Span.innerHTML=(showDownArr)?"&nbsp;&darr;":"&nbsp;&uarr;";}
else{if(this.requestSpc){var Span=document.getElementById("a"+sortIndex);Span.innerHTML=(showDownArr)?"&nbsp;&darr;":"&nbsp;&uarr;";}}
List.init(0);return false;}
function preloadMsg(Img,nMsg){if(List.preloadVerbose){switch(nMsg){case 1:document.title="Image onLoad; nVil: "+List.nVillaCaching+"; nImg: "+List.nImgCached+"; Src: "+Img.src;break;case 2:document.title="Image onError; nVil: "+List.nVillaCaching+"; nImg: "+List.nImgCached+"; Src: "+Img.src;break;case 3:document.title="Image onAbort; nVil: "+List.nVillaCaching+"; nImg: "+List.nImgCached+"; Src: "+Img.src;break;case 4:document.title="Called by List.preloadTN.subContinue; nVil: "+List.nVillaCaching+"; nImg: "+List.nImgCached;break;case 5:document.title="Preloading completed; "+List.nVillaCaching+" villas preloaded..."
break;}}}
function preloadTN(){function subContinue(){List.nVillaCaching++;List.nImgCached=0;if(Villas[List.nVillaCaching]){List.preloadMsg(null,4);setTimeout("if( window.List ) List.preloadTN();",List.preloadDelay);}
else{List.preloadMsg(null,5);PL.run();}}
var Images=Villas[this.nVillaCaching][18];if(Images){if(Villas[this.nVillaCaching][18][this.nImgCached]){if(this.requestPub&&Villas[this.nVillaCaching][13]||this.requestPrv&&Villas[this.nVillaCaching][14]){var tn=Villas[this.nVillaCaching][18][this.nImgCached][0].replace(/\.jpg$/i, "TN.jpg" );
tn=tn.replace(/\.jpeg$/i, "TN.jpeg" );
tn=tn.replace(/\.gif$/i, "TN.gif" );
var iSrc="images/"+Villas[this.nVillaCaching][11]+"-"+Villas[this.nVillaCaching][0]+"/"+tn;if(this.DivImgPreloader){TnPreloader=this.DivImgPreloader.firstChild;TnPreloader.src=iSrc;}
else{this.DivImgPreloader=document.createElement("div");document.body.appendChild(this.DivImgPreloader);this.DivImgPreloader.style.display="none";this.DivImgPreloader.innerHTML="<img src='"+iSrc+"' onload='List.preloadMsg( this, 1 ); List.nImgCached++; setTimeout( \"if( window.List ) List.preloadTN();\", List.preloadDelay );' onerror='List.preloadMsg( this, 2 ); List.nImgCached++; setTimeout( \"if( window.List ) List.preloadTN();\", List.preloadDelay );' onabort='List.preloadMsg( this, 3 ); List.nImgCached++; setTimeout( \"if( window.List ) List.preloadTN();\", List.preloadDelay );'>";}}
else
subContinue();}
else
subContinue();}
else
subContinue();}
function init(pageLoad){if(this.showListings){try{var TD=document.getElementsByTagName("td");for(var i=0;i<TD.length;i++){if(TD[i].id.charAt(0)=="c"){var colNumStr=TD[i].id.substring(1,3).replace(/^0+/, "" );
colNum=parseInt(colNumStr);if(colNum==this.sortCol)TD[i].className="listRowSort";}}
self.status="";var Links=document.getElementsByTagName("a");for(var i=0;i<Links.length;i++){if(Links[i].className=="col"){Links[i].onclick=function(){return List.sortMe(parseInt(this.nextSibling.id.substring(1,this.nextSibling.id.length)));}
Links[i].onmouseover=function(){this.title="Sort properties by "+this.innerHTML;self.status=this.title;if(window.DM)DM.killOthers(this);return true;}
Links[i].onmouseout=function(){self.status="";return true;}}}
if(pageLoad&&this.requestPrv)getPrivatePopup(null,null);}
catch(Err){clearTimeout(List.initSortPageTimer);self.status="Initializing \"List.init("+pageLoad+")\" method, one moment please...";eval("List.initSortPageTimer = setTimeout( 'if( window.List ) List.init("+pageLoad+")', 250 );");}}}
function collapse(rowNum){if(List.lastRowNum>=0){var TrImg=document.getElementById("i"+rowNum);TrImg.style.display="none";DeleteCookie("PicState","/");this.lastRowNum=-1;var TrDat=TrImg.previousSibling;var Td=TrDat.firstChild;while(Td){if(Td.className!="listRowSortOn")Td.className="listRowOff";else
Td.className="listRowSort";Td=Td.nextSibling;}}}
function showPics(qStrLink,rowNum,cal,tst){if(window.PF&&PF.formatIsPF||this.requestLmn)return;if(this.lastRowNum>=0){var TrImgLast=document.getElementById("i"+this.lastRowNum);TrImgLast.style.display="none";var TrDatLast=TrImgLast.previousSibling;var TDLast=TrDatLast.firstChild;while(TDLast){if(TDLast.className!="listRowSortOn")TDLast.className="listRowOff";else
TDLast.className="listRowSort";TDLast=TDLast.nextSibling;}}
var TrImg=document.getElementById("i"+rowNum);TrImg.style.display="";var TrDat=TrImg.previousSibling;var TdDat=TrDat.firstChild;while(TdDat){if(TdDat.className!="listRowSort")TdDat.className="listRowOn";else
TdDat.className="listRowSortOn";TdDat=TdDat.nextSibling;}
var Td=TrImg.firstChild;Td.setAttribute("align","center");var imgFolder=qStrLink.replace(/^data=fs-|\.js$/g, "" );
var VillaId=imgFolder.replace(/^.+-/, "" );
var theDomain=(theHost=="127.0.0.1")?"http://www.tropicalvillavacations.com/":"";for(var i=0;i<Villas.length;i++){if(Villas[i][0]==VillaId){var Images=Villas[i][18];var img="";if(Images){for(var k=0;k<Images.length-1;k++){var tn=Images[k][0].replace(/\.jpg$/i, "TN.jpg" );
tn=tn.replace(/\.jpeg$/i, "TN.jpeg" );
tn=tn.replace(/\.gif$/i, "TN.gif" );
img+="<a href='"+theDomain+"images/"+imgFolder+"/"+Images[k][0]+"' onClick='return largePic( \""+Villas[i][1].replace(/\"/g, "^" ) + ( ( Images[ k ][ 3 ] ) ?  ": <span style=font-weight:normal;>" + Images[ k ][ 3 ] + "</span>" : "" ) + "\", " + Images[ k ][ 1 ] + ", " + Images[ k ][ 2 ] + ", this, event );'><img src='" + theDomain + "images/" + imgFolder + "/" + tn + "' width='100' height='75' class='tn' hspace=5 title='" + Msg.enlarge + "'></a>";
if(k==5)break;}}
else
img+="<br><div style='width:660px; margin:0px 0px 0px 10px;'>Photo Previews Not Available, Check Back Soon...</div>";img+="<a href='javascript:List.collapse( "+rowNum+" );' class='collapse' title='Close (collapse) this photo display'>&times;</a>";var htm="";htm+="<table align=center border=0 cellspacing=0 cellpadding=0><tr><td align=right class=listTnRow id=ListLinksTD style='padding:0px 3px 0px 0px;'>";htm+="<a href='javascript:PopUp.openWin( \"ss.html?"+qStrLink+"\", 3 );' title='View photos via automated slide-show' style='font-size:10pt;'>Slide-Show</a><br>";htm+="<a href='thumbnails.html?"+qStrLink+"' title='View photos as clickable thumbnails' style='font-size:10pt;'>More Photos</a><br>";if(cal)htm+="<a href='"+((GetCookie("writeP"))?"calendar-villa.aspx":"calendar-villa.html")+"?"+qStrLink+"' title='View our booking calendar & find open dates' style='font-size:10pt;'>Reservation Calendar</a><br>";htm+="<a href='fact-sheet.html?"+qStrLink+"' title='Read our detailed Fact Sheet' style='font-size:10pt;'>Rates & Details</a><br>";if(tst)htm+="<a href='testmon.html?"+qStrLink+"' title='Read what our satisfied clients said about this villa' style='font-size:10pt;'>Testimonials</a><br>";htm+="</td><td class=listTnRow>"+img+"</td></tr></table>";Td.innerHTML=htm;break;}}
this.lastRowNum=rowNum;SetCookie("PicState",qStr+"_"+qStrLink+"_"+rowNum+"_"+cal+"_"+tst,null,"/");}
function getListings(){var htm="";if(this.showListings){if(this.requestPrv&&!GetCookie("PrivateListingsPW"))htm="<div style='margin:50px 0px 50px 0px;' class='bold'>&#149; You must <a href='javascript:void(0);' onClick='List.getPrivatePopup( this, event );' title='A password is required'>Log-In</a> to view our Private Villa Collection</div>";else{htm+="<table align=center border=0 cellspacing=0 cellpadding=0 class=fSize11><tr align=center><td class=listRow><a href=javascript:void(0) class=col>NAME</a><span id=a1></span></td><td class=listRow><a href=javascript:void(0) class=col>LOCATION</a><span id=a2></span></td><td class=listRow><a href=javascript:void(0) class=col>ISLAND</a><span id=a3></span></td><td class=listRow><a href=javascript:void(0) class=col>BRs</a><span id=a4></span></td><td class=listRow><a href=javascript:void(0) class=col>BAs</a><span id=a5></span></td><td class=listRow><a href=javascript:void(0) class=col>POOL</a><span id=a6></span></td><td class=listRow><a href=javascript:void(0) class=col>SPA</a><span id=a7></span></td><td class=listRow><a href=javascript:void(0) class=col>A/C</a><span id=a8></span></td>";if(this.requestSpc)htm+="<td class=listRow><a href=javascript:void(0) class=col>RATE/NT</a><span id=a9></span></td>";else htm+="<td class=listRow><a href=javascript:void(0) class=col>"+RatesAreFor+" Rates From</a><span id=a9></span></td>";htm+="<td class=listRow><a href=javascript:void(0) class=col>OCC</a><span id=a10></span></td><td class=listRow><a href=javascript:void(0) class=col>SETTING</a><span id=a11></span></td>";if(this.requestSpc)htm+="<td class=listRow><a href=javascript:void(0) class=col>PERIOD</a><span id=a12></span></td>";htm+="</tr>";var headerRow="<tr align=center><td class=headInner>Name</td><td class=headInner>Location</td><td class=headInner>Island</td><td class=headInner>BRs</td><td class=headInner>BAs</td><td class=headInner>Pool</td><td class=headInner>Spa</td><td class=headInner>A/C</td><td class=headInner>"+((this.requestSpc)?"":RatesAreFor)+" Rates From</td><td class=headInner>Occ</td><td class=headInner>Setting</td>";if(this.requestSpc)headerRow+="<td class=headInner>Period</td>";headerRow+="</tr>";nVillasVisible=0;for(var i=0;i<Villas.length;i++){var pub=(Villas[i][13])?true:false;var prv=(Villas[i][14])?true:false;var upv=(Villas[i][15])?true:false;var cal=(Villas[i][0]&&window.CALENDAR_RECORDS_HT&&CALENDAR_RECORDS_HT[Villas[i][0]]&&(publicUser&&CALENDAR_RECORDS_HT[Villas[i][0]][5]<=2||staffUser&&CALENDAR_RECORDS_HT[Villas[i][0]][5]!=4))?1:0;var tst=(Villas[i][16])?1:0;var spc=(Villas[i][12].length>0&&pub);var qStr="data=fs-"+Villas[i][11]+"-"+Villas[i][0]+".js";var fsFile="fs-"+Villas[i][11]+"-"+Villas[i][0]+".js";var showSpc=(this.requestSpc&&spc);var showPub=(this.requestPub&&pub);var showPrv=(this.requestPrv&&prv);if(showSpc||showPub||showPrv){if(nVillasVisible>0&&nVillasVisible%14==0)htm+=headerRow;htm+="<tr align=center id=d"+nVillasVisible+"><td class=listRow id=c01"+nVillasVisible+"><a href='fact-sheet.html?"+qStr+"' onMouseOver='List.showPics( \""+qStr+"\", "+nVillasVisible+", "+cal+","+tst+" ); self.status = \"Learn more about "+Villas[i][1].replace(/\"/g, "\\\"" )  + "\"; return true;' onMouseOut='self.status = \"\";' class=rowLink>" + Villas[ i ][ 1 ] + "</a>" +
"</td><td class=listRow id=c02"+nVillasVisible+">"+Villas[i][2]+"</td><td class=listRow id=c03"+nVillasVisible+">"+List.getIsland(Villas[i][3],Villas[i][0])+"</td><td class=listRow id=c04"+nVillasVisible+">"+((Villas[i][4][0]==Villas[i][4][1])?Villas[i][4][0]:Villas[i][4][0]+"-"+Villas[i][4][1])+"</td><td class=listRow id=c05"+nVillasVisible+">"+((Villas[i][5][0]==Villas[i][5][1])?Villas[i][5][0]:Villas[i][5][0]+"-"+Villas[i][5][1])+"</td><td class=listRow id=c06"+nVillasVisible+">"+((Villas[i][6])?"Yes":"No")+"</td><td class=listRow id=c07"+nVillasVisible+">"+((Villas[i][7])?"Yes":"No")+"</td><td class=listRow id=c08"+nVillasVisible+">"+((Villas[i][8])?"Yes":"No")+"</td><td class=listRow id=c09"+nVillasVisible+">";if(this.requestSpc)htm+="Inquire";else{var Rates=Villas[i][9];if(typeof Rates[0]=="number"){if(Rates[0]==Rates[1])htm+=(Rates[0]==0)?"Inquire":"$"+Rates[0];else if(Rates[0]==0)htm+="up to $"+Rates[1];else
htm+="$"+Rates[0]+"-"+Rates[1];}
else{var lo=Number.POSITIVE_INFINITY;for(var k=0;k<Rates.length-2;k++)if(Rates[k][0]<lo)lo=Rates[k][0];if(lo==Number.POSITIVE_INFINITY){if(!window.gErrReported){reportError("Rates error","Malformed rates at List.getListings method; Unable to find low rate for: "+Villas[i][1]+"; ID:"+Villas[i][0]+" in listings.js file");window.gErrReported=true;}}
htm+="$"+lo+((Rates.length>3)?"+":"");}}
htm+="</td><td class=listRow id=c10"+nVillasVisible+">"+((Villas[i][10][0]==Villas[i][10][1])?Villas[i][10][0]:Villas[i][10][0]+"-"+Villas[i][10][1])+"</td><td class=listRow id=c11"+nVillasVisible+">"+List.getSetting(Villas[i][11],Villas[i][0])+"</td>";if(this.requestSpc)htm+="<td class=listRow id=c12"+nVillasVisible+">"+Villas[i][12]+"</td>";htm+="</tr>";htm+="<tr id=i"+nVillasVisible+"><td colspan="+((showSpc)?12:11)+"></td></tr>";nVillasVisible++;}}
if(nVillasVisible==0){htm+="<tr align=center><td class=headInner colspan="+((showSpc)?12:11)+">NO LISTINGS AVAILABLE</td></tr>";}
htm+="</table><br>";}}
htm+="<div style='margin:0px 0px 16px 0px; white-space:nowrap;'><span id=listLinksDiv>";if(!this.requestSpc)htm+="&nbsp;&nbsp;<a href='listings.html?show=sp' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title='Villas with holiday availability'>Christmas & New Years</a>&nbsp;&nbsp;&#149;";if(!this.requestLmn)htm+="<span class='showLastMinute'>&nbsp;&nbsp;<a href='listings.html?show=lm' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title='Villas with last-minute availability'>Last Minute Specials</a>&nbsp;&nbsp;&#149;</span>";if(!this.requestPub)htm+="&nbsp;&nbsp;<a href='listings.html' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title='Our entire villa collection'>Accommodation List</a>&nbsp;&nbsp;&#149;";if(!this.requestPrv&&GetCookie("PrivateListingsPW"))htm+="&nbsp;&nbsp;<a href='listings.html?show=pv'>Private Villas</a>&nbsp;&nbsp;&#149;";htm+="</span>";htm+="&nbsp;&nbsp;<A HREF='javascript:void( 0 );' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' onClick='getTravelAgent(); List.collapse( List.lastRowNum ); PF.prep( [ [ \"listRowSortOn\", \"listRowSort\" ], [ \"listRowOff\", \"listRow\" ] ] ); PF.setView( this, [ \"page_top\", \"instructions\", \"listLinksDiv\", \"page_bottom\" ], [ \"listRow\", \"col\", \"rowLink\", \"listRowSort\", \"headInner\" ], true ); PF.printPage( this );' onContextMenu='List.collapse( List.lastRowNum ); PF.prep( [ [ \"listRowSortOn\", \"listRowSort\" ], [ \"listRowOff\", \"listRow\" ] ] ); PF.setView( this, [ \"page_top\", \"instructions\", \"listLinksDiv\", \"page_bottom\" ], [ \"listRow\", \"col\", \"rowLink\", \"listRowSort\", \"headInner\" ], false ); return false;' TITLE='"+PF.dText[2]+"' ID='prnFrLink'>"+PF.dText[0]+"</A>";htm+="</div>";return htm;}
function getPrivatePopup(Link,evt){if(qStr&&qStr.getVal("pw")==PrivateListingsPW){SetCookie("PrivateListingsPW",PrivateListingsPW,null,"/");List.requestPrv=true;document.getElementById("spTxtDiv").innerHTML="";document.getElementById("ListingsDiv").innerHTML=List.getListings();document.getElementById("listTitleDiv").innerHTML=ListingsTitle.Private;}
else if(!GetCookie("PrivateListingsPW")){var htm="<div><table align='center' border='0' cellspacing='0' cellpadding='0' class='fSize11 fColorGray51'><tr align='center'><td nowrap>Password:</td><td style='padding:0px 6px 0px 6px;'><input type='text' id='Private_PW' style='width:140px;' onkeypress='if( window.event && window.event.keyCode == 13 || event.which == 13 ) { List.showPrivate(); return false; }' /></td><td><input type='button' value='OK' onClick='List.showPrivate();' /></td></tr><tr align='center'><td colspan='3' class='fSize10' style='padding:10px 0px 0px 0px;'><div id='Wrong_PW' class='fColorRed'></div>Please enter the password provided<br> by Tropical Villa Vacations</td></tr></table></div>";if(Link)DW.createWindow(["Private Villas",htm],[0,300,0],Link,evt,10);else
DW.createWindow(["Private Villas",htm],[0,300,0],Link,evt,10,[3,0,145]);setTimeout("document.getElementById( 'Private_PW' ).focus();",250);}}
function showPrivate(){var Private_PW=document.getElementById("Private_PW");if(Private_PW.value){if(Private_PW.value==PrivateListingsPW){SetCookie("PrivateListingsPW",PrivateListingsPW,null,"/");List.requestPrv=true;document.getElementById("spTxtDiv").innerHTML="";document.getElementById("ListingsDiv").innerHTML=List.getListings();document.getElementById("listTitleDiv").innerHTML=ListingsTitle.Private;DW.removeWin();}
else{document.getElementById("Wrong_PW").innerHTML="Wrong password, please try again";document.getElementById("Private_PW").focus();}}
else
document.getElementById("Private_PW").focus();}}
function getVillaName(pageType){var pTitle="";if(fileName!="fact-sheet.html"&&fileName!="testmon.html"&&fileName!="calendar-villa.html"&&fileName!="calendar-villa.aspx")pTitle="<div align=center class='bold'>"+Villa.Name[1]+pageType+"</DIV>";return pTitle;}
function addToFavs(pName,pLoc,pIsle){if(cookiesOn){var thisProp=pName+((pLoc)?": "+pLoc:"")+((pIsle)?", "+pIsle:"");var existingProps=GetCookie("FavProps");if(existingProps==null)SetCookie("FavProps",thisProp,null,"/");else{if(existingProps.indexOf(thisProp)==-1){existingProps+="|"+thisProp;SetCookie("FavProps",existingProps,null,"/");}}
PopUp.openWin("favorites.html",0,0,0,0,600,300,1,1,2);}
else alert("Sorry, you must enable cookies to use this feature...");}
function writeSummaryLinks(thePage){if(qStr&&qStr.indexOf("yacht-")>=0)return;var testLink='';var calLink='<TD COLSPAN=2></TD><TD NOWRAP WIDTH=5></TD>';var calBehavior=(Villas[gVillaRecNum]&&window.CALENDAR_RECORDS_HT&&CALENDAR_RECORDS_HT[Villas[gVillaRecNum][0]])?CALENDAR_RECORDS_HT[Villas[gVillaRecNum][0]][5]:0;if(Villa.Testimonials){testLink="<TD>";var linkTag="<A HREF='testmon.html?"+qStr+"' onMouseover='activateBut(\"sum-testimonials\"); activateMsg( dText[25] ); return true;' onMouseout='deActivateBut(\"sum-testimonials\"); deActivateMsg( 31 ); self.status=dText[0]; return true;'>";testLink+=linkTag+"<IMG SRC='images/FlowerOff.png' NAME='sum-testimonials' BORDER=0 ALIGN=middle WIDTH=40 HEIGHT=38 HSPACE=5 VSPACE=3></A></TD><TD NOWRAP CLASS=fSize11>"+linkTag+"Testimonials</A></TD>";}
if(calBehavior&&((publicUser&&calBehavior<=2)||(staffUser&&calBehavior!=4))){calLink="<TD>";var linkTag="<A HREF='"+((GetCookie("writeP"))?"calendar-villa.aspx":"calendar-villa.html")+"?"+qStr+"' onMouseover='activateBut(\"sum-calendar\"); activateMsg( dText[23] ); return true;' onMouseout='deActivateBut(\"sum-calendar\"); deActivateMsg( 31 ); self.status=dText[0]; return true;'>";calLink+=linkTag+"<IMG SRC='images/FlowerOff.png' NAME='sum-calendar' BORDER=0 ALIGN=middle WIDTH=40 HEIGHT=38 HSPACE=5 VSPACE=3></A></TD><TD NOWRAP CLASS=fSize11>"+linkTag+"View Calendar</A></TD><TD NOWRAP WIDTH=5></TD>";}
var remarks="";if(thePage=="commentary"){remarks="<TABLE ALIGN=center WIDTH=900 BORDER=0 CELLSPACING=0 CELLPADDING=1 BGCOLOR=#314de7><TR><TD CLASS=fSize10><TABLE ALIGN=center WIDTH=900 BORDER=0 CELLSPACING=0 CELLPADDING=8 BGCOLOR=#0000cc><TR><TD CLASS=fSize10><SPAN CLASS=bold>REMARKS</SPAN>: "+Villa.Commentary+"</TD></TR></TABLE></TD></TR></TABLE>";}
var table='<P>'+"<div align='center'>"+getCallout(31)+"</div><BR><TABLE ALIGN=center BORDER=0 CELLSPACING=0 CELLPADDING=0'><TR><TD>";var linkTag="<A HREF='javascript:PopUp.openWin( \"ss.html?"+qStr+"&vname="+Villas[gVillaRecNum][1]+"\", 3 );' onMouseover='activateBut(\"sum-slide-show\"); activateMsg( dText[18] ); return true;' onMouseout='deActivateBut(\"sum-slide-show\"); deActivateMsg( 31 ); self.status=dText[0]; return true;'>";table+=linkTag+"<IMG SRC='images/FlowerOff.png' NAME='sum-slide-show' BORDER=0 ALIGN=middle WIDTH=40 HEIGHT=38 HSPACE=5 VSPACE=3></A></TD><TD NOWRAP CLASS=fSize11>"+linkTag+"Run Slide-Show</A></TD><TD NOWRAP WIDTH=5></TD><TD>";var linkTag="<A HREF='thumbnails.html?"+qStr+"' onMouseover='activateBut(\"sum-photos\"); activateMsg( dText[ 19 ] ); return true;' onMouseout='deActivateBut(\"sum-photos\"); deActivateMsg( 31 ); self.status=dText[0]; return true;'>";table+=linkTag+"<IMG SRC='images/FlowerOff.png' NAME='sum-photos' BORDER=0 ALIGN=middle WIDTH=40 HEIGHT=38 HSPACE=5 VSPACE=3></A></TD><TD NOWRAP CLASS=fSize11>"+linkTag+"View Photos</A></TD><TD NOWRAP WIDTH=5></TD><TD>";var linkTag="<A HREF='fact-sheet.html?"+qStr+"#External' onMouseover='activateBut(\"sum-prop_des\"); activateMsg( dText[ 20 ] ); self.status=dText[20]; return true;' onMouseout='deActivateBut(\"sum-prop_des\"); deActivateMsg( 31 ); self.status=dText[0]; return true;'>";table+=linkTag+"<IMG SRC='images/FlowerOff.png' NAME='sum-prop_des' BORDER=0 ALIGN=middle WIDTH=40 HEIGHT=38 HSPACE=5 VSPACE=3></A></TD><TD NOWRAP CLASS=fSize11>"+linkTag+"Rates & Details</A></TD><TD NOWRAP WIDTH=5></TD>";var action=(framed)?"A HREF='"+document.location.href+"' TARGET='_top' onClick='alert(\"Sorry, to use this feature, we must reload you into our parent domain: tropicalvillavacations.com\\n\\n==> Click OK & wait for this page to reload, then click Add-To-Favorites again...\"); return true;'":"A HREF='javascript:addToFavs( Villa.Name[1], Villa.Loc[1], Villa.Island[1] )'";table+="<TD>";var linkTag="<"+action+" onMouseover='activateBut(\"sum-fav\"); activateMsg( dText[21] ); return true;' onMouseout='deActivateBut(\"sum-fav\"); deActivateMsg( 31 ); self.status=dText[0]; return true;'>";table+=linkTag+"<IMG SRC='images/FlowerOff.png' NAME='sum-fav' BORDER=0 ALIGN=middle WIDTH=40 HEIGHT=38 HSPACE=5 VSPACE=3></A></TD><TD NOWRAP CLASS=fSize11>"+linkTag+"Add to Favorites</A></TD></TR></TABLE><TABLE ALIGN=center BORDER=0 CELLSPACING=0 CELLPADDING=0><TR>"+calLink+"<TD>";var linkTag="<A HREF='javascript:tellAFriend( \"Property\", document.location.href );' onMouseover='activateBut(\"sum-email\"); activateMsg( dText[22] ); return true;' onMouseout='deActivateBut(\"sum-email\"); deActivateMsg( 31 ); self.status=dText[0]; return true;'>";table+=linkTag+"<IMG SRC='images/FlowerOff.png' NAME='sum-email' BORDER=0 ALIGN=middle WIDTH=40 HEIGHT=38 HSPACE=5 VSPACE=3></A></TD><TD NOWRAP CLASS=fSize11>"+linkTag+"Email to a Friend</A></TD><TD NOWRAP WIDTH=5></TD><TD>";var linkTag="<A HREF='inquiry-form.html' TARGET='_top' onMouseover='activateBut(\"sum-reply\"); activateMsg( dText[24] ); return true;' onMouseout='deActivateBut(\"sum-reply\"); deActivateMsg( 31 ); self.status=dText[0]; return true;'>";table+=linkTag+"<IMG SRC='images/FlowerOff.png' NAME='sum-reply' BORDER=0 ALIGN=middle WIDTH=40 HEIGHT=38 HSPACE=5 VSPACE=3></A></TD><TD NOWRAP CLASS=fSize11>"+linkTag+"Inquiry Reply Form</A></TD><TD NOWRAP WIDTH=5></TD>"+testLink+"</TR></TABLE><TABLE ALIGN=center BORDER=0 CELLSPACING=0 CELLPADDING=6 WIDTH='900'><TR><TD NOWRAP COLSPAN=4 ALIGN=center>"+remarks+"</TD></TR></TABLE>";var html="";if(thePage=="summary"){html=getVillaName("")+table;} else{html=table;}
document.write("<div id=pLinks>"+html+"</div>");self.status="";}
function changeTitle(pName){if(pName)document.title="TropicalVillaVacations.com proudly presents: "+pName.replaceLiteral("&#39;","'");}
function getTravelAgent(){var pfLink=document.getElementById("prnFrLink");var PfTitle=document.getElementById("pfTitle");var calPage=(document.location.href.indexOf("calendar")>=0);var pName=(calPage)?gPropName:(window.Villa&&Villa.Name)?Villa.Name[1]:"";var pfLinkInnerHTML=pfLink.innerHTML.toLowerCase();var makePF=(pfLinkInnerHTML.indexOf("printer")>=0);if(makePF){var tvvTrvlAg=GetCookie("tvvTrvlAg");var defPromptVal=(tvvTrvlAg)?tvvTrvlAg:"";var myTitle=prompt("TRAVEL AGENTS: Enter your Company Name and Phone Number\nand it will print at the top of this page. Otherwise click Cancel.",defPromptVal);var villaName=(pName)?"<DIV CLASS='fSize12 bold'>"+pName.toUpperCase()+"</DIV>":"";if(myTitle){document.title=myTitle;PfTitle.innerHTML=villaName+myTitle+"<DIV CLASS='fSize9' style='font-weight:normal;'>This page printed on "+new Date().toLocaleString()+"</DIV><BR>";PfTitle.className="on";SetCookie("tvvTrvlAg",myTitle,expdate,"/");}
else{DeleteCookie("tvvTrvlAg","/");PfTitle.innerHTML=villaName+"TropicalVillaVacations.com: "+TVV.PhoneTollFree+" Toll Free<DIV CLASS='fSize9' style='font-weight:normal;'>This page printed on "+new Date().toLocaleString()+"</DIV><BR>";PfTitle.className="on";document.title=pageTitle;}}
else{document.title=pageTitle;PfTitle.className="off";}}
function PrinterFriendly(){this.dText=["Printer-Friendly Page","Revert Back to Default Web-Layout","Compacts page and maximizes it for your printer..","Reformat page back to default \"web\" layout..."];this.debug=0;this.formatIsPF=false;this.prep=prep;this.switchClassName=switchClassName;this.setView=setView;this.printPage=printPage;function prep(ClassArr){var allElements=document.getElementsByTagName("*");for(var i=0;i<allElements.length;i++){for(k in ClassArr){if(allElements[i].className==ClassArr[k][0]){allElements[i].className=ClassArr[k][1];if(this.debug)alert("PF.prep: "+ClassArr[k][0]+" ==> "+ClassArr[k][1]);}}}}
function switchClassName(ClassArr,makePF){this.formatIsPF=makePF;var allElements=document.getElementsByTagName("*");for(var i=0;i<allElements.length;i++){for(k in ClassArr){if(makePF){if(allElements[i].className==ClassArr[k]){allElements[i].className=ClassArr[k]+"PF";if(this.debug)alert("PF.switchClassName: "+ClassArr[k]+" ==> "+ClassArr[k]+"PF");}}
else{if(allElements[i].className==ClassArr[k]+"PF"){allElements[i].className=ClassArr[k];if(this.debug)alert("PF.switchClassName: "+ClassArr[k]+"PF ==> "+ClassArr[k]);}}}}}
function setView(TheLink,divArr,Classes,swapLinks){self.status="Setting styles of page elements, one moment please...";var makePF=(TheLink.innerHTML==this.dText[0]);var Links=document.getElementsByTagName("a");for(member in divArr){var TheDiv=document.getElementById(divArr[member]);try{if(makePF)TheDiv.style.display="none";else TheDiv.style.display="";}
catch(e){alert("ERROR: Div element \""+divArr[member]+"\" not found in method PF.setView");}}
if(makePF){with(document.body){if(PAGE_STYLE.bkgImg)style.backgroundImage="url( none )";if(PAGE_STYLE.bkgCol)style.backgroundColor="white";if(PAGE_STYLE.margin)style.margin="10px 10px 10px 10px";}
this.switchClassName(Classes,makePF);TheLink.innerHTML=this.dText[1];TheLink.title=this.dText[3];TheLink.style.fontWeight="bold";TheLink.style.color=(PAGE_STYLE.printFrLinkCol)?PAGE_STYLE.printFrLinkCol:"yellow";for(var i=0;i<Links.length;i++){if(swapLinks&&Links[i]!=TheLink){Links[i].style.color=(PAGE_STYLE.printFrLinkCol)?PAGE_STYLE.printFrLinkCol:"white";}}}
else{with(document.body){if(PAGE_STYLE.bkgImg)style.backgroundImage=PAGE_STYLE.bkgImg;if(PAGE_STYLE.bkgCol)style.backgroundColor=PAGE_STYLE.bkgCol;if(PAGE_STYLE.margin)style.margin=PAGE_STYLE.margin;}
this.switchClassName(Classes,makePF);TheLink.innerHTML=this.dText[0];TheLink.title=this.dText[2];TheLink.style.fontWeight="normal";TheLink.style.color="yellow";for(var i=0;i<Links.length;i++){if(swapLinks&&Links[i]!=TheLink){Links[i].style.color="rgb(255,255,0)";}}}
if(TheLink.focus&&!SF){TheLink.focus();TheLink.blur();}
self.status=" ";}
function printPage(TheLink){if(window.print&&TheLink.innerHTML==this.dText[1])self.print();}}
function ImageViewer(transNum,transDur){this.dissolveSF=1;this.transNum=(transNum)?transNum:2;this.transDur=(transDur)?transDur:0.8;this.Link=null;this.setSectVis=setSectVis;this.hideOtherPhotos=hideOtherPhotos;this.show=show;this.swapLgImg=swapLgImg;this.hideLgImg=hideLgImg;this.setImgTitle=setImgTitle;this.removeOverlay=removeOverlay;this.getNumLinesInTitle=getNumLinesInTitle;this.preloadNext=preloadNext;this.getImgIndexArr=getImgIndexArr;this.setBotImgFromTop=setBotImgFromTop;this.scrollFromTop=0;this.scrollFromLeft=0;this.lgPhotoShowing=false;this.ImgOverlay=null;this.NextLgImage=null;this.forward=-1;this.nextImgTimer=0;this.tnPage=false;this.maxImgArea=Math.pow(450,2);var path=document.location.pathname;var delimeter=(path.indexOf("\\")>=0)?"\\":"/";var Path=path.split(delimeter);var thisPage=Path[Path.length-1];if(thisPage&&thisPage.indexOf(".")>=0&&thisPage.toLowerCase().indexOf("thumbnails")==0)this.tnPage=true;window.onresize=this.setBotImgFromTop;function setSectVis(sectName,className){var i=0;while(document.getElementById(sectName+i)){Section=document.getElementById(sectName+i);Section.className=className;i++;}}
function getImgIndexArr(imgPath){var maxIndex=Images.length-1;var delimeter=(imgPath.indexOf("\\")>=0)?"\\":"/";var lastSlash=imgPath.lastIndexOf(delimeter);var imgName=(lastSlash>=0)?imgPath.substring(lastSlash+1,imgPath.length):imgPath;for(var i=0;i<=maxIndex;i++){var dbLastSlash=Images[i][0].lastIndexOf(delimeter);var dbImgName=(dbLastSlash>=0)?Images[i][0].substring(dbLastSlash+1,imgPath.length):Images[i][0];if(imgName==dbImgName){if(this.forward)var newIndex=(i<maxIndex)?i+1:0;else var newIndex=(i>0)?i-1:maxIndex;var thisIndex=i;break;}}
return[thisIndex,newIndex,maxIndex];}
function preloadNext(Img){if(this.tnPage){var ImgIndexArr=this.getImgIndexArr(Img.src);var newIndex=ImgIndexArr[1];var PreLoadImage=new Image(Images[newIndex][1],Images[newIndex][2]);PreLoadImage.src=Settings.folder+Images[newIndex][0];}}
function getNumLinesInTitle(imgTitle){var imgtitle=imgTitle.toLowerCase();var nLinesInTitle=imgtitle.split("<br>").length;var lineBrks="";for(var i=0;i<nLinesInTitle;i++)lineBrks+="<BR>";return lineBrks;}
function setBotImgFromTop(keepOverlay){if(IV.ImgOverlay){var TopImage=document.images.imageIVNew;var BotImage=document.images.thumbnailsIV;BotImage.src=TopImage.src;BotImage.style.borderColor=TopImage.style.borderColor;BotImage.style.borderWidth=TopImage.style.borderWidth;if(typeof keepOverlay!="number")IV.removeOverlay();}}
function removeOverlay(){if(this.ImgOverlay){document.body.removeChild(this.ImgOverlay);this.ImgOverlay=null;}}
function swapLgImg(){var Img=document.getElementById("imgLargeIV");if(Img){Img.onload=null;this.setBotImgFromTop(1);var ImgIndexArr=this.getImgIndexArr(Img.src);var thisIndex=ImgIndexArr[0];var newIndex=ImgIndexArr[1];var maxIndex=ImgIndexArr[2];if(!this.NextLgImage){this.NextLgImage=new Image(Images[newIndex][1],Images[newIndex][2]);this.NextLgImage.src=Settings.folder+Images[newIndex][0];}
if(this.NextLgImage.complete){var thisImgWid=Images[thisIndex][1]+(2*Settings.borderWid);var newImgWid=Images[newIndex][1]+(2*Settings.borderWid);var thisImgHgt=Images[thisIndex][2]+(2*Settings.borderWid);var newImgHgt=Images[newIndex][2]+(2*Settings.borderWid);var newImgBorderCol=Settings.borderCol;var sameDim=(thisImgWid==newImgWid&&thisImgHgt==newImgHgt);diffDim=!sameDim;var newImgArea=newImgWid*newImgHgt;if(diffDim){if(winIE)Img.style.visibility="hidden";else if(MZ&&newImgArea<=this.maxImgArea)Img.style.opacity=0;else if(SF&&this.dissolveSF)Img.style.opacity=0;}
var imgTitle=Images[newIndex][3];IV.setImgTitle(imgTitle,newIndex,maxIndex);if(winIE){if(sameDim)dissolveDirectX(Img,Settings.folder+Images[newIndex][0],Settings.borderWid,newImgBorderCol,this.transNum,this.transDur);else{Img.src=Settings.folder+Images[newIndex][0];Img.width=Images[newIndex][1];Img.height=Images[newIndex][2];Img.style.border=Settings.borderWid+"px solid rgb( "+getRGB(newImgBorderCol)+" )";startFade(Img,IV.transNum,IV.transDur,0,0,0);}}
else if((MZ&&newImgArea<=this.maxImgArea)||(SF&&this.dissolveSF)){if(sameDim){var opac=getOpacity(this.dissolveSF,1);var imgStyle=(Settings.borderWid)?" style='border:"+Settings.borderWid+"px solid rgb("+getRGB(newImgBorderCol)+"); "+opac+"'":" style='"+opac+"'";var newImg="<img name='imageIVNew' src='"+Settings.folder+Images[newIndex][0]+"' width='"+Images[newIndex][1]+"' height='"+Images[newIndex][2]+"'"+imgStyle+" onClick='IV.hideLgImg( \"thumbnails\" );' onMouseOver='this.style.cursor=\"pointer\"; self.status=this.title; return true;' onMouseOut='this.style.cursor=\"default\"; self.status=\"\"; return true;' TITLE='Go back to thumbnails'>";if(!this.ImgOverlay){this.ImgOverlay=document.createElement("DIV");document.body.appendChild(this.ImgOverlay);this.ImgOverlay.style.zIndex=1000;this.ImgOverlay.style.position="absolute";}
var x=0,y=0,TheElement=Img;while(TheElement!=document.body){y+=TheElement.offsetTop;x+=TheElement.offsetLeft;y-=TheElement.scrollTop;x-=TheElement.scrollLeft;TheElement=TheElement.offsetParent;}
this.ImgOverlay.style.top=y+"px";this.ImgOverlay.style.left=x+"px";this.ImgOverlay.innerHTML=newImg;fadeIn(document.images.imageIVNew);}
else{this.removeOverlay();Img.src=Settings.folder+Images[newIndex][0];Img.width=Images[newIndex][1];Img.height=Images[newIndex][2];Img.style.border=Settings.borderWid+"px solid rgb( "+getRGB(newImgBorderCol)+" )";fadeIn(Img);}}
else{this.removeOverlay();Img.src=Settings.folder+Images[newIndex][0];Img.width=Images[newIndex][1];Img.height=Images[newIndex][2];Img.style.border=Settings.borderWid+"px solid rgb( "+getRGB(newImgBorderCol)+" )";}
this.forward=1;this.preloadNext(this.NextLgImage);this.NextLgImage=null;clearInterval(this.nextImgTimer);this.nextImgTimer=0;}
else{if(this.nextImgTimer==0){this.nextImgTimer=setInterval("IV.swapLgImg()",250);var lineBrks=getNumLinesInTitle(Images[newIndex][3]);IV.setImgTitle("Downloading image, please wait..."+lineBrks,null,null);}}}
else{this.NextLgImage=null;clearInterval(this.nextImgTimer);this.nextImgTimer=0;}}
function hideOtherPhotos(){if(!this.tnPage){var OtherDivs=document.getElementsByTagName("DIV");for(var i=0;i<OtherDivs.length;i++){if(OtherDivs[i].id.indexOf("bigIV")==0)this.hideLgImg(OtherDivs[i].id.substring(5,OtherDivs[i].id.length));}}}
function show(ImgInfoArr){if(document.getElementById){var ieCSS=(IE&&document.compatMode)?document.compatMode=="CSS1Compat":false;if(IE)var IeBody=ieCSS?document.documentElement:document.body;this.scrollFromTop=(IE)?IeBody.scrollTop:window.pageYOffset;this.scrollFromLeft=(IE)?IeBody.scrollLeft:window.pageXOffset;if(this.tnPage)this.Link=ImgInfoArr[7];this.hideOtherPhotos();var sectName=ImgInfoArr[8];this.setSectVis(sectName,"off");ImgInfoArr[5]=getRGB(ImgInfoArr[5]);var tableHgt=1;if(this.tnPage){tableHgt=(IE)?document.body.clientHeight-60:window.innerHeight-60;this.lgPhotoShowing=true;var BodyStyle=document.body.style;BodyStyle.backgroundImage="url( none )";BodyStyle.backgroundColor=Settings.TN.bkgColOn;BodyStyle.marginTop="0px";BodyStyle.marginRight="0px";BodyStyle.marginBottom="0px";BodyStyle.marginLeft="0px";}
var html="<DIV ID='bigIV"+sectName+"'>"+"<TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0' WIDTH='100%' HEIGHT='"+tableHgt+"'><TR><TD ALIGN='center' VALIGN='middle'>";html+="<TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0'><TR><TD><A HREF='javascript:void(0);' ID='topFocalPt'></A><BR></TD></TR><TR>";var bkgStyle=(this.tnPage)?" STYLE='background-color:"+Settings.TN.bkgColOn+";'":" ";if(this.tnPage){var ImgIndexArr=this.getImgIndexArr(ImgInfoArr[0]+ImgInfoArr[1]);var thisIndex=ImgIndexArr[0];var maxIndex=ImgIndexArr[2];var backMsg="Back to thumbnails";}
else{var thisIndex=null;var maxIndex=null;var backMsg="Back to thumbnail";}
var imgTitle=ImgInfoArr[4];var lineBrks=getNumLinesInTitle(imgTitle);html+="<TD ALIGN='center'"+bkgStyle+"><A HREF='javascript:IV.hideLgImg( \""+sectName+"\" );' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' TITLE='"+backMsg+"'"+bkgStyle+">";var dissolveMZ=(ImgInfoArr[2]*ImgInfoArr[3]<=this.maxImgArea);html+="<IMG ID='imgLargeIV' NAME='"+sectName+"IV' SRC='"+ImgInfoArr[0]+ImgInfoArr[1]+"' BORDER='0' WIDTH='"+ImgInfoArr[2]+"' HEIGHT='"+ImgInfoArr[3]+"' HSPACE=0 VSPACE=0 STYLE='border:"+ImgInfoArr[6]+"px solid rgb( "+ImgInfoArr[5]+" );"+getOpacity(IV.dissolveSF,dissolveMZ)+"' onAbort='this.src=this.src;' onLoad='startFade( this, IV.transNum, IV.transDur, 0, IV.dissolveSF, "+dissolveMZ+" ); IV.setImgTitle( \""+imgTitle+"\", "+thisIndex+","+maxIndex+" ); IV.preloadNext( this );'></A></TD></TR><TR><TD ALIGN='center' width='"+ImgInfoArr[2]+"'><DIV ID='imgTitleIV' CLASS='ivLgImgTitle'>Loading image, please wait..."+lineBrks+"</DIV><DIV STYLE='line-height:4px;'> &nbsp;</DIV></TD></TR><TR><TD ALIGN='center'>";if(this.tnPage)html+="<A HREF='javascript:IV.forward = 0; IV.swapLgImg();' onMouseOver='self.status=this.title; style.textDecoration=\"underline\"; return true;' onMouseOut='self.status=\"\"; style.textDecoration=\"none\"; return true;' style='text-decoration:none;' TITLE='Previous image'>&lt;&lt;</A>&nbsp;&nbsp;";html+="<A HREF='javascript:IV.hideLgImg( \""+sectName+"\" );' onMouseOver='self.status=this.title; style.textDecoration=\"underline\"; return true;' onMouseOut='self.status=\"\"; style.textDecoration=\"none\"; return true;' style='text-decoration:none;' TITLE='"+backMsg+"'>"+((this.tnPage)?"Back To Thumbnails":"Back")+"</A>";if(this.tnPage)html+="&nbsp;&nbsp;<A HREF='javascript:IV.forward = 1; IV.swapLgImg();' onMouseOver='self.status=this.title; style.textDecoration=\"underline\"; return true;' onMouseOut='self.status=\"\"; style.textDecoration=\"none\"; return true;' style='text-decoration:none;' TITLE='Next image'>&gt;&gt;</A>";html+="</TD></TR><TR><TD><A HREF='javascript:void(0);' ID='botFocalPt'></A><BR></TD></TR></TABLE><BR>";if(this.tnPage)html+="</TD></TR></TABLE><BR>";html+="</DIV>";var ImgConsole=document.getElementById(sectName);ImgConsole.innerHTML=html;ImgConsole.className="on";if(!macIE){var FocuserTop=document.getElementById("topFocalPt");FocuserTop.focus();var FocuserBot=document.getElementById("botFocalPt");FocuserBot.focus();}
return false;}
else{document.location.href=ImgInfoArr[0]+ImgInfoArr[1];return false;}}
function hideLgImg(sectName){var ImgConsole=document.getElementById("bigIV"+sectName);ImgConsole.innerHTML="";ImgConsole.className="off";if(this.tnPage){this.removeOverlay();this.lgPhotoShowing=false;var BodyStyle=document.body.style;BodyStyle.backgroundImage=Settings.TN.PageStyle.bkgImg;BodyStyle.backgroundColor=Settings.TN.PageStyle.bkgCol;BodyStyle.marginTop=Settings.TN.PageStyle.marTop;BodyStyle.marginRight=Settings.TN.PageStyle.marRgt;BodyStyle.marginBottom=Settings.TN.PageStyle.marBot;BodyStyle.marginLeft=Settings.TN.PageStyle.marLft;}
IV.setSectVis(sectName,"on");if(this.tnPage&&typeof this.Link=="object"){this.Link.focus();this.Link.blur();}
window.scroll(this.scrollFromLeft,this.scrollFromTop);}
function setImgTitle(imgTitle,newIndex,maxIndex){if(this.tnPage){if(imgTitle=="*")imgTitle=Settings.pageTitle;else if(imgTitle.indexOf("*+")==0)imgTitle=Settings.pageTitle+imgTitle.split("+")[1];else if(imgTitle.indexOf("+*")>=0)imgTitle=imgTitle.split("+")[0]+Settings.pageTitle;else if(imgTitle=="_")imgTitle=Images[newIndex][0].split(".")[0];if(newIndex!=null){var colon=(imgTitle!="&nbsp; <BR>"&&imgTitle!="")?": ":"";imgTitle=(newIndex+1)+" of "+(maxIndex+1)+colon+imgTitle;}}
if(!imgTitle)imgTitle="&nbsp; <br>";var ImgTitle=document.getElementById("imgTitleIV");imgTitle=imgTitle.replaceLiteral("^^","'");imgTitle=imgTitle.replaceLiteral("^","\"");ImgTitle.innerHTML=imgTitle;}}
IV=new ImageViewer();function Cars(){this.settings=new Array();this.settings["titleOff"]="Show makes & models...";this.settings["titleOn"]="Hide makes & models...";this.trimArrays=trimArrays;this.drawSportsLuxuryRows=drawSportsLuxuryRows;this.drawAvisRows=drawAvisRows;this.drawBudgetRows=drawBudgetRows;this.drawHertzRows=drawHertzRows;this.showModels=showModels;this.highlightRow=highlightRow;this.setVisibility=setVisibility;function trimArrays(){Avis["Low Season Dates"].length--;Avis["Mid Season Dates"].length--;Avis["Peak Season Dates"].length--;Budget["Low Season Dates"].length--;Budget["Mid Season Dates"].length--;Budget["Peak Season Dates"].length--;Budget["Molokai Season Dates"].length--;SportsLuxuryCars.length--;}
function setVisibility(TheLink,sectionName){var Section=document.getElementById(sectionName);var linkName=TheLink.innerHTML;if(linkName=="Show Car Rental Special Fees, Terms &amp; Conditions"){Section.className="on fSize10";TheLink.innerHTML="Hide Car Rental Special Fees, Terms &amp; Conditions";var toolTip="Hide Fees, Terms & Conditions...";TheLink.title=toolTip;self.status=toolTip;}
else{Section.className="off fSize10";TheLink.innerHTML="Show Car Rental Special Fees, Terms &amp; Conditions";var toolTip="Show Fees, Terms & Conditions...";TheLink.title=toolTip;self.status=toolTip;}}
function highlightRow(Link,on){var TD=Link.parentNode.parentNode;while(TD){if(TD.firstChild.tagName=="DIV"){if(on){TD.firstChild.style.backgroundColor="rgb( 49,77,231 )";TD.firstChild.style.color="rgb( 255,255,255 )";} else{TD.firstChild.style.backgroundColor="rgb( 0,0,204 )";TD.firstChild.style.color="rgb( 255,255,204 )";}}
TD=TD.nextSibling;}}
function showModels(Link,carClass,carModels,carCompany){var Console=document.getElementById(carCompany+carClass);var html="";if(!Console.innerHTML){var CarModels=carModels.split(",");html="<DIV CLASS='fSize8'>";for(member in CarModels)html+="• "+CarModels[member]+"<BR>";html+="</DIV><BR STYLE='line-height:4px;'>";Link.title=this.settings.titleOn;}
else
Link.title=this.settings.titleOff;Console.innerHTML=html;Link.blur();window.focus();}
function drawSportsLuxuryRows(){var html="";for(var i=0;i<SportsLuxuryCars.length/4;i++){html+="<TR CLASS='fSize10' VALIGN=top>";for(var k=0;k<4;k++){html+="<TD ALIGN=right CLASS='normBold'>";html+=(SportsLuxuryCars[i*4+k])?SportsLuxuryCars[i*4+k][0].cleanIt()+":":"&nbsp;";html+="</TD><TD ALIGN=left><DIV STYLE='margin:0px 35px 0px 10px;'>";html+=(SportsLuxuryCars[i*4+k])?SportsLuxuryCars[i*4+k][1].cleanIt():"&nbsp;";html+="</DIV></TD>";}
html+="</TR><TR><TD COLSPAN=8><DIV STYLE='line-height:4px;'> &nbsp;</DIV></TD></TR>";}
document.write(html);}
function drawAvisRows(carClass){var html="<TR CLASS='fSize10' ALIGN=center VALIGN=top><TD CLASS='bordR' ALIGN='left' WIDTH=130>";var models=Avis[carClass].models;html+="<DIV CLASS='carLink'>&nbsp;<A HREF='javascript:void( 0 );' onMouseover='Cars.highlightRow( this, 1 ); self.status=\""+models+"\"; return true;' onMouseout='Cars.highlightRow( this, 0 ); self.status=\"\"; return true;' onClick='if( MZ ) Cars.highlightRow( this, 0 ); Cars.showModels( this, \""+carClass+"\", \""+models+"\", \"Avis\" ); return true;' TITLE='"+Cars.settings.titleOff+"' CLASS='carLink'>";html+=""+carClass.cleanIt()+"";html+="</A></DIV>";html+="<SPAN ID='Avis"+carClass+"'></SPAN>";html+="</TD><TD><DIV>";html+=(Avis[carClass].loDaily)?Avis[carClass].loDaily.cleanIt():"&nbsp;";html+="</DIV></TD><TD CLASS='bordR'><DIV>";html+=(Avis[carClass].loWeekly)?Avis[carClass].loWeekly.cleanIt():"&nbsp;";html+="</DIV></TD><TD><DIV>";html+=(Avis[carClass].hiDaily)?Avis[carClass].hiDaily.cleanIt():"&nbsp;";html+="</DIV></TD><TD><DIV>";html+=Avis[carClass].hiWeekly.cleanIt()?Avis[carClass].hiWeekly.cleanIt():"&nbsp;";html+="</DIV></TD></TR>";document.write(html);}
function drawBudgetRows(carClass){var html="<TR CLASS='fSize10' ALIGN=center VALIGN=top><TD CLASS='bordR' ALIGN='left' WIDTH=140>";var models=Budget[carClass].models;html+="<DIV CLASS='carLink'>&nbsp;<A HREF='javascript:void( 0 );' onMouseover='Cars.highlightRow( this, 1 ); self.status=\""+models+"\"; return true;' onMouseout='Cars.highlightRow( this, 0 ); self.status=\"\"; return true;' onClick='if( MZ ) Cars.highlightRow( this, 0 ); Cars.showModels( this, \""+carClass+"\", \""+models+"\", \"Budget\" );' TITLE='"+Cars.settings.titleOff+"'>";html+=carClass.cleanIt();html+="</A></DIV>";html+="<SPAN ID='Budget"+carClass+"'></SPAN>";html+="</TD><TD><DIV>";html+=(Budget[carClass].loDaily)?Budget[carClass].loDaily.cleanIt():"&nbsp;";html+="</DIV></TD><TD CLASS='bordR'><DIV>";html+=(Budget[carClass].loWeekly)?Budget[carClass].loWeekly.cleanIt():"&nbsp;";html+="</DIV></TD><TD CLASS='bordR'><DIV>";html+=(Budget[carClass].hiDaily)?Budget[carClass].hiDaily.cleanIt():"&nbsp;";html+="</DIV></TD><TD CLASS='bordR'><DIV>";html+=(Budget[carClass].hiWeekly)?Budget[carClass].hiWeekly.cleanIt():"&nbsp;";html+="</DIV></TD><TD><DIV>";html+=(Budget[carClass].molokaiDaily)?Budget[carClass].molokaiDaily.cleanIt():"&nbsp;";html+="</DIV></TD><TD><DIV>";html+=(Budget[carClass].molokaiWeekly)?Budget[carClass].molokaiWeekly.cleanIt():"&nbsp;";html+="</DIV></TD></TR>";document.write(html);}
function drawHertzRows(carClass){var html="<TR CLASS='fSize10' VALIGN=top><TD ALIGN=right CLASS='normBold'><DIV>"+carClass.cleanIt()+":</DIV></TD><TD ALIGN=left><DIV STYLE='margin-left:10px;'>";html+=(Hertz[carClass].models)?Hertz[carClass].models.cleanIt():"&nbsp;";html+="</DIV></TD></TR><TR><TD COLSPAN=2><DIV STYLE='line-height:4px;'> &nbsp;</DIV></TD></TR>";document.write(html);}}
function cPW(){var FileComponents=dataFile.split("-");var villaID=FileComponents[FileComponents.length-1].replace(/\.js$/, "" );
gVillaRecNum=-1;for(var i=0;i<Villas.length;i++){if(Villas[i]&&Villas[i][0]==villaID){gVillaRecNum=i;break;}}
if(gVillaRecNum>=0&&Villas[gVillaRecNum][15]){if(!cookiesOn){alert("Sorry, this property is password protected & you must enable cookies to access it.");return false;}
if(GetCookie("cPW"))return true;var pw=qStr.getVal("pw");if(pw){if(pw==UltraPrivateVillasPW){SetCookie('cPW',1,null,"/");return true;}
else{alert("Sorry, the query string portion of your URL is incorrect:\n\""+qStr+"\"\n\n1) It is missing the password portion entirely or contains the wrong password.\n2) A property formatted query string will look like this:  \"data=????.js&pw=?????\"");return false;}}
else{alert("Sorry, you must provide a password (within the URL) to access this property.");return false;}}
return true;}
function cp(){var agentCookie=GetCookie("agentCookie");if(agentCookie){readP=1;if(agentCookie=="1-1")readP_Elev=1;}
var writeCookie=GetCookie("writeCookie");if(writeCookie)writeP=writeCookie;if(qStr){var user=qStr.getVal("user");var pw=qStr.getVal("pw");if(qStr.getVal("iam")=="agent"){if(qStr.getVal("pw")!=CalendarPW&&qStr.getVal("pw")!=CalendarPW+"_admin"){var userPW=(!agentCookie)?prompt("Please enter your password",""):"";if(userPW){if(userPW==CalendarPW){readP=1;readP_Elev=0;staffUser=true;publicUser=false;alert("Aloha, you have successfully logged-in with \"read-all\" access.\n\nClick on individual bookings for reservation specific details such as actual dates, guest name, notes & more...");SetCookie("agentCookie","1-0",null,"/");SetCookie('cPW',1,null,"/");SetCookie("PrivateListingsPW",PrivateListingsPW,null,'/');}
else if(userPW==CalendarPW+"_admin"){readP=1;readP_Elev=1;staffUser=true;publicUser=false;alert("Aloha, you have successfully logged-in with \"read-all\" elevated access.\n\nClick on individual bookings for reservation specific details such as actual dates, guest name, notes & more...");SetCookie("agentCookie","1-1",null,"/");SetCookie('cPW',1,null,"/");SetCookie("PrivateListingsPW",PrivateListingsPW,null,'/');}
else{alert("Sorry, you have entered an incorrect password");DeleteCookie("agentCookie");DeleteCookie("cPW");DeleteCookie("PrivateListingsPW");}}}
else if(qStr.getVal("pw")==CalendarPW){readP=1;readP_Elev=0;staffUser=true;publicUser=false;SetCookie("agentCookie","1-0",null,"/");SetCookie("cPW",1,null,"/");SetCookie("PrivateListingsPW",PrivateListingsPW,null,"/");}
else if(qStr.getVal("pw")==CalendarPW+"_admin"){readP=1;readP_Elev=1;staffUser=true;publicUser=false;SetCookie("agentCookie","1-1",null,"/");SetCookie("cPW",1,null,"/");SetCookie("PrivateListingsPW",PrivateListingsPW,null,"/");}}}}
function RentalLibrary(){this.Msg=new Array();this.Msg.ckIn="Check-in Date (MM/DD/YY)";this.Msg.ckOut="Check-out Date (MM/DD/YY)";this.Msg.nOcc="Number Occupants: Enter number only";this.calculateRent=calculateRent;this.getDayOfWeek=getDayOfWeek;this.getMonthName=getMonthName;function calculateRent(){}
function getDayOfWeek(index,nChars){var arrWeekDay=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var theDay=arrWeekDay[index];return(nChars)?theDay.substring(0,nChars):theDay;}
function getMonthName(index,fullName){var arrMonth=["January","February","March","April","May","June","July","August","September","October","November","December"];var month=arrMonth[index-1];return(fullName)?month:month.substring(0,3);}}
RL=new RentalLibrary();function initFactSheetData(){function subReportInheritanceErr(inheritNum,vName){if(!gErrReported){switch(inheritNum){case 0:reportError("Data Inheritance Error","An inherit key of 0, n, or no was set (meaning no inheritance) for Villa."+vName+" but the new value for this field was mistakenly left blank.");break;case 1:reportError("Data Inheritance Error","An inherit key of 1, y, or yes was set (meaning inherit verbatim) for Villa."+vName+" but you have also set a value for this field. Please remove this value OR reset the inherit key number.");break;case 2:reportError("Data Inheritance Error","An inherit key of 2, a, or append was set (meaning inheritance & append) for Villa."+vName+" but the new value (to be appended) for this field was mistakenly left blank.");break;}}
gErrReported=true;}
function subReportInheritanceNumErr(inheritNum,vName){if(!gErrReported)reportError("Fact Sheet Data Switch/Case Error",inheritNum+" is an invalid Inherit Number for Villa."+vName+" (number must be 0, 1 or 2)");gErrReported=true;}
function subGetSetting(abbrev,id){if(abbrev.indexOf(" ")==-1&&typeof eval("window.Setting."+abbrev)=="string")return eval("window.Setting."+abbrev);else{if(!gErrReported)reportError("Data Fact Sheet Setting Error","Cannot find a match for the setting \""+abbrev+"\" in the fact sheet data file.");gErrReported=true;}}
function subGetIsland(abbrev,id){if(abbrev.indexOf(" ")==-1&&typeof eval("window.Island."+abbrev)=="string")return eval("window.Island."+abbrev);else{if(!gErrReported)reportError("Data Fact Sheet Island Error","Cannot find a match for the Island \""+abbrev+"\" in the fact sheet data file.");gErrReported=true;}}
try{for(var i=0;i<Villas.length;i++){if(Villas[i][0]==Villa.ID){gVillaRecNum=i;break;}}
if(gVillaRecNum==-1)reportError("Villa Data Error","ERROR: Cannot find a match in listings.js for a Villa referenced by \""+Villa.ID+"\" in the fact sheet file.");for(var i in Villa){if(typeof Villa[i]=="string")Villa[i]=Villa[i].cleanIt();else if(typeof Villa[i]=="object"&&typeof Villa[i][1]=="string"){var inheritNum=Villa[i][0];if(i=="Name"){switch(inheritNum){case 0:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=Villa[i][1].cleanIt();break;case 1:if(Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=Villas[gVillaRecNum][1];break;case 2:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=Villas[gVillaRecNum][1]+" "+Villa[i][1].cleanIt();break;default:subReportInheritanceNumErr(inheritNum,i);}}
else if(i=="Setting"){switch(inheritNum){case 0:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=Villa[i][1].cleanIt();break;case 1:if(Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=subGetSetting(Villas[gVillaRecNum][11]);break;case 2:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=subGetSetting(Villas[gVillaRecNum][11])+" "+Villa[i][1].cleanIt();break;default:subReportInheritanceNumErr(inheritNum,i);}}
else if(i=="Loc"){switch(inheritNum){case 0:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=Villa[i][1].cleanIt();break;case 1:if(Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=Villas[gVillaRecNum][2];break;case 2:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=Villas[gVillaRecNum][2]+" "+Villa[i][1].cleanIt();break;default:subReportInheritanceNumErr(inheritNum,i);}}
else if(i=="Island"){switch(inheritNum){case 0:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=Villa[i][1].cleanIt();break;case 1:if(Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=subGetIsland(Villas[gVillaRecNum][3]);break;case 2:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=subGetIsland(Villas[gVillaRecNum][3])+" "+Villa[i][1].cleanIt();break;default:subReportInheritanceNumErr(inheritNum,i);}}
else if(i=="Bdrm"){var nBdrms=(Villas[gVillaRecNum][4][0]==Villas[gVillaRecNum][4][1])?Villas[gVillaRecNum][4][0]:Villas[gVillaRecNum][4][0]+" - "+Villas[gVillaRecNum][4][1];switch(inheritNum){case 0:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=Villa[i][1].cleanIt();break;case 1:if(Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=nBdrms;break;case 2:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=nBdrms+" "+Villa[i][1].cleanIt();break;default:subReportInheritanceNumErr(inheritNum,i);}}
else if(i=="Bath"){var nBaths=(Villas[gVillaRecNum][5][0]==Villas[gVillaRecNum][5][1])?Villas[gVillaRecNum][5][0]:Villas[gVillaRecNum][5][0]+" - "+Villas[gVillaRecNum][5][1];switch(inheritNum){case 0:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=Villa[i][1].cleanIt();break;case 1:if(Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=nBaths;break;case 2:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=nBaths+" "+Villa[i][1].cleanIt();break;default:subReportInheritanceNumErr(inheritNum,i);}}
else if(i=="Rate"){var rateOut="";var Rates=Villas[gVillaRecNum][9];if(typeof Rates[0]=="number")rateOut=(Rates[0]==Rates[1])?"$"+Rates[0]:"$"+Rates[0]+" to $"+Rates[1];else{for(var k=0;k<Rates.length-2;k++)rateOut+="<div class='rlRate'>$"+Rates[k][0]+": "+RL.getMonthName(Rates[k][1],0)+" "+((Rates[k][2]<10)?"0"+Rates[k][2]:Rates[k][2])+", "+(2000+Rates[k][3])+" - "+RL.getMonthName(Rates[k+1][1],0)+" "+((Rates[k+1][2]<10)?"0"+Rates[k+1][2]:Rates[k+1][2])+", "+(2000+Rates[k+1][3])+"</div>";}
switch(inheritNum){case 0:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=Villa[i][1].cleanIt();break;case 1:if(Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=rateOut;break;case 2:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=rateOut+" "+Villa[i][1].cleanIt();break;default:subReportInheritanceNumErr(inheritNum,i);}}
else if(i=="MaxOcc"){var maxOcc=(Villas[gVillaRecNum][10][0]==Villas[gVillaRecNum][10][1])?Villas[gVillaRecNum][10][0]:Villas[gVillaRecNum][10][0]+" - "+Villas[gVillaRecNum][10][1];switch(inheritNum){case 0:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=Villa[i][1].cleanIt();break;case 1:if(Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=maxOcc;break;case 2:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=maxOcc+" "+Villa[i][1].cleanIt();break;default:subReportInheritanceNumErr(inheritNum,i);}}
else if(i=="Pool"){var pool=(Villas[gVillaRecNum][6])?"Yes":"No";switch(inheritNum){case 0:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=Villa[i][1].cleanIt();break;case 1:if(Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=pool;break;case 2:if(!Villa[i][1])subReportInheritanceErr(inheritNum,i);Villa[i][1]=pool+" "+Villa[i][1].cleanIt();break;default:subReportInheritanceNumErr(inheritNum,i);}}}}}
catch(Err){var eMsg="ERROR: Data in fact sheet data file is malformed (bad syntax). Villa hash table cannot be initialized.\n\n";for(member in Err)eMsg+=member+": "+Err[member]+"\n";if(!gErrReported)reportError("Data Listings Syntax Error",eMsg);gErrReported=true;}}