var IE=false,oldIE=false,AOL=false,SF=false,FF=false,CR=false,OP=false,W3C=true;var ua=navigator.userAgent;switch(navigator.appName.toLowerCase()){case "microsoft internet explorer":W3C=false;IE=true;if( /AOL/.test(ua))AOL=true;if(parseFloat(ua.split("MSIE")[1])<=6)oldIE=true;break;case "netscape":if( /Chrome/i.test(ua))CR=true;else if( /Safari/i.test(ua))SF=true;else FF=true;break;case "opera":OP=true;break;}
var winOS=(navigator.platform.substring(0,3)=="Win");var macOS=(navigator.platform.substring(0,3)=="Mac");var iPhPod = ( /^iPhone/.test(navigator.platform ) || /^iPod/.test(navigator.platform));var iOS = ( /^iP/.test(navigator.platform));var aOS = ( /Android/.test(ua));var mobileDevice = ( /Android/.test(ua ) || /BlackBerry/.test(ua ) || /iPhone/.test(ua ) || /iPod/.test(ua ) || /Mobile/.test(ua ) || /Opera Mobi/.test(ua ) || /Windows CE/.test(ua ) || /Windows Phone/.test(ua))?true:false;var tabletComputer = ( /iPad/.test(ua ) || /SCH-I800/.test(ua ) || /Tablet/.test(ua));var desktopComputer=(!mobileDevice&&!tabletComputer);var mobileEdition=false;var desktopEdition=!mobileEdition;var rendersArrow = ( /Android/.test(ua ) || /Opera Mobi/.test(ua))?false:true;var Arrows=(rendersArrow)?["&#9650;","&#9658;","&#9660;","&#9668;"]:["&#9650;","&#9654;","&#9660;","&#9664;"];var theHost=document.location.hostname;var local = ( /^\d+\.\d+\.\d+\.\d+$/.test(theHost)||theHost==""||theHost=="localhost");if(theHost=="74.208.97.125")local=false;var live=!local;var emailRE=/^[\w\.-]*[^\.-]@[\w\.-]+\.[a-zA-Z]{2,}$/;var qStr=unescape(document.location.search).substring(1);var homePage="index.html"
var path=document.location.pathname;var delimeter=(path.indexOf("\\")>=0)?"\\":"/";if(path.charAt(path.length-1)==delimeter)path+=homePage;var Path=path.split(delimeter);var fileName=Path[Path.length-1];var fileNameLC=fileName.toLowerCase();var dayMS=86400000;cookieDomain=null;if(live&&theHost){var Host=theHost.split("."),hLen=Host.length;if(hLen>=2)cookieDomain="."+Host[hLen-2]+"."+Host[hLen-1];}
popUp=(qStr.indexOf("CONTEXT=popup")>=0);winIE=(winOS&&IE);var bDoesTrans=(winIE);var ieTrans=(winIE);var ncTrans=(FF);var framed=true;if(top==self)framed=false;gErrReported=false;cookiesOn=navigator.cookieEnabled;pageTitle=(typeof window.TVV=="object")?"We are just a toll free phone call away at "+TVV.PhoneTollFree+" ext "+TVV.RentalInqExt:"";if(window.ShowLastMinutePage)document.write("<style>.showLastMinute{ display:inline; }</style>");y=1,yes=1,n=0,no=0,a=2,append=2,end=null;function wc(){document.write(unescape("%3Cscript src='&#99;&#97;&#108;&#101;&#110;&#100;&#97;&#114;/&#114;&#84;&#104;&#80;&#111;3&#101;&#87;&#120;&#46;&#106;&#115;"+"?cb="+Math.random()+"' type='text/javascript'%3E%3C/script%3E"));}
if(window.UltraPrivateVillasPW)UltraPrivateVillasPW=UltraPrivateVillasPW.replace(/[^a-zA-Z]/g, "" ); // Logic duplicated in calculator.js
if(window.PrivateListingsPW)PrivateListingsPW=PrivateListingsPW.replace(/[^a-zA-Z]/g, "" );
if(window.CalendarPW)CalendarPW=CalendarPW.replace(/[^a-zA-Z]/g, "" );
var NowG=new Date();var TodayG=new Date(NowG.getFullYear(),NowG.getMonth(),NowG.getDate());var todayG=TodayG.getTime();var qStrRef=(document.referrer)?"&tvvref="+escape(document.referrer):"";switch(fileName.toLowerCase()){case "fs-bf-royalilimawaileabeachvillas.html":document.location.replace("listings.html?show=wbv"+qStrRef);break;case "fs-bf-wsb.html":document.location.replace("fact-sheet.html?data=fs-bf-wsb.js"+qStrRef);break;case "fs-bf-kaanapaliseashellsbeachestate.html":document.location.replace("fact-sheet.html?data=fs-bf-kaanapaliseashellsbeachestate.js"+qStrRef);break;case "fs-bf-waileasunsetestate.html":document.location.replace("fact-sheet.html?data=fs-bf-waileasunsetestate.js"+qStrRef);break;case "fs-pov-hokuathoolei.html":document.location.replace("fact-sheet.html?data=fs-pov-HokuAtHoolei.js"+qStrRef);break;}
Settings=new Array();Settings.transDur=.8;Settings.folder="images/";Settings.borderWidDW=1;if(W3C)Settings.borderWidDW=0;Settings.preventImageTheft=0;Settings.defaultCaption="Tropical Villa Vacations";Settings.SS=new Array();Settings.SS.speed=4.5;Settings.SS.randomStart=1;Settings.SS.audio=1;Settings.SS.audioFolder="";Settings.TN=new Array();Settings.TN.ProgressBar=new Array();Settings.TN.ProgressBar.hideOnSuccess=1;Settings.TN.ProgressBar.width=300;Settings.TN.pageTitle="";Settings.TN.align="center";Settings.TN.nImagesRow=8;Settings.TN.width=100;Settings.TN.height=100;Settings.TN.AppendSlideShowLink=0;function gId(str){return document.getElementById(str);}
function gTn(str){return document.getElementsByTagName(str);}
function gEl(str){return document.createElement(str);}
function aCh(Obj){document.body.appendChild(Obj);}
function rCh(Obj){document.body.removeChild(Obj);}
function gBM(){var bodyWid=-1,bodyHgt=-1,scrollX=-1,scrollY=-1;if(SF||CR){var Body=document.body;if(Body){bodyWid=window.innerWidth;bodyHgt=window.innerHeight;scrollX=window.pageXOffset;scrollY=window.pageYOffset;if(Body.scrollHeight>bodyHgt&&!iPhPod)bodyWid-=17;if(Body.scrollWidth>bodyWid&&!iPhPod)bodyHgt-=17;}}
else{var Doc=window.document,Comp=Doc.compatMode;var Body = ( Comp && /CSS/.test(Comp))?Doc.documentElement:Doc.body;if(Body){bodyWid=Body.clientWidth;bodyHgt=Body.clientHeight;scrollX=Body.scrollLeft;scrollY=Body.scrollTop;}}
var bodyNotReady=(bodyWid<=0||bodyHgt<=0);return[bodyWid,bodyHgt,scrollX,scrollY,bodyNotReady];}
function gFC(Elem){var FirstChild=null;if(Elem.firstChild){if(Elem.firstChild.nodeType==1)FirstChild=Elem.firstChild;else if(Elem.firstChild.nextSibling&&Elem.firstChild.nextSibling.nodeType==1)FirstChild=Elem.firstChild.nextSibling;}
return FirstChild;}
function gNS(Elem){var NextSibling=null;if(Elem.nextSibling){if(Elem.nextSibling.nodeType==1)NextSibling=Elem.nextSibling;else if(Elem.nextSibling.nextSibling&&Elem.nextSibling.nextSibling.nodeType==1)NextSibling=Elem.nextSibling.nextSibling;}
return NextSibling;}
function gPS(Elem){var PreviousSibling=null;if(Elem.previousSibling){if(Elem.previousSibling.nodeType==1)PreviousSibling=Elem.previousSibling;else if(Elem.previousSibling.previousSibling&&Elem.previousSibling.previousSibling.nodeType==1)PreviousSibling=Elem.previousSibling.previousSibling;}
return PreviousSibling;}
function gNV(Node){if(Node&&Node.nodeType==1)return(Node.childNodes[0])?Node.childNodes[0].nodeValue.trim():"";else
alert("Error at function gNV: Node \u201C"+Node+"\u201D is not a valid XML node\n\nCaller: "+gNV.caller.toString());}
function getToday(){var Now=new Date();return new Date(Now.getFullYear(),Now.getMonth(),Now.getDate());}
function gDtHST(TheDate){if(!TheDate)TheDate=new Date();var difhrs=TheDate.getTimezoneOffset()/60;var lochrs=TheDate.getHours();var gmtHours=lochrs+difhrs;TheDate.setHours(gmtHours-10);return TheDate;}
function getNumNights(StartDate,EndDate){var dateDiffMS=EndDate.getTime()-StartDate.getTime();return Math.round(dateDiffMS/dayMS);}
function gMN(nChars){var Months=["January","February","March","April","May","June","July","August","September","October","November","December"];var monthName=Months[this.getMonth()];return(nChars)?monthName.substring(0,nChars):monthName;}
Date.prototype.gMN=gMN;function gDN(nChars){var Days=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var dayName=Days[this.getDay()];return(nChars)?dayName.substring(0,nChars):dayName;}
Date.prototype.gDN=gDN;function gFF(moneyIn,showZeroCents,noDollarSign){var moneyOut="";moneyIn=moneyIn.toFixed(2);var moneyInStr=moneyIn.toString();var Money=moneyInStr.split(".");var dollars=Money[0],cents=Money[1];var Dollars=new Array();var counter=0;for(var i=dollars.length-1;i>=0;i--){counter++;Dollars.push(dollars.charAt(i));if(counter%3==0&&i)Dollars.push(",");}
if(!noDollarSign)Dollars.push("$");Dollars.reverse();if(showZeroCents)cents="."+cents;else cents=(cents=="00")?"":"."+cents;moneyOut=Dollars.join("")+cents;return moneyOut;}
function gRF(numberIn){return parseFloat(numberIn.toFixed(2));}
function getXmlDoc(xml){var XmlDoc=null;try{var Parser=new DOMParser();XmlDoc=Parser.parseFromString(xml,"text/xml");}
catch(Err){try{XmlDoc=new ActiveXObject("Microsoft.XMLDOM");XmlDoc.async="false";XmlDoc.loadXML(xml);}
catch(Err){var err="";for(member in Err)err+=member+": "+Err[member]+"\n";alert("Exception at getXmlDoc function:\n\n"+err);}}
if(!XmlDoc)alert("Error at getXmlDoc function: Return value is null");return XmlDoc;}
function verifyEmail(Textbox,htm){Textbox.value=Textbox.value.replace(/\s/g, "" );
var EmailArr=Textbox.value.split(",");for(var i in EmailArr){if( !emailRE.test(EmailArr[i])){var Out=new Array();Out.push("We");Out.push((htm)?"&rsquo;":"\u2019");Out.push("re sorry but ");Out.push((htm)?"&ldquo;":"\u201C");Out.push(EmailArr[i]);Out.push((htm)?"&rdquo;":"\u201D");Out.push(" is an invalid e-mail address. Some examples of valid e-mail addresses are:\n");Out.push((htm)?"<ul>":"\n");Out.push((htm)?"<li>":"  \u2022 ");Out.push("Joe@Hotmail.com");Out.push((htm)?"</li>":"\n");Out.push((htm)?"<li>":"  \u2022 ");Out.push("LadyGaga@aol.com");Out.push((htm)?"</li>":"\n");Out.push((htm)?"<li>":"  \u2022 ");Out.push("Madonna@gmail.com");Out.push((htm)?"</li>":"\n");Out.push((htm)?"</ul>":"\n");Out.push("Valid e-mails contain 1 ");Out.push((htm)?"&ldquo;":"\u201C");Out.push("@");Out.push((htm)?"&rdquo;":"\u201D");Out.push(" character & end with .com .net .us .ca etc.");if(htm){Out.push("<div align='center' style='margin:6px 0px 0px 0px;'>");Out.push("<input type='button' value='OK' id='DW_OK' class='DwOk' onClick='DW.removeWin();' title='Close message' />");Out.push("</div>");Out.push("<input type='hidden' id='EvalOnClose' value='gId(\""+Textbox.id+"\").focus();' />");}
var out=Out.join("");if(htm){DW.createWindow(["Invalid E-Mail Address",out],[0,500,0],null,null,10,[4,0,0],null,1);gId("DW_OK").focus();}
else{alert(out);Textbox.focus();}
return true;}}
return false;}
function deleteHtmlTags(TagNames){var txt=this.toString();for(var i=0;i<TagNames.length;i++){var tagName=TagNames[i];var Pattern=new RegExp("(<"+tagName+".*?>)|(<\/"+tagName+">)","gi");txt=txt.replace(Pattern,"");}
return txt;}
String.prototype.dHTM=deleteHtmlTags;function gDt(){var dateStr=this.toString();var DateMembers=dateStr.split("/");for(var i=0;i<DateMembers.length;i++)DateMembers[i]=parseInt(DateMembers[i].replace(/^0+/, "" ) );
var twoThousand=(DateMembers[2]<2000)?2000:0;return new Date(DateMembers[2]+twoThousand,DateMembers[0]-1,DateMembers[1]);}
String.prototype.gDt=gDt;function getAjaxRequest(){var Request=null;if(window.XMLHttpRequest){try{Request=new XMLHttpRequest();}
catch(Err){Request=null;}}
else if(window.ActiveXObject){try{Request=new ActiveXObject("Msxml2.XMLHTTP");}
catch(Err){try{Request=new ActiveXObject("Microsoft.XMLHTTP");}
catch(Err){Request=null;}}}
return Request;}
function getRequestBody(Form){function encodeNameAndValue(theName,theValue){var output=encodeURIComponent(theName);output+="=";output+=encodeURIComponent(theValue);return output;}
var NameVals=new Array();for(var i=0;i<Form.elements.length;i++){var Field=Form.elements[i];switch(Field.type){case "button":case "submit":case "reset":break;case "checkbox":case "radio":if(!Field.checked)break;case "text":case "hidden":case "password":NameVals.push(encodeNameAndValue(Field.name,Field.value));break;case "textarea":var val=Field.value.replace(/\r/g, "" ).replace(/\n/g, "\r\n" );
NameVals.push(encodeNameAndValue(Field.name,val));break;case "select-one":NameVals.push(encodeNameAndValue(Field.name,Field.options[Field.selectedIndex].value));break;case "select-multiple":break;default:NameVals.push(encodeNameAndValue(Field.name,Field.value));}}
return NameVals.join("&");}
function initPullDowns(){if(window.yachtFS)document.getElementById("YachtSelect").selectedIndex=0;}
function getWinWid(){return(document.body.clientWidth)?document.body.clientWidth:window.innerWidth;}
function setGlobalQstr(){var path=document.location.pathname;var FileComponents=path.split("-");var sortVal=FileComponents[1];var propName=FileComponents[2].replace(/\.html$/, "" );
qStr="data=fs-"+sortVal+"-"+propName+".js";}
function PreLoader(){var Today=getToday();var cacheBuster=Today.getFullYear()+"-"+(Today.getMonth()+1)+"-"+Today.getDate();this.Files=["listings.html","listings.html?show=sp","listings.html?show=lm","images/TVVLogo02.png","images/TVVLogo03.png","data/listings.js","data/incentives.js","db/global_data.js?cb="+cacheBuster,"images/IndexPhotos01.jpg","calendar.html","calendar/rThPo3eWx.js","code/calendar.js","code/villa1.js","code/villa2.js","code/fact-sheet.js","code/thumbnails.js","code/ss.js","code/calendarAdmin.js","concierge-services.html","our-friends.html","doorway-gallery.html","testmonial-main.html","privacy-stmt.html","terms_cond_disc.html","res-process.html","credentials.html","staff-member.html","staff-services.html","car-rentals.html","inquiry-form.html","code/form.js","code/mail-calendar.js",null];this.debug=0;if(this.debug)DeleteCookie("nFilesCached");this.Request=null;this.timer=0;this.nFilesCachedCookie=GetCookie("nFilesCached");this.nFilesCached=(this.nFilesCachedCookie)?parseInt(this.nFilesCachedCookie):0;this.run=run;if(this.debug)self.status="File preloader started...";function run(){if(window.XMLHttpRequest){try{this.Request=new XMLHttpRequest();}
catch(Err){this.Request=null;}}
else if(window.ActiveXObject){try{this.Request=new ActiveXObject("Msxml2.XMLHTTP");}
catch(Err){try{this.Request=new ActiveXObject("Microsoft.XMLHTTP");}
catch(Err){this.Request=null;}}}
clearTimeout(PL.timer);if(this.Request){if(this.nFilesCached<this.Files.length-1){this.Request.onreadystatechange=function(){try{if(PL.Request.readyState==4){if(PL.Request.status==200){if(PL.debug)self.status=PL.Files[PL.nFilesCached]+" preloaded; #"+((PL.nFilesCached+1)+" of "+(PL.Files.length-1));}
else{if(PL.debug)alert("File preloader encountered an error retrieving: \n "+PL.Files[PL.nFilesCached]+"\n Status: "+PL.Request.status+"\n StatusText: "+PL.Request.statusText+"\n Number "+((PL.nFilesCached+1)+" of "+(PL.Files.length-1)));}
PL.nFilesCached++;SetCookie("nFilesCached",PL.nFilesCached);PL.timer=setTimeout("if( window.PL ) PL.run();",100);}}
catch(Err){var eMsg="Exception at PL.run()\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";try{if(PL.debug)alert(eMsg);} catch(Err){self.status=eMsg.replace(/\n/g, " " ); }}}
this.Request.open("GET",this.Files[this.nFilesCached],true);this.Request.send(null);}}
else if(PL.debug)self.status="Browser does not support the HttpRequest Request Protocol";}}
PL=new PreLoader();function writeCookMsg(){if(!navigator.cookieEnabled)document.write("<div align='center' style='margin:0px 0px 10px 0px;'><iframe src='cookies.html' width='750' height='80' frameborder='0' scrolling='yes' marginheight='0' marginwidth='0' align='top'></iframe></div>");}
Msg=new Array();Msg.enlarge="Click to enlarge";var dText=new Array("Luxury Vacation Villa Reservations with Personal Concierge Services...","We've got a wide selections of villas on Maui...","You'll love our Tropical Yacht Vacations...","Find out about special promotions & holiday openings","We have Villas on Kauai, Oahu, Big Isle, Molokai & Lanai","You're going to love our fully automated slide shows...","We have villas in Asia & the South Pacific too...","Learn about us, our villas and how we do business...","Real Estate Services \"teaser tip\" forthcoming...","Concierge Services \"teaser tip\" forthcoming...","Rocky Mountain Retreats \"teaser tip\" forthcoming...","Learn more about our business friends and affiliates...","Fill out our rental inquiry form & we will get right back to you","Goes back to our homepage...","ADMIN: Click to view private listings...; this link only appears local...","Opening connection to Data-Base - please wait...","Click to learn more about this property...","ADMIN: Click for web site help; this link only appears local...","You'll love viewing photos of this property with our automated slide-show...","View photos of this property in a traditional \"click to enlarge\" style &amp; print them too...","Read our detailed \"printer-friendly\" fact sheet &amp; learn more about this property","Record this property in your \"List of Favorites\" so you can submit it with your inquiry","E-mail this property to your friends and family so they can review it too...","View our current booking calendar to check this property for availability","Fill out our Rental Inquiry/Reply form and send us your \"List of Favorites\" too...","Read what our many other satisfied customers said about this property","Click to show bedroom info...","Click to hide bedroom info...","View our reservation calendars & find open dates","Send us an e-mail now...","Loads calendar in a pop-up - you WILL NOT LOSE info you have entered into this form","Click flower links below to learn more about ","View this property's availability-calendar in a pop-up window","Get exact pricing and submit a rental-request...","Get a quote with our new Rental Calculator","View rental rates for this property","Place Holder");function writeFooter(){var Htm=new Array();Htm.push("<DIV ALIGN='center'>");Htm.push("For Reservations & Information, complete our <A HREF='inquiry-form.html' onMouseOver='if( window.DM ) DM.killOthers( this ); self.status=dText[12]; return true;' onMouseOut='self.status=\"\"; return true;' TITLE='"+dText[12]+"'>Inquiry Form</A> OR;<BR>Send e-mail to ");Htm.push(getEmailLink(TVV.EmailInquiryReservations,"Tropical Villa Vacations Web Site E-Mail",""));Htm.push(" or call us at ");Htm.push(TVV.PhoneTollFree);Htm.push(" ext ");Htm.push(TVV.RentalInqExt);if(staffUser){Htm.push("<div style='margin:25px 0px 0px 0px;'>");Htm.push("<a href='javascript:void(0);' onMouseover='if( window.DM ) DM.start( this, event, \"staff_only\", \"above\" );' onMouseout='if( window.DM ) DM.hide();' style='cursor:default;'>TVV Staff-Only Features</a>");Htm.push("</div>");}
Htm.push("</DIV>");Htm.push("<BR>");var htm=Htm.join("");document.write(htm);if(pageTitle)document.title=pageTitle;}
function trimString(){var TestString=this;var SpaceChar=" ";while(TestString.charAt(0)==SpaceChar){TestString=TestString.substr(1)};while(TestString.charAt(TestString.length-1)==SpaceChar){TestString=TestString.substr(0,TestString.length-1)};return TestString.toString();}
String.prototype.trimMe=trimString;function replaceLiteral(target,replacement){var tilda=(target=="~")?"":"~";var str=tilda+this.toString()+tilda;str=str.split(target).join(replacement);return str.substring(tilda.length,str.length-tilda.length);}
String.prototype.replaceLiteral=replaceLiteral;function recordData(key,value,CookieExpDate){var cookieName=this.toString();var data=GetCookie(cookieName);if(!data)data="";value=value.replace(/&/g, "and" ).replace(/=/g, "is" );
var KeyVals=data.split("&");var existingKey=0;for(var i=0;i<KeyVals.length;i++){var ThisPair=KeyVals[i].split("=");if(key==ThisPair[0]){if(value)KeyVals[i]=key+"="+value;else
KeyVals.splice(i,1);data=KeyVals.join("&");existingKey=1;break;}}
if(value&&!existingKey)data+=((data)?"&":"")+key+"="+value;if(data)SetCookie(cookieName,data,((CookieExpDate)?CookieExpDate:null),"/",cookieDomain);else
DeleteCookie(cookieName,"/",cookieDomain);}
String.prototype.recordData=recordData;function gV(key,delimeter,equals){var value=null;var strToSearch=this.toString();if(!delimeter)delimeter="&";if(!equals)equals="=";var KeyVals=strToSearch.split(delimeter);for(member in KeyVals){var ThisPair=KeyVals[member].split(equals);if(key==ThisPair[0]){value=ThisPair[1];break;}}
if(typeof value=="undefined")value="";return value;}
String.prototype.gV=gV;String.prototype.getVal=gV;function trim(){var str=this.toString();return str.replace(/^\s*|\s*$/g, "" );}
String.prototype.trim=trim;var tmpStr="";function removeHtmlTags(){var theString=this.toString();tmpStr=theString;var startPos=theString.indexOf("<");var endPos=theString.indexOf(">");if(startPos!=-1&&endPos!=-1&&(endPos>startPos)){var htmlTag="<"+theString.substring(startPos+1,endPos)+">";tmpStr=theString.replaceLiteral(htmlTag,"");tmpStr.removeHtmlTags();}
return tmpStr;}
String.prototype.removeHtmlTags=removeHtmlTags;function cleanIt(){var out=this.toString();return out.replace(/\^/g, "\"" );}
String.prototype.cleanIt=cleanIt;function unscramble(){var eMailOut="";var eMailIn=this.toString();if(eMailIn&&eMailIn.indexOf("@")==-1){eMailIn=eMailIn.replace(/\s{2}/g, "." ).replace(/\s{1}/g, "@" );
for(k=0;k<=eMailIn.length;k++)eMailOut=eMailIn.charAt(k)+eMailOut;return eMailOut;}
else
return eMailIn;}
String.prototype.unscramble=unscramble;function scramble(){var eMailIn=this.toString();if(eMailIn&&eMailIn.indexOf("@")>=0){eMailIn=eMailIn.replace(/\./g, "  " ).replace(/@/g, " " );
var eMailOut="";for(i=0;i<=eMailIn .length;i++)eMailOut=eMailIn.charAt(i)+eMailOut;return eMailOut;}
else
return eMailIn;}
String.prototype.scramble=scramble;function getEmailLink(recipient,subject,message){if(!subject&&message)subject=" ";if(recipient.indexOf("@")==-1){var eMailOut="";var eMailIn=recipient.replace(/\s{2}/g, "." ).replace(/\s{1}/g, "@" );
for(k=0;k<=eMailIn.length;k++)eMailOut=eMailIn.charAt(k)+eMailOut;recipient=eMailOut;}
return "<a href='mailto:"+recipient+"?subject="+escape(subject)+((message)?"&body="+escape(message):"")+"' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title='Send e-mail to "+recipient+"'>"+recipient+"</a>";}
FadeObj=null;transDur=-1;transDelay=-1;fadeOpacity=0,fadeOpacityTimer=0,fadeStartTime=0;opacityStep=(window.Settings&&window.Settings.SS&&Settings.transDur)?1/(Settings.transDur/.04):.05;function getOpacity(){return(IE)?"visibility:hidden;":"opacity:0;";}
function setOpacity(Obj){(IE)?Obj.style.visibility="hidden":Obj.style.opacity=0;}
function startFade(FadeObj,transDur,transDelay){if(window.FadeObj==null&&desktopComputer){window.FadeObj=FadeObj;if(IE){window.transDur=transDur;window.transDelay=transDelay;setTimeout("fadeInDirectX()",transDelay);}
else{fadeStartTime=new Date().getTime();FadeObj.onload=function(){};(transDelay)?setTimeout("fadeIn()",transDelay):fadeIn();}}
else{(IE)?FadeObj.style.visibility="visible":FadeObj.style.opacity=1;FadeObj.style.visibility="visible";}}
function fadeIn(){if(FadeObj){FadeObj.style.opacity=fadeOpacity;fadeOpacity+=opacityStep;if(fadeOpacity<1)fadeOpacityTimer=setTimeout("fadeIn();",40);else{FadeObj.style.opacity=1;clearTimeout(fadeOpacityTimer);fadeOpacity=0;var fadeEndTime=new Date().getTime();var fadeDuration=fadeEndTime-fadeStartTime;fadeStartTime=0;if(fadeDuration>1500)opacityStep+=.03;FadeObj=null;}}}
function fadeInDirectX(){if(FadeObj){try{FadeObj.style.filter="progid:DXImageTransform.Microsoft.Fade(duration="+transDur+",overlap=1)";FadeObj.filters(0).apply();FadeObj.style.visibility="visible";FadeObj.filters(0).play();FadeObj.onfilterchange=function(){FadeObj=null;}}
catch(Err){if(local){var eMsg="Exception Caught in fadeInDirectX function:\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";alert(eMsg);}
try{FadeObj.style.visibility="visible";} catch(Err){;}}}}
function getPhotoCaption(captionIn){if(!captionIn)captionIn="";var captionOut=captionIn.trim();captionOut=captionOut.replace(/\^/g, "\"" );
switch(captionOut){case "":captionOut=Settings.defaultCaption;captionOut=captionOut.replace(/<>/g, "<span class=\"dwBullet\">&#149;</span>" );
break;case "_":captionOut="";break;default:captionOut=captionOut.replace(/ *\[ */g, "[" ).replace(/ *\] */g, "]" );
captionOut=captionOut.replace(/\]\[/g, "<br/>" );
captionOut=captionOut.replace(/\[/, "<div class=\"dwTitleLine2\">" ).replace(/]/, "</div>" );
captionOut=captionOut.replace(/<>/g, "<span class=\"dwBullet\">&#149;</span>" );
captionOut=captionOut.replace(/'/g, "&#39;" );
captionOut=captionOut.replace(/%20/g, " " );}
return captionOut;}
function initImagesArr(){try{if(Images[Images.length-1]==null)Images.pop();}
catch(Err){alert("Images array cannot be initialized because the data it contains is malformed (bad syntax)");}}
var GlobalDataXml=null;function downloadXML(){var Request=getAjaxRequest();Request.open("GET","db/global_data.xml",false);Request.send("");GlobalDataXml=Request.responseXML;}
function getCallout(dTextIndex){var calloutType="<BR>";var dTextCol="#000000";var msg=(dTextIndex>=0)?dText[dTextIndex]+Villas[gVillaRecNum][1]:"&nbsp;";calloutType="<DIV ID='callout' STYLE='color:"+dTextCol+"; margin:4px; font-size:12pt; font-family: arial, helvetica;'>"+msg+"</DIV>";return calloutType;}
var timeout=0;function activateMsg(msg){try{clearTimeout(timeout);document.getElementById('callout').innerHTML=msg;}
catch(e){}}
function deActivateMsg(dTextIndex){try{gMsgOff=(dTextIndex>=0)?dText[dTextIndex]+Villas[gVillaRecNum][1]:"&nbsp;";timeout=setTimeout('document.getElementById(\'callout\').innerHTML=gMsgOff',500);}
catch(e){}}
function writeSeparator(txt0,txt1){document.write(txt0+'<DIV CLASS="normFaint">___________________________________________________________________________________</DIV>'+txt1);}
var calcWindow;function launchCalculator(propId,dateIn,dateOut,eMail,guest,rent,rsf,rstFee,rstFeeTx,outCln,outClnGET,outClnTAT,secDep){if(qStr&&!propId){var dataFile=qStr.gV("data");if(dataFile)propId=dataFile.replace(/^data=fs-|\.js$/g, "" ).replace(/^.+-/, "" );}
var wWid=900,wHgt=840,leftPos=0,topPos=0;var file=(staffUser)?"calculator.aspx":"calculator-public.aspx";var url=file+"?id="+propId;if(dateIn&&dateOut)url+="&in="+dateIn+"&out="+dateOut;if(eMail)url+="&eMail="+eMail;if(guest)url+="&guest="+guest;if(rent)url+="&rent="+rent;if(rsf)url+="&rsf="+rsf;if(rstFee)url+="&rstFee="+rstFee;if(rstFeeTx)url+="&rstFeeTx="+rstFeeTx;if(outCln)url+="&outCln="+outCln;if(outClnGET)url+="&outClnGET="+outClnGET;if(outClnTAT)url+="&outClnTAT="+outClnTAT;if(secDep)url+="&secDep="+secDep;var avWid=screen.availWidth-10;var avHgt=screen.availHeight-30;if(wWid>avWid*0.90)wWid=avWid*0.90;if(wHgt>=avHgt)wHgt=avHgt;else
topPos=parseInt((avHgt-wHgt)/2);leftPos=parseInt((avWid-wWid)/2);calcWindow=window.open(url,"_blank","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width="+wWid+",height="+wHgt+",top="+topPos+",left="+leftPos);}
function PopUp(){this.PrinterFriendlyContactInfo=null;this.printerFriendlyCss="code/stylesPrintFriendly.css";this.Win=null;this.openWin=openWin;this.printerFriendly=printerFriendly;this.closeWin=closeWin;this.linkToWin=linkToWin;function openWin(url,tBar,lBar,sBar,mBar,wWid,wHgt,scBar,reSize,wPos){if(!url)url="about:blank";var rentalCalculator=(tBar==4);var nArgs=arguments.length;if(nArgs==2||nArgs==10){var avWid=screen.availWidth-10;var avHgt=screen.availHeight-30;if(nArgs==2){switch(tBar){case 1:tBar=1;lBar=1;sBar=1;mBar=1;wWid=.8;wHgt=.6;scBar=1;reSize=1;wPos=1;break;case 2:tBar=0;lBar=0;sBar=1;mBar=0;wWid=.7;wHgt=.5;scBar=1;reSize=1;wPos=1;break;case 3:tBar=0;lBar=0;sBar=1;mBar=0;wWid=1;wHgt=1;scBar=1;reSize=1;wPos=1;break;case 4:tBar=0;lBar=0;sBar=1;mBar=0;wWid=900;wHgt=840;scBar=1;reSize=1;wPos=2;break;}}
if(wWid<1)wWid=wWid*avWid;if(wWid>avWid*0.90||wWid==1)wWid=avWid*0.90;if(rentalCalculator){if(wHgt>=avHgt){wHgt=avHgt;wPos=1;}}
else{if(wHgt>avHgt*0.70||wHgt==1)wHgt=avHgt*0.70;if(wHgt<1)wHgt=wHgt*avHgt;}
var leftPos=0;var topPos=0;switch(wPos){case 1:leftPos=parseInt((avWid-wWid)/2);break;case 2:leftPos=parseInt((avWid-wWid)/2);topPos=parseInt((avHgt-wHgt)/2);break;}
this.Win=window.open(url,"_blank","toolbar="+tBar+",location="+lBar+",directories=0,status="+sBar+",menubar="+mBar+",scrollbars="+scBar+",resizable="+reSize+",width="+wWid+",height="+wHgt+",top="+topPos+",left="+leftPos);}
else
alert("ERROR: "+nArgs+" arguments have been passed to method \"PopUp.openWin\", it accepts either 2 or 10 arguments.");}
function printerFriendly(removeImages,ExcludedPfContentSections){if(ExcludedPfContentSections){for(var i=0;i<ExcludedPfContentSections.length;i++){if(document.getElementById(ExcludedPfContentSections[i]))document.getElementById(ExcludedPfContentSections[i]).className="pfHide";}}
var nTitle=1;var pageTitle="";while(document.getElementById("pfTitle"+nTitle)){pageTitle+=document.getElementById("pfTitle"+nTitle).innerHTML+" ";pageTitle=pageTitle.replace(/<a\s.*?>/gi , "" );
pageTitle=pageTitle.replace(/<\/a.*?>/gi , "" );
nTitle++;}
var pfPageTitle=(pageTitle)?pageTitle:document.title;var htm="<html><head><title>"+document.title+"</title><link rel='stylesheet' href='"+this.printerFriendlyCss+"' type='text\/css'></head>";htm+=(live)?"<body onLoad='if( window.print ) window.print();'>":"<body>";if(this.PrinterFriendlyContactInfo){for(var i=0;i<this.PrinterFriendlyContactInfo.length;i++){htm+=this.PrinterFriendlyContactInfo[i][0]+eval(this.PrinterFriendlyContactInfo[i][1])+this.PrinterFriendlyContactInfo[i][2];}}
htm+="</div>";var nContent=1;outer:while(document.getElementById("pfContent"+nContent)){var content=document.getElementById("pfContent"+nContent).innerHTML;content=content.replace(/<a\s.*?>/gi , "" );
content=content.replace(/<\/a.*?>/gi , "" );
if(removeImages)content=content.replace(/<img\s.*?>/gi , "" );
content=content.replace(/<script[\d\D]*?<\/script>/gi , "" );
htm+=content;nContent++;}
if(document.getElementById("pfFooter"))htm+="<p class='pfFooter'>"+document.getElementById("pfFooter").innerHTML+"</p>";htm+="</body></html>";if(nContent>1){this.closeWin();this.openWin("",1);this.Win.document.write(htm);this.Win.document.close();}
else
reportError("Error at PopUp.printerFriendly","No printer friendly sections (pfContent*) found...");if(ExcludedPfContentSections){for(var i=0;i<ExcludedPfContentSections.length;i++){if(document.getElementById(ExcludedPfContentSections[i]))document.getElementById(ExcludedPfContentSections[i]).className="pfShow";}}}
function closeWin(){try{if(this.Win&&this.Win.open&&!this.Win.closed){this.Win.close();this.Win=null;}}
catch(e){}}
function linkToWin(){if(PopUp&&PopUp.Win&&PopUp.Win.registered){if(PopUp.Win.MyOpener!=self)PopUp.Win.MyOpener=self;}
else setTimeout("PopUp.linkToWin()",250);}}
PopUp=new PopUp();function Popup(){this.Win=null;this.openWin=openWin;this.closeWin=closeWin;this.linkToWin=linkToWin;function openWin(url,wType,wWid,wHgt,wPos,tBar,lBar,sBar,mBar,scBar,reSize){if(!url)url="about:blank";var article=false;switch(wType){case 1:wWid=600,wHgt=500,wPos=2,tBar=0,lBar=0,sBar=0,mBar=0,scBar=1,reSize=1;break;case 2:wWid=650,wHgt=315,wPos=2,tBar=0,lBar=0,sBar=1,mBar=0,scBar=0,reSize=0;break;case 3:url="popup.aspx?img="+url+"&wid="+wWid+"&hgt="+wHgt;wWid+=140,wHgt=screen.availHeight,wPos=1;if(wWid>screen.availWidth)wWid=screen.availWidth;article=true;break;case 4:wWid=800,wHgt=800,wPos=2,tBar=0,lBar=0,sBar=1,mBar=0,scBar=1,reSize=1;break;}
if(typeof wWid=="undefined"||typeof wWid==null)wWid=.8;if(typeof wHgt=="undefined"||typeof wHgt==null)wHgt=.6;if(typeof wPos=="undefined"||typeof wPos==null)wPos=2;if(typeof tBar=="undefined"||typeof tBar==null)tBar=1;if(typeof lBar=="undefined"||typeof lBar==null)lBar=1;if(typeof sBar=="undefined"||typeof sBar==null)sBar=1;if(typeof mBar=="undefined"||typeof mBar==null)mBar=1;if(typeof scBar=="undefined"||typeof scBar==null)scBar=1;if(typeof reSize=="undefined"||typeof reSize==null)reSize=1;var avWid=screen.availWidth-10;var avHgt=screen.availHeight-30;if(!article){if(wWid<1)wWid=wWid*avWid;if(wWid>avWid*0.90||wWid==1)wWid=avWid*0.90;if(wHgt<1)wHgt=wHgt*avHgt;if(wHgt>avHgt*0.70||wHgt==1)wHgt=avHgt*0.70;}
var leftPos=0;var topPos=0;switch(wPos){case 1:leftPos=parseInt((avWid-wWid)/2);break;case 2:leftPos=parseInt((avWid-wWid)/2);topPos=parseInt((avHgt-wHgt)/2);break;}
this.Win=window.open(url,"_blank","toolbar="+tBar+",location="+lBar+",directories=0,status="+sBar+",menubar="+mBar+",scrollbars="+scBar+",resizable="+reSize+",width="+wWid+",height="+wHgt+",top="+topPos+",left="+leftPos);}
function closeWin(){try{if(this.Win&&this.Win.open&&!this.Win.closed){this.Win.close();this.Win=null;}}
catch(e){}}
function linkToWin(){if(Popup&&Popup.Win&&Popup.Win.registered){if(Popup.Win.MyOpener!=self)Popup.Win.MyOpener=self;}
else setTimeout("Popup.linkToWin()",250);}} Popup=new Popup();function getCookieVal(offset){var endstr=document.cookie.indexOf(";",offset);if(endstr==-1)endstr=document.cookie.length;return unescape(document.cookie.substring(offset,endstr));}
function GetCookie(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen){var j=i+alen;if(document.cookie.substring(i,j)==arg)return getCookieVal(j);i=document.cookie.indexOf(" ",i)+1;if(i==0)break;}
  return null;}
function SetCookie(name,value,expires,path,domain,secure){document.cookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");}
function DeleteCookie(name,path,domain){if(GetCookie(name)){document.cookie=name+"="+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}
var expdate=new Date();var expdate1=new Date();expdate.setTime(expdate.getTime()+(24*60*60*365*1000));expdate1.setTime(expdate1.getTime()+(24*60*60*30*1000));readP=0,readP_Elev=0,writeP="";staffUser=(GetCookie("agentCookie")||GetCookie("writeCookie"));if(GetCookie("writeCookie"))SetCookie("agentCookie","1-1",null,"/");publicUser=!staffUser;var qStrReferrer=qStr;var refPage=(qStrReferrer!=null&&qStrReferrer.indexOf("tvvref=")==0)?qStrReferrer.split("tvvref=")[1]:document.referrer;if(!GetCookie('tvvReferrer'))SetCookie('tvvReferrer',refPage,null,'/');var showAllErrors=(GetCookie("ReportErrors")=="true")?true:false;function noContextMenu(theEvent){if(theEvent)event=theEvent;event.cancelBubble=true;event.returnValue=false;return false;}
function noRightClick(e){if(window.Event){if(e.which==2||e.which==3||e.ctrlKey)return false;}
  else if(event.button==2||event.button==3||event.ctrlKey){event.cancelBubble=true;event.returnValue=false;return false;}}
if((live||live)&&!GetCookie("ReportErrors")&&!GetCookie("agentCookie"))document.oncontextmenu=function(){return false;}
function sloganStatus(){setTimeout("defaultStatus = dText[0]",500);}
function listingStatus(){setTimeout("defaultStatus = nDataRows + ' listings available...'",500);}
function DataBaseStatus(){self.status=dText[15];}
function formatDate(theDate){var date=new Date(theDate);var unForYear=""+date.getYear();var forYear=unForYear.substring(unForYear.length-2);return ""+(date.getMonth()+1)+"/"+date.getDate()+"/"+forYear;}
function startFilter(){if(winIE){eval("try{ photo.filters.item(0).apply();photo.style.visibility = 'visible';photo.filters.item(0).play();}catch( e ) { photo.style.visibility = 'visible'; }");}}
var flowerOff=new Image();flowerOff.src="images/flowerOff.png";var flowerOn=new Image();flowerOn.src="images/flowerOn.png";function activateBut(imgName){try{document[imgName].src=eval("flowerOn.src");} catch(e){}}
function deActivateBut(imgName){try{document[imgName].src=eval("flowerOff.src");} catch(e){}}
function getRandomNum(maxNum){if(maxNum==null)maxNum=5;var randNum=(Math.round(maxNum*Math.random())+1)%maxNum+1;return randNum;}
function resetGalleryPullDown(){if(eval("typeof document.gallery_form.gallery")=="object")document.gallery_form.gallery.selectedIndex=0;}
function resetPullDown(pullDownID){if(staffUser&&pullDownID=="bot"){var qStrOut="";if(qStr){var dataFile=qStr.gV("data");if(dataFile)qStrOut="&data="+dataFile;}
var valCalc="calculator_rent",txtCalc="LAUNCH RENTAL CALCULATOR";var CalcOptTop=document.createElement("option");CalcOptTop.value=valCalc,CalcOptTop.text=txtCalc;var CalcOptBot=document.createElement("option");CalcOptBot.value=valCalc,CalcOptBot.text=txtCalc;var valRateMan="db/properties/index.html?lastPage="+fileName+qStrOut+"#managed",txtRateMan="RATE CHART - MANAGED";var RateManOptTop=document.createElement("option");RateManOptTop.value=valRateMan,RateManOptTop.text=txtRateMan;var RateManOptBot=document.createElement("option");RateManOptBot.value=valRateMan,RateManOptBot.text=txtRateMan;var valRateNonMan="db/properties/index.html?lastPage="+fileName+qStrOut+"#non-managed",txtRateNonMan="RATE CHART - UNMANAGED";var RateNonManOptTop=document.createElement("option");RateNonManOptTop.value=valRateNonMan,RateNonManOptTop.text=txtRateNonMan;var RateNonManOptBot=document.createElement("option");RateNonManOptBot.value=valRateNonMan,RateNonManOptBot.text=txtRateNonMan;var valDB="db/?lastPage="+fileName+qStrOut+"#edit_property",txtDB="EDIT RATES";var DBOptTop=document.createElement("option");DBOptTop.value=valDB,DBOptTop.text=txtDB;var DBOptBot=document.createElement("option");DBOptBot.value=valDB,DBOptBot.text=txtDB;var SelectTop=document.getElementById("select_top");var SelectBot=document.getElementById("select_bot");try{if(SelectTop){SelectTop.add(DBOptTop,SelectTop.options[1]);SelectTop.add(RateNonManOptTop,SelectTop.options[1]);SelectTop.add(RateManOptTop,SelectTop.options[1]);SelectTop.add(CalcOptTop,SelectTop.options[1]);}
if(SelectBot){SelectBot.add(DBOptBot,SelectBot.options[1]);SelectBot.add(RateNonManOptBot,SelectBot.options[1]);SelectBot.add(RateManOptBot,SelectBot.options[1]);SelectBot.add(CalcOptBot,SelectBot.options[1]);}}
catch(Err){if(SelectTop){SelectTop.add(DBOptTop,1);SelectTop.add(RateNonManOptTop,1);SelectTop.add(RateManOptTop,1);SelectTop.add(CalcOptTop,1);}
if(SelectBot){SelectBot.add(DBOptBot,1);SelectBot.add(RateNonManOptBot,1);SelectBot.add(RateManOptBot,1);SelectBot.add(CalcOptBot,1);}}}}
function getGalleryPullDown(){return "<form name='gallery_form'><select name='gallery' onChange='goTo( this );' class='pullDown'><option value='doorway-gallery.html|none'>Take me to another photo gallery...</option><option value='ss.html?data=pg-southmaui.js|3'>&nbsp;&#149;&nbsp;South Maui Slide Show</option><option value='thumbnails.html?data=pg-southmaui.js'>&nbsp;&#149;&nbsp;South Maui Thumbnails</option><option value='ss.html?data=pg-westmaui.js|3'>&nbsp;&#149;&nbsp;West Maui Slide Show</option><option value='thumbnails.html?data=pg-westmaui.js'>&nbsp;&#149;&nbsp;West Maui Thumbnails</option><option value='ss.html?data=pg-northmaui.js|3'>&nbsp;&#149;&nbsp;North Maui Slide Show</option><option value='thumbnails.html?data=pg-northmaui.js'>&nbsp;&#149;&nbsp;North Maui Thumbnails</option><option value='ss.html?data=pg-bigisle.js|3'>&nbsp;&#149;&nbsp;Hawaii Big Island Slide Show</option><option value='thumbnails.html?data=pg-bigisle.js'>&nbsp;&#149;&nbsp;Hawaii Big Island Thumbnails</option><option value='ss.html?data=pg-japan.js|3'>&nbsp;&#149;&nbsp;Japan Slide Show</option><option value='thumbnails.html?data=pg-japan.js'>&nbsp;&#149;&nbsp;Japan Thumbnails</option><option value='ss.html?data=pg-tahiti.js|3'>&nbsp;&#149;&nbsp;Tahiti Slide Show</option><option value='thumbnails.html?data=pg-tahiti.js'>&nbsp;&#149;&nbsp;Tahiti Thumbnails</option></select></form>";}
function getFormatedDate(theDate){var date=new Date(theDate);var unForYear=""+date.getYear();var forYear=unForYear.substring(unForYear.length-2);return ""+(date.getMonth()+1)+"/"+date.getDate()+"/"+forYear;}
function showHawaiiTime(){var gmtOffset=10;var now=new Date();var difhrs=now.getTimezoneOffset()/60;var lochrs=now.getHours();GMThours=lochrs+difhrs;now.setHours(GMThours-gmtOffset);var am_pm="AM";var hours=now.getHours();if(hours>=12)am_pm="PM";if(hours>=13)hours-=12;if(hours==0)hours="12";var minutes=now.getMinutes();if(minutes<10)minutes="0"+minutes;var seconds=now.getSeconds();if(seconds<10)seconds="0"+seconds;try{document.getElementById("hawaii_time").innerHTML=hours+":"+minutes+":"+seconds+" "+am_pm;}
catch(Err){}
finally{setTimeout("showHawaiiTime()",1000);}}
function goToPrvPage(){var thisPW="";var pwCookie=GetCookie("PrivateListingsPW");if(pwCookie==PrivateListingsPW)thisPW=PrivateListingsPW;else thisPW=prompt("Password Provided by Tropical Villa Vacations:","");if(thisPW==PrivateListingsPW){document.location.href="listings.html?show=pv";return false;}
else{resetPullDown("top");resetPullDown("bot");if(thisPW)alert("Sorry, but \""+thisPW+"\" is not the correct password...");return false}}
function goTo(PullDown){var val=PullDown[PullDown.selectedIndex].value;if(val){if(val=="calculator_rent"){launchCalculator("");PullDown.selectedIndex=0;}
else{var page=val;var nPopUp=0;if(val.indexOf("|")>=0){var Val=val.split("|");page=Val[0];nPopUp=parseInt(Val[1]);}
if(nPopUp){if(nPopUp==2)PopUp.openWin(page,0,0,1,0,600,300,1,1,2);else
PopUp.openWin(page,nPopUp);PullDown.selectedIndex=0;}
else{if( /^calendar\./i.test(page)){var cal=(window.writeP)?"calendar.aspx":"calendar.html";document.location.href=cal;}
else{if(val.indexOf("?show=pv")>=0)return goToPrvPage();else
document.location.href=page;}}}}}
function getPullDown(pullDownID){var htm="<select name='"+pullDownID+"' id='select_"+pullDownID+"' onChange='goTo( this );' class='pullDown'><option value=''>Take me to...</option>"+Pull_Down+"</select>";return htm;}
SettingsSSE=new Array();SettingsSSE.Dimension=[1000,425];SettingsSSE.borderWid=0;SettingsSSE.borderCol="255,255,255";SettingsSSE.Skew=new Array();SettingsSSE.Skew.IE=[0,0];SettingsSSE.Skew.SF=[0,0];SettingsSSE.Skew.MacFF=[0,0];function SlideShowEmbedded(){try{if(ImagesSSE[ImagesSSE.length-1]==null)ImagesSSE.pop();}
catch(Err){alert("Embedded Slide-Show Images array cannot be initialized because:\n 1) Data file is non-existent; OR\n 2) The data it contains is malformed (bad syntax)");}
for(var i=0;i<ImagesSSE.length;i++){if(!ImagesSSE[i][1])ImagesSSE[i][1]=SettingsSSE.speed;}
this.slideNum=(live&&SettingsSSE.randomStart)?Math.floor(Math.random()*ImagesSSE.length):0;this.nFirstSlide=this.slideNum;this.speedActual=SettingsSSE.speed*1000;this.SPEED_FAST=500;this.preLoadTimer=0;this.NextImage=null;this.slideDelay=0;this.running=true;this.buttons=false;this.dissolve=true;this.start=start;this.showSlide=showSlide;this.skipErrantSlide=skipErrantSlide;this.preLoadNext=preLoadNext;this.getCoordinates=getCoordinates;this.mouseDown=mouseDown;this.next=next;this.repositionElements=repositionElements;this.pauseSS=pauseSS;window.onresize=this.repositionElements;this.writeSlideShow=writeSlideShow;this.switchSpeed=switchSpeed;function writeSlideShow(){var Htm=new Array();Htm.push("<div id='slideShowContainer' class='ContainerSSE' style='");Htm.push("width:");Htm.push(SettingsSSE.Dimension[0]+SettingsSSE.borderWid*2);Htm.push("px; ");Htm.push("height:");Htm.push(SettingsSSE.Dimension[1]+SettingsSSE.borderWid*2);Htm.push("px; ");Htm.push(getOpacity());Htm.push("'>");Htm.push("<img id='slideShow' class='ImageSSE' onClick='SSE.next( event );' onMousedown='return SSE.mouseDown();' src='images/");Htm.push(ImagesSSE[SSE.nFirstSlide][0]);Htm.push("' style='");Htm.push("width:");Htm.push(SettingsSSE.Dimension[0]);Htm.push("px; height:");Htm.push(SettingsSSE.Dimension[1]);Htm.push("px;");if(SettingsSSE.borderWid){Htm.push(" border:");Htm.push(SettingsSSE.borderWid);Htm.push("px solid rgb( ");Htm.push(SettingsSSE.borderCol);Htm.push(" );");}
Htm.push("' />");Htm.push("</div>");var htm=Htm.join("");gId("SlideShowEmbedded").innerHTML=htm;}
function getCoordinates(TheImage){var x=0;var y=0;TheElement=TheImage;var parPosAbs=false;while(TheElement){if(SF){if(!parPosAbs)parPosAbs=(TheElement.style.position=="absolute");if(parPosAbs&&TheElement==document.body)break;}
y+=TheElement.offsetTop;x+=TheElement.offsetLeft;TheElement=TheElement.offsetParent;}
var skewX=0,skewY=0;if(IE){skewX=SettingsSSE.Skew.IE[0];skewY=SettingsSSE.Skew.IE[1];}
else if(SF){skewX=SettingsSSE.Skew.SF[0];skewY=SettingsSSE.Skew.SF[1];}
else if(FF&&macOS){skewX=SettingsSSE.Skew.MacFF[0];skewY=SettingsSSE.Skew.MacFF[1];}
x+=skewX;y+=skewY;return[x,y];}
function repositionElements(){if(SSE.ImgOverlay){var OverlayPos=SSE.getCoordinates(gId("slideShow").parentNode);SSE.ImgOverlay.style.left=OverlayPos[0]+"px";SSE.ImgOverlay.style.top=OverlayPos[1]+"px";}}
function showSlide(){if(this.NextImage){var TheImage=gId("slideShow");var imgWid=SettingsSSE.Dimension[0];var imgHgt=SettingsSSE.Dimension[1];var imgWidReal=this.NextImage.width;var imgHgtReal=this.NextImage.height;if(local&&imgWidReal>1&&imgHgtReal>1&&(imgWidReal!=imgWid||imgHgtReal!=imgHgt)){var eMsg="\u201C"+ImagesSSE[this.slideNum][0]+"\u201D has incorrect dimensions:\n1) All images must be sized to "+imgWid+" \u00D7 "+imgHgt+" pixels\n2) This image is "+imgWidReal+" \u00D7 "+imgHgtReal+" pixels";if(IE)eMsg+="\n\nWe see you are using Internet Explorer. It suffers from a peculiar bug such that even if you correct the dimensions, it may continue to report this error! If so, then change the file name too, for example:\nbeach.jpg \u21D2 beach1.jpg";alert(eMsg);}
if(this.dissolve&&this.speedActual>this.SPEED_FAST){var nNewImg=(ImagesSSE.length==this.slideNum)?0:this.slideNum;var nOldImg=(nNewImg==0)?ImagesSSE.length-1:nNewImg-1;TheImage.width=imgWid;TheImage.height=imgHgt;TheImage.src=Settings.folder+ImagesSSE[nOldImg][0];var Htm=new Array();Htm.push("<img name='slideShowNew' id='slideShowNew' onClick='SSE.next( event );' onMousedown='return SSE.mouseDown();' class='ImageSSE' src='");Htm.push(Settings.folder+ImagesSSE[nNewImg][0]);Htm.push("' ");Htm.push("title='");Htm.push(TheImage.title);Htm.push("' style='");Htm.push("width:");Htm.push(SettingsSSE.Dimension[0]);Htm.push("px; height:");Htm.push(SettingsSSE.Dimension[1]);Htm.push("px;");if(SettingsSSE.borderWid){Htm.push(" border:");Htm.push(SettingsSSE.borderWid);Htm.push("px solid rgb( ");Htm.push(SettingsSSE.borderCol);Htm.push(" );");}
Htm.push("' />");var newImg=Htm.join("");if(!SSE.ImgOverlay){SSE.ImgOverlay=gEl("DIV");SSE.ImgOverlay.style.top=(screen.height*-1)+"px";SSE.ImgOverlay.style.left=(screen.width*-1)+"px";SSE.ImgOverlay.style.zIndex=1000;SSE.ImgOverlay.style.position="absolute";aCh(SSE.ImgOverlay);}
SSE.ImgOverlay.style.width=(SettingsSSE.Dimension[0]+2*SettingsSSE.borderWid)+"px";SSE.ImgOverlay.style.height=(SettingsSSE.Dimension[1]+2*SettingsSSE.borderWid)+"px";(IE)?SSE.ImgOverlay.style.visibility="hidden":SSE.ImgOverlay.style.opacity=0;var OverlayPos=SSE.getCoordinates(TheImage.parentNode);SSE.ImgOverlay.style.left=OverlayPos[0]+"px";SSE.ImgOverlay.style.top=OverlayPos[1]+"px";SSE.ImgOverlay.innerHTML=newImg;startFade(SSE.ImgOverlay,Settings.transDur,0);}
else{if(this.ImgOverlay){rCh(this.ImgOverlay);this.ImgOverlay=null;}
TheImage.style.visibility="hidden";TheImage.width=imgWid;TheImage.height=imgHgt;if(SettingsSSE.borderWid)TheImage.style.borderColor="rgb( "+SettingsSSE.borderCol+" )";TheImage.src=this.NextImage.src;TheImage.style.visibility="visible";}
this.dissolve=true;}}
function skipErrantSlide(){if(local||SSE.speedActual==SSE.SPEED_FAST){if(!SSE.errReported){alert("Slide #"+(SSE.slideNum+1)+"; "+SSE.NextImage.src+" failed to load");SSE.errReported=true;}}
SSE.NextImage=null;}
function preLoadNext(){var recursionTimer=100;this.slideDelay+=recursionTimer;if(!this.NextImage){if(this.SPEED_FAST!=this.speedActual)this.speedActual=ImagesSSE[this.slideNum][1]*1000;this.slideNum++;if(this.slideNum==ImagesSSE.length)this.slideNum=0;this.NextImage=new Image();this.NextImage.onerror=this.skipErrantSlide;this.NextImage.src=Settings.folder+ImagesSSE[this.slideNum][0];}
if(this.NextImage&&this.NextImage.complete&&this.slideDelay>this.speedActual){this.slideDelay=0;this.showSlide();this.NextImage=null;clearTimeout(this.preLoadTimer);this.preLoadNext();}
else
this.preLoadTimer=setTimeout("SSE.preLoadNext()",recursionTimer);}
function next(evt){if(desktopComputer){if(!evt)evt=window.event;if(evt.ctrlKey)return;clearTimeout(this.preLoadTimer);this.dissolve=false;this.pauseSS(false);}}
function pauseSS(pause){if(pause){clearTimeout(this.preLoadTimer);this.running=false;}
else{this.slideDelay=SettingsSSE.speed*1000+1;this.preLoadNext();this.running=true;}}
function start(firstImgDelay){startFade(gId("slideShowContainer"),0.8,0);this.repositionElements();setTimeout("try{ SSE.preLoadNext(); } catch( Err ){ }",firstImgDelay*1000);}
function switchSpeed(hiSpeed){this.speedActual=(hiSpeed)?this.SPEED_FAST:SettingsSSE.speed*1000;}
function mouseDown(){if(Settings.preventImageTheft){document.onmousemove=function(){return false;}
document.onmouseup=function(){return false;}
return false;}}}
function DynamicMenu(FormElements){this.homePage="index.html";this.Links=new Array();this.Links["hawaii"]=Menu_Hawaii;this.Links["aboutUs"]=Menu_AboutUs;this.Links["contact"]=Menu_Contact;var qStrOut="",propId="",pName="";if(qStr){qStrOut="&"+qStr;var dataFile=qStr.gV("data");if(dataFile)propId=dataFile.replace(/^data=fs-|\.js$/g, "" ).replace(/^.+-/, "" );
pName=(window.Villa&&Villa.Name)?" for "+Villa.Name[1]:"";if(pName){pName=pName.replace(/wailea +beach +villas/i, "" );
pName=pName.replace(/ at .*/i, "" );}}
this.Links["staff_only"]=new Array();this.Links["staff_only"].push(["Go to Edit Rental Rates","db/?lastPage="+fileName+qStrOut+"#edit_property",""]);this.Links["staff_only"].push(["Go to Rate Chart - Unmanaged","db/properties/index.html?lastPage="+fileName+qStrOut+"#non-managed",""]);this.Links["staff_only"].push(["Go to Rate Chart - Managed","db/properties/index.html?lastPage="+fileName+qStrOut+"#managed",""]);var mainCal=(GetCookie("writeCookie"))?"calendar.aspx":"calendar.html";this.Links["staff_only"].push(["Go to Main Calendar",mainCal,""]);if(propId)this.Links["staff_only"].push(["View Rates"+pName,"javascript:void(0);","","showRates( \""+propId+"\"); DM.pageShowing = document.location.href;"]);this.Links["staff_only"].push(["Launch Rental Calculator","javascript:void(0);","","launchCalculator(\""+propId+"\"); DM.pageShowing = document.location.href;"]);this.Links["staff_only"].push(["",[4,0],[0,-4],[4,-50],[0,4],[0,0]]);this.formElements=(FormElements)?FormElements:[["aboutUs","select_bot"],["hawaii","botPD"],["hawaii","select_bot"],["hawaii","gallery"]];this.Menu=null;this.OldLink=null;this.timer=0;this.start=start;this.hide=hide;this.killOthers=killOthers;this.keepInWin=keepInWin;this.show=show;this.setElemVis=setElemVis;this.resetTimer=resetTimer;function start(Link,theEvent,arrName,menuPosition){killOthers(Link);show(Link,theEvent,arrName,menuPosition);}
function hide(delay){if(!arguments.length)delay=1000;if(DM.timer==0&&DM.Menu){DM.timer=setTimeout("DM.Menu.innerHTML = '';DM.Menu = null;DM.timer = 0;DM.setElemVis( '', 'visible' );",delay);}}
function killOthers(NewLink){resetTimer();if(DM.Menu&&DM.OldLink&&DM.OldLink!=NewLink){DM.Menu.innerHTML='';DM.Menu=null;DM.timer=0;DM.OldLink=null;DM.setElemVis("","visible");}}
function keepInWin(topEdge,leftEdge,IeBody){var bodyHgt=(IE)?IeBody.clientHeight:window.innerHeight;var bodyWid=(IE)?IeBody.clientWidth:window.innerWidth;var menuHgt=DM.Menu.offsetHeight;var yOffset=(IE)?IeBody.scrollTop:window.pageYOffset;var vScreenPos=topEdge-yOffset;var vSkew=bodyHgt-vScreenPos;if(vSkew<menuHgt+10)topEdge-=menuHgt-vSkew+10;else if(vScreenPos<10)topEdge=10+yOffset;var menuWid=DM.Menu.offsetWidth;var xOffset=(IE)?IeBody.scrollLeft:window.pageXOffset;var hScreenPos=leftEdge-xOffset;var hSkew=bodyWid-hScreenPos;if(hSkew<menuWid+10)leftEdge-=menuWid-hSkew+10;else if(hScreenPos<10)leftEdge=10+xOffset;return[topEdge,leftEdge];}
function show(Link,theEvent,arrName,menuPosition){if(!DM.Menu){DM.setElemVis(arrName,"hidden");var e=(window.event)?event:theEvent;var nLinks=DM.Links[arrName].length-1;var menuTitle=DM.Links[arrName][nLinks][0];var table="<table align='left' border='0' cellspacing='0' cellpadding='0' class='dmBorder' onMouseover='DM.resetTimer();' onMouseout='DM.hide( 0 );'>";for(var i=0;i<nLinks;i++){if(arrName==="summary"&&menuTitle&&i==0){table+="<tr><td nowrap class='dmTitleBg'><div style='width:100%;'><div class='dmTitleFg'>"+menuTitle+"</div></div></td></tr>";}
table+="<tr align='left' valign='middle'>";var content="link";if(DM.Links[arrName][i][1]=="-")content="separator";else if(DM.Links[arrName][i][1]=="text")content="text";var target=(DM.Links[arrName][i][4])?DM.Links[arrName][i][4]:"_self";var domTarget=(target.indexOf("_")==0)?target.substring(1,target.length):"parent."+target;var thePage=eval(domTarget+".document.location.href");var newPage=eval("!"+domTarget+".document.location.hash");var pageShowing=((thePage.substring(thePage.length-DM.Links[arrName][i][1].length,thePage.length)==DM.Links[arrName][i][1]&&newPage)||(thePage.charAt(thePage.length-1)=="/"&&DM.Links[arrName][i][1]==DM.homePage)||DM.pageShowing==DM.Links[arrName][i][1]);if(DM.Links[arrName][i][1].indexOf("calculator.aspx")>=0)pageShowing=false;var selfStatusCode="";if(DM.Links[arrName][i][2]&&!pageShowing)selfStatusCode="self.status = \""+DM.Links[arrName][i][2]+"\"; ";var mouseOutCode=(DM.Links[arrName][i][2])?"self.status = \"\"; ":"";var cursorType=(pageShowing)?"default":(IE)?"hand":"pointer";var onClickMore=(DM.Links[arrName][i][3])?DM.Links[arrName][i][3]:"";if(content=="link"){table+="<td nowrap class='dmMenuBgOff' onMouseOver='"+selfStatusCode+"firstChild.firstChild.className=\""+((pageShowing)?"dmMenuFgDisable":"dmMenuFgOn")+"\"; className=\""+((pageShowing)?"dmMenuBgOff":"dmMenuBgOn")+"\"; return true;' onMouseOut='"+mouseOutCode+"firstChild.firstChild.className=\""+((pageShowing)?"dmMenuFgDisable":"dmMenuFgOff")+"\";  className=\"dmMenuBgOff\"; return true;'><a href='"+((pageShowing)?"javascript:void(0);":DM.Links[arrName][i][1])+"' TARGET='"+target+"' style='text-decoration:none;' onClick='if( href != \"javascript:void(0);\" ) { DM.hide( 0 ); DM.pageShowing = this.href; } else { "+onClickMore+" return false; }' onMouseOver='style.cursor = \""+cursorType+"\"; return true;'><div style='width:100%;' class='"+((pageShowing)?"dmMenuFgDisable":"dmMenuFgOff")+"'>"+DM.Links[arrName][i][0]+"</div></a></td>";}
else if(content=="separator"){table+="<td align='center' class='dmMenuBgOff'><table border='0' cellspacing='0' cellpadding='0' style='width:100%; margin:2px 0px 2px 0px;'><tr><td style='height:1px; width:100%;' class='dmSepCol'></td></tr></table></td>";}
else{table+="<td align='center' class='dmMenuBgOff'><div class='dmTxt' onClick='self.status=\""+DM.Links[arrName][i][2]+"\"; return true;' onMouseout='self.status=\"\"; return true;'>"+DM.Links[arrName][i][0]+"</div></td>";}
table+="</tr>";}
table+="</table><br>";DM.Menu=document.createElement("DIV");document.body.appendChild(DM.Menu);DM.OldLink=Link;DM.Menu.style.zIndex=20000;DM.Menu.style.visibility="hidden";DM.Menu.style.position="absolute";DM.Menu.style.top=(screen.height*-1)+"px";DM.Menu.style.left=(screen.width*-1)+"px";DM.Menu.innerHTML=table;var ieCSS=(IE&&document.compatMode)?document.compatMode=="CSS1Compat":false;var IeBody=null;if(IE)IeBody=(ieCSS)?document.documentElement:document.body;var useLnkPos=(winIE||FF||SF),useEvtPos=!useLnkPos;var x=0,y=0;if(useEvtPos||menuPosition=="relative"){x=(IE)?e.clientX+IeBody.scrollLeft:e.pageX;y=(IE)?e.clientY+IeBody.scrollTop:e.pageY;}
else{var ThisLink=Link;var parPosAbs=false;while(ThisLink){if(SF){if(!parPosAbs)parPosAbs=(ThisLink.style.position=="absolute");if(parPosAbs&&ThisLink==document.body)break;}
y+=ThisLink.offsetTop;x+=ThisLink.offsetLeft;ThisLink=ThisLink.offsetParent;}}
switch(menuPosition){case "relative":var topEdge=(IE)?e.clientY+IeBody.scrollTop:e.pageY;topEdge+=DM.Links[arrName][nLinks][1][1];var leftEdge=(IE)?e.clientX+IeBody.scrollLeft:e.pageX;leftEdge+=DM.Links[arrName][nLinks][1][0];break;case "aboveRel":var topEdge=(IE)?e.clientY+IeBody.scrollTop:e.pageY;topEdge=topEdge-DM.Links[arrName][nLinks][6][1]-DM.Menu.offsetHeight;var leftEdge=(IE)?e.clientX+IeBody.scrollLeft:e.pageX;leftEdge+=DM.Links[arrName][nLinks][6][0];break;case "above":var skewY=(useEvtPos)?parseInt(Link.offsetHeight/2):0;var skewX=(useEvtPos)?parseInt(DM.Menu.offsetWidth/2):0;var topEdge=y-skewY-DM.Menu.offsetHeight+DM.Links[arrName][nLinks][2][1];var leftEdge=x-skewX+DM.Links[arrName][nLinks][2][0];break;case "right":var skewX=(useEvtPos)?Link.offsetWidth:0;var topEdge=y+DM.Links[arrName][nLinks][3][1];var leftEdge=x-skewX+Link.offsetWidth+DM.Links[arrName][nLinks][3][0];break;case "below":var skewY=(useEvtPos)?parseInt(Link.offsetHeight/2):0;var skewX=(useEvtPos)?parseInt(DM.Menu.offsetWidth/2):0;var topEdge=y-skewY+Link.offsetHeight+DM.Links[arrName][nLinks][4][1];var leftEdge=x-skewX+DM.Links[arrName][nLinks][4][0];break;case "left":var topEdge=y+DM.Links[arrName][nLinks][5][1];var leftEdge=x-DM.Menu.offsetWidth+DM.Links[arrName][nLinks][5][0];break;default:alert("SWITCH/CASE ERROR: menuPosition \""+menuPosition+"\" is invalid.");}
var MenuPos=DM.keepInWin(topEdge,leftEdge,IeBody);DM.Menu.style.top=MenuPos[0]+"px";DM.Menu.style.left=MenuPos[1]+"px";DM.Menu.style.visibility="visible";}}
function setElemVis(arrName,vis){if(winIE&&DM.formElements){for(member in DM.formElements){if(vis=="visible"||arrName==DM.formElements[member][0]){if(document.getElementById(DM.formElements[member][1]))document.getElementById(DM.formElements[member][1]).style.visibility=vis;}}}}
function resetTimer(){clearTimeout(DM.timer);DM.timer=0;}}
function blinkSpecial(){var calPage=(document.location.pathname.indexOf("calendar")>=0);if(MakeSpecialsBlink&&!calPage){if(qStr&&qStr.indexOf("CONTEXT=popup")==-1||!qStr){var Label=document.getElementById("specials");if(winIE){if(Label.style.visibility=="visible"){eval("try{ Label.filters(0).Stop(); } catch( e ){}");Label.style.filter="blendTrans( duration='0.3' )";eval("try{ Label.filters(0).Apply(); } catch( e ){}");Label.style.visibility="hidden";eval("try{ Label.filters(0).Play(); } catch( e ){}");}
else{eval("try{ Label.filters(0).Stop(); } catch( e ){}");Label.style.filter="blendTrans( duration='0.3' )";eval("try{ Label.filters(0).Apply(); } catch( e ){}");Label.style.visibility="visible";eval("try{ Label.filters(0).Play(); } catch( e ){}");}}
else{if(Label.style.visibility=="visible")Label.style.visibility="hidden";else Label.style.visibility="visible";}
setTimeout("blinkSpecial()",((winIE)?1000:800));}}}
function reportError(sub,msg){var Now=new Date();var diagnostics=" \nURL: "+document.location.href;try{var topURL=top.document.location.href;}
catch(e){var topURL="Exception thrown while reading top URL";}
try{var ref=document.referrer;}
catch(e){var ref="Exception thrown while reading Referrer";}
diagnostics+=" \nTop URL: "+topURL;diagnostics+=" \nTime: "+Now.toLocaleString()+" (client's time)";diagnostics+=" \nPrior Page: "+ref;diagnostics+=" \nGMT Offset: "+Now.getTimezoneOffset()/60+" hours";diagnostics+=" \nMonitor: "+screen.width+"x"+screen.height+"x"+screen.colorDepth;diagnostics+=" \nJava Enabled: "+navigator.javaEnabled();for(i in navigator){if(typeof navigator[i]!="object")diagnostics+=" \n"+i+": "+navigator[i];}
if(confirm(sub+"\n\n"+msg+"\n\n==> Help us improve our site, click OK to report this problem to our Web Site Administrator..."))document.location.href="mailto:"+TVV.WebErrorEmail.unscramble()+"?subject="+escape("Tropical Villa Vacations"+"; "+sub)+"&body="+escape(msg+" \n\nDIAGNOSTICS: This info may be used to help us troubleshoot technical problems"+diagnostics);}
function DynamicIndex(){this.msg=new Array();this.msg.show="Click to open...";this.msg.hide="Click to close...";this.getPlusMinus=getPlusMinus;this.reset=reset;this.switchDisplay=switchDisplay;this.showTip=showTip;this.init=init;function init(){if( staffUser && /index\.html/i.test(homePage)){var TextMission=gId("TextMission");if(TextMission)TextMission.style.top="110px";}
var path=document.location.pathname;var delimeter=(path.indexOf("\\")>=0)?"\\":"/";var Path=path.split(delimeter);var fileName=Path[Path.length-1];this.cookieName=fileName.split(".")[0];var diState=GetCookie(this.cookieName);if(diState){var AllLinks=document.getElementsByTagName("a");var DiState=diState.split("_");for(var i=0;i<AllLinks.length;i++){for(var k in DiState){if(DiState[k]&&parseInt(DiState[k])==i){try{DI.switchDisplay(AllLinks[i],AllLinks[i].id)} catch(e){};}}}}}
function getPlusMinus(Link){return Link.previousSibling;}
function reset(OtherID){for(var i=0;i<OtherID.length;i++){var PlusMinus=document.getElementById("plusMinus_"+OtherID[i]);if(PlusMinus){PlusMinus.innerHTML="-";this.switchDisplay(null,OtherID[i]);}
else{alert("ERROR: DI.reset unable to initialize PlusMinus as an Object.\nPROBLEM: \"plusMinus_"+OtherID[i]+"\" cannot be found.");return;}}}
function switchDisplay(Link,contentID,focuserID){if(!Link)Link=document.getElementById(contentID);var PlusMinus=getPlusMinus(Link);var expanding=(PlusMinus.innerHTML=="+"),contracting=!expanding;var Caption=document.getElementById("caption_"+Link.id);if(Caption)Caption.className=(expanding)?"diCaptionOn":"diCaptionOff";var Img=document.getElementById("img_"+Link.id);if(Img)Img.className=(expanding)?"borderOn":"borderOff";PlusMinus.innerHTML=(expanding)?"-":"+";var AllLinks=document.getElementsByTagName("a");var valOld=GetCookie(this.cookieName),valNew="";for(var i=0;i<AllLinks.length;i++){if(AllLinks[i]==Link){if(valOld){var key="_"+i+"_";if(valOld.indexOf(key)>=0){if(contracting){var ValOld=valOld.split(key);valNew=((ValOld[0])?ValOld[0]:"")+"_"+((ValOld[1])?ValOld[1]:"");(valNew=="_")?DeleteCookie(this.cookieName):SetCookie(this.cookieName,valNew);}
break;}
if(expanding)valNew=valOld+i+"_";}
else if(expanding)valNew="_"+i+"_";if(valNew)SetCookie(this.cookieName,valNew);break;}}
if(contentID)var Content=document.getElementById("content_"+contentID);else
var Content=(Link.parentNode.nextSibling.style)?Link.parentNode.nextSibling:Link.parentNode.nextSibling.nextSibling;try{Content.style.display=(contracting)?"none":"block";}
catch(Err){var problem=(contentID)?"\nPROBLEM: \"content_"+contentID+"\" cannot be found.":"";alert("ERROR: DI.switchDisplay unable to initialize Content as an Object."+problem);}
if(focuserID&&expanding){var FocusCont=document.getElementById(focuserID);FocusCont.innerHTML="<a href='javascript:void(0);'>.</a>";var FocusLink=FocusCont.firstChild;FocusLink.focus();Link.focus();FocusCont.innerHTML="";}
showTip(Link);}
function showTip(Link,msgOn,msgOff){var PlusMinus=getPlusMinus(Link);if(PlusMinus.innerHTML=="+"){Link.title=(msgOn)?msgOn:DI.msg.show;self.status=(msgOn)?msgOn:DI.msg.show;}
else{Link.title=(msgOff)?msgOff:DI.msg.hide;self.status=(msgOff)?msgOff:DI.msg.hide;}}}
function largePic(cap,wid,hgt,Link,evt){return enlargement(cap,Link);}
function enlargement(photoCaption,Link){DW.photoCaption=photoCaption;DW.createEnlargement("PH",Link.href);return false;}
function getCloseLinkDW(divStyle){return "<div style='"+divStyle+"'><a href='javascript:DW.removeWin();' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title='Close this pop-up window' class='dwCloseLink'>Close</a></div>";}
function DynamicWindow(transDur){this.ssTnskewIeX=2;this.ssTnskewIeY=6;this.skewIeX=2;this.skewIeY=2;window.gClickPos=null;this.transDur=(transDur)?transDur:0.8;this.dWinOffsetX=0;this.dWinOffsetY=0;this.ImgOffscreen=null;this.overlayExists=false;this.overTitleBar=false;this.killDW=true;this.Photo=null;this.Window=null;this.winType="";this.addOverlay=addOverlay;this.cancelEvt=cancelEvt;this.cancelPreloader=cancelPreloader;this.createEnlargement=createEnlargement;this.getScaledSize=getScaledSize;this.reCenter=reCenter;this.createWindow=createWindow;this.showImg=showImg;this.keepInWin=keepInWin;this.getClickPosition=getClickPosition;this.getData=getData;this.mouseDown=mouseDown;this.mouseMove=mouseMove;this.moveTopImage=moveTopImage;this.otherFunctionalityOnRemoveWin=otherFunctionalityOnRemoveWin;this.removeWin=removeWin;this.mouseUp=mouseUp;document.onmousedown=this.mouseDown;document.onmousemove=this.mouseMove;document.onmouseup=this.mouseUp;var Preloader=new Image();Preloader.src="images/preloader.gif";window.onscroll=function(){var Overlay=gId("dwOverlay");if(Overlay){rCh(Overlay);DW.overlayExists=false;}
if(window.DW&&DW.winType=="SS"&&window.SS&&desktopComputer)SS.pause(1);}
function otherFunctionalityOnRemoveWin(){}
function cancelPreloader(){var Overlay=gId("dwOverlay");if(Overlay)rCh(Overlay);this.overlayExists=false;this.ImgOffscreen=gId("ImgOffscreen");if(this.ImgOffscreen){this.ImgOffscreen.onload=function(){};rCh(this.ImgOffscreen);}}
function createEnlargement(winType,imgSrc){if(winType=="TN"||winType=="SS"){var TopImage=gId("TopImage");if(TopImage){rCh(TopImage);(winType=="SS")?SS.TopImage=null:TN.TopImage=null;}}
DW.addOverlay(1,winType);this.ImgOffscreen=gId("ImgOffscreen");if(this.ImgOffscreen)rCh(this.ImgOffscreen);this.ImgOffscreen=gEl("IMG");this.ImgOffscreen.id="ImgOffscreen";this.ImgOffscreen.style.position="absolute";this.ImgOffscreen.style.top="-1000000px";this.ImgOffscreen.style.left="-1000000px";aCh(this.ImgOffscreen);this.ImgOffscreen.onload=function(){var CancelPreload=gId("CancelPreload");if(CancelPreload)CancelPreload.innerHTML="";DW.createWindow([DW.photoCaption,"imgSrc="+this.src],[0,this.width,this.height],null,null,0,[4,0,0],winType);if(winType=="SS"||winType=="TN"||winType=="Admin"){gId("SsTnCount").innerHTML=DW.photoCount;}}
this.ImgOffscreen.onerror=function(){var imgSrc=this.src;DW.cancelPreloader();alert("Image Not Found:\n"+imgSrc);}
this.ImgOffscreen.src=imgSrc;}
function createWindow(dataSrc,WinDim,TheLink,theEvent,bodyMargin,RequestedPos,winType,centerContent,addOverlay,noX){if(TheLink)TheLink.blur();if(window.SSE&&SSE.running)SSE.pauseSS(1);if(window.SS&&winType!="SS")SS.kill();if(window.TN&&winType!="TN")TN.kill();if(window.Tip)Tip.removeAll();if(!bodyMargin)bodyMargin=0;this.winType=(winType)?winType:"";var Data=this.getData(dataSrc,TheLink),theCaption,body;var theCaption=getPhotoCaption(Data[0]);body=Data[1].replace(/\^\^/g, "'" );
body=body.replace(/\^/g, "\"" );
var showImg=(body.indexOf("imgSrc=")==0);var scrollStyle=(WinDim[0])?" overflow:auto;":"";var winWid=WinDim[1];var winHgt=WinDim[2];var clickPos=(RequestedPos)?(RequestedPos[0]==1):true;var aboveClkPos=(RequestedPos)?(RequestedPos[0]==2):false;var topCent=(RequestedPos)?(RequestedPos[0]==3):false;var center=(RequestedPos)?(RequestedPos[0]==4):false;var botCent=(RequestedPos)?(RequestedPos[0]==5):false;var xOffset=(RequestedPos)?RequestedPos[1]:0;var yOffset=(RequestedPos)?RequestedPos[2]:15;if(showImg){var imgSrc=body.split("imgSrc=")[1];var WinDim=this.getScaledSize(winWid,winHgt,theCaption);var fullSize=(WinDim[0]==winWid&&WinDim[1]==winHgt);winWid=WinDim[0];winHgt=WinDim[1];var body="<img src='"+imgSrc+"' border='0' hspace='0' vspace='0' galleryimg='no' style='"+getOpacity()+" width:"+winWid+"px; height:"+winHgt+"px;' onload='DW.showImg( this, "+fullSize+" );' onAbort='this.src=this.src;' id='ImageDW' onmouseover='DW.overImg=true;' onmouseout='DW.overImg=false;'>";if(this.winType=="TN"){var titleBarGUI="<table align='center' id='tnTable'><tr align='center'><td class='dwBackEnlargementSsTn' id='SsTnBackTD' onmousedown='DW.cancelEvt( event );'><a href='javascript:void(0);' onClick='TN.nextImage( 0, event ); return false;' title='Last enlargement' onmousedown='DW.cancelEvt( event );' class='SsTnArrow'>"+Arrows[3]+"</a></td><td class='dwTitle dwImgTitleSS' id='SsTnTitle'>"+theCaption+"</td><td class='dwNextEnlargementSsTn'><a href='javascript:void(0);' onClick='TN.nextImage( 1, event ); return false;' title='Next enlargement, or click photo...' onmousedown='DW.cancelEvt( event );' class='SsTnArrow' id='SsTnNextArrow'>"+Arrows[1]+"</a></td></tr></table>";theCaption=titleBarGUI;}
else if(this.winType=="SS"){var titleBarGUI="<table align='center' id='tnTable'><tr align='center'><td class='dwBackEnlargementSsTn' id='SsTnBackTD' onmousedown='DW.cancelEvt( event );'><a href='javascript:void(0);' onClick='SS.back(); return false;' title='Back' onmousedown='DW.cancelEvt( event );' class='SsTnArrow'>"+Arrows[3]+"</a></td><td class='dwTitle dwImgTitleSS' id='SsTnTitle'>"+theCaption+"</td><td class='dwNextEnlargementSsTn'><a href='javascript:void(0);' onClick='SS.next( event ); return false;' title='Next' onmousedown='DW.cancelEvt( event );' class='SsTnArrow' id='SsTnNextArrow'>"+Arrows[1]+"</a></td></tr></table>";theCaption=titleBarGUI;}}
var Window=gId("dWinID");if(Window)rCh(Window);var NewWindow=gEl("DIV");var scrollSt,bodyHgtSt;bodyHgtStyle=(winHgt)?" height:"+winHgt+"px;":"";NewWindow.id="dWinID";NewWindow.className="dwWin";aCh(NewWindow);NewWindow.style.visibility="hidden"
NewWindow.style.position="absolute";var borderWid=(DW.overlayExists)?0:Settings.borderWidDW;NewWindow.style.borderWidth=borderWid+"px";NewWindow.style.width=(IE&&document.compatMode!="CSS1Compat")?(winWid+(2*borderWid))+"px":winWid+"px";NewWindow.style.top=(screen.height*-1)+"px";NewWindow.style.left=(screen.width*-1)+"px";NewWindow.style.zIndex=10000;var music=(this.winType=="SS"&&Settings.SS.audio&&desktopComputer)?"&nbsp; &nbsp;<a href='javascript:void(0);' onClick='SS.pause( 1 ); Menu.show( this, \"Menu_Music\", 34, event, 0, 6 );' Menu.keepAlive([\"Menu_Music\"]);' onMouseout='Menu.hide([\"Menu_Music\"]);' class='SsMusic' title='"+Msg.SsAudio+"'>&#9835;</a>&nbsp;":"";var counterCell=(this.winType=="TN"||this.winType=="SS"||this.winType=="Admin")?"<td id='dwTitleLeft' class='dwCounterSsTn' onmousedown='DW.cancelEvt( event );'><span id='SsTnCount' onmousedown='DW.cancelEvt( event );'></span><span onmousedown='DW.cancelEvt( event );'>"+music+"</td>":"";var pauseBut="";var dwX="<a href='javascript:DW.removeWin();' title='Close' id='dwX' class='dwX'>&nbsp;&times;&nbsp;</a>";if(this.winType=="SS"){var padTop=(winOS)?3:5;pauseBut="<table><tr style='vertical-align:top;'><td style='padding-top:"+padTop+"px;'>&nbsp;<a href='javascript:void(0);' onClick='SS.pause( ( SS.running ) ? 1 : 0 );' title='Pause' class='PauseSS' id='PauseSS'>&#8214;</a>&nbsp;</td>";dwX="<td>"+dwX+"</td></tr></table>";}
if(noX)dwX="";var winClass=(DW.overlayExists||addOverlay)?"dwTitleRowOverlay":"dwTitleRow";var myWindow="<div class='"+winClass+"' id='dwTitleRowID' onmouseover='DW.overTitleBar=true;' onmouseout='DW.overTitleBar=false;'><table align='center'><tr>"+counterCell+"<td class='dwTitle' style='width:100%; text-align:center;' id='dwTitleCenter'>"+theCaption+"</td><td valign='top' id='dwTitleRight' onmousedown='DW.cancelEvt( event );' style='white-space:nowrap;'>"+pauseBut+dwX+"</td></tr></table></div><div class='"+((showImg)?"dwBodyParentImg":"dwBodyParent")+"' style='width:100%;"+bodyHgtStyle+scrollStyle+"'><div class='dwBody' id='dwBodyID' style='margin:"+bodyMargin+"px;'>";if(centerContent)myWindow+="<table align='center'><tr><td>";myWindow+=body;if(centerContent)myWindow+="</td></tr></table>";myWindow+="</div></div>";NewWindow.innerHTML=myWindow;var xPos=0,yPos=0;var BodyMetrics=gBM();var bodyWid=BodyMetrics[0];var bodyHgt=BodyMetrics[1];var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];if(clickPos||aboveClkPos){if(theEvent)var ClickPos=this.getClickPosition(theEvent);else if(window.gClickPos)var ClickPos=gClickPos;window.gClickPos=ClickPos;xPos=ClickPos[0];var skew=Math.round(100*xPos/bodyWid)/100;xPos=xPos+xOffset-(skew*NewWindow.offsetWidth);if(clickPos)yPos=ClickPos[1]+yOffset;else
yPos=ClickPos[1]-NewWindow.offsetHeight+yOffset;}
else if(topCent||center||botCent){winHgt=NewWindow.offsetHeight;winWid=NewWindow.offsetWidth;xPos=parseInt((bodyWid-winWid)/2+scrollX+xOffset);if(topCent)yPos=parseInt(scrollY+yOffset);else if(center)yPos=parseInt((bodyHgt-winHgt)/2+scrollY+yOffset);else yPos=parseInt(bodyHgt-winHgt+scrollY+yOffset);}
else{var Component=(window.ComponentDW)?window.ComponentDW:RequestedPos[3];if(SF&&theEvent){var Target=(theEvent.target)?theEvent.target:theEvent.srcElement;if(Target.nodeType==3)Component=Component.parentNode;}
var CurComponent=Component;var parPosAbs=false;while(CurComponent){yPos+=CurComponent.offsetTop;xPos+=CurComponent.offsetLeft;CurComponent=CurComponent.offsetParent;}
switch(RequestedPos[0]){case 10:xPos+=xOffset;yPos-=NewWindow.offsetHeight-yOffset;break;case 11:xPos+=Component.offsetWidth+xOffset;yPos-=NewWindow.offsetHeight-yOffset;break;case 12:xPos+=Component.offsetWidth+xOffset;yPos+=yOffset;break;case 13:xPos+=Component.offsetWidth+xOffset;yPos+=Component.offsetHeight+yOffset;break;case 14:xPos+=xOffset;yPos+=Component.offsetHeight+yOffset;break;case 15:xPos+=Component.offsetWidth+xOffset-NewWindow.offsetWidth;yPos+=Component.offsetHeight+yOffset;break;case 16:xPos+=xOffset-NewWindow.offsetWidth;yPos+=Component.offsetHeight+yOffset;break;case 17:xPos+=xOffset-NewWindow.offsetWidth;yPos+=yOffset;break;default:alert("Switch/Case Error at DW.createWindow: RequestedPos[ 0 ] has a value of "+RequestedPos[0]+" which is invalid.");}}
var NewWindowPos=this.keepInWin(NewWindow,xPos,yPos);xPos=Math.round(NewWindowPos[0]);yPos=Math.round(NewWindowPos[1]);NewWindow.style.left=xPos+"px";NewWindow.style.top=yPos+"px";if(addOverlay)this.addOverlay(0,winType);NewWindow.style.visibility="visible";}
function getScaledSize(imgWid,imgHgt,photoCaption){var photoCaptionLC=photoCaption.toLowerCase();var nLines=1;nLines+=photoCaptionLC.split("<div").length-1;nLines+=photoCaptionLC.split("<br").length-1;var marginX=45;var marginY=50+(10*nLines);var dwWid=imgWid+marginX;var dwHgt=imgHgt+marginY;var BodyMetrics=gBM();var bodyWid=BodyMetrics[0];var bodyHgt=BodyMetrics[1];var winWidNew,winHgtNew;if(dwWid>=bodyWid||dwHgt>=bodyHgt){var widOver=dwWid-bodyWid;var hgtOver=dwHgt-bodyHgt;if(hgtOver/bodyHgt>widOver/bodyWid){winHgtNew=bodyHgt-marginY;winWidNew=Math.round((winHgtNew/imgHgt)*imgWid);}
else{winWidNew=bodyWid-marginX;winHgtNew=Math.round((winWidNew/imgWid)*imgHgt);}}
else{winWidNew=imgWid;winHgtNew=imgHgt;}
return[winWidNew,winHgtNew];}
function addOverlay(showPreloader,winType){this.winType=winType;var Overlay=gId("dwOverlay");if(!Overlay){if(window.SSE&&SSE.running)SSE.pauseSS(1);var Overlay=gEl("DIV");Overlay.id="dwOverlay";Overlay.className="dwOverlay";aCh(Overlay);var BodyMetrics=gBM();var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];Overlay.style.left=scrollX+"px";Overlay.style.top=scrollY+"px";if(iPhPod){Overlay.style.width=BodyMetrics[0]+"px";Overlay.style.height=BodyMetrics[1]+"px";}
if(showPreloader)Overlay.innerHTML="<div id='CancelPreload'><img src='images/preloader.gif' /><a href='javascript:DW.cancelPreloader();' title='Stop image loading'>Cancel</a></div>";}
this.overlayExists=true;}
function reCenter(DW){var scrollX,scrollY,bodyWid,bodyHgt,xPos,yPos;var BodyMetrics=gBM();var bodyWid=BodyMetrics[0];var bodyHgt=BodyMetrics[1];var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];winHgt=DW.offsetHeight;winWid=DW.offsetWidth;xPos=parseInt((bodyWid-winWid)/2+scrollX);yPos=parseInt((bodyHgt-winHgt)/2+scrollY);DW.style.left=xPos+"px";DW.style.top=yPos+"px";}
function showImg(Photo,fullSize){Photo.oncontextmenu=function(){return(Settings.preventImageTheft)?false:true;};if(this.winType=="TN"||this.winType=="SS"||this.winType=="Admin"){gId("SsTnCount").onmouseover=function(){var Numbers=this.innerHTML.split("/");this.title="Photo #"+Numbers[0]+" of "+Numbers[1];}}
if(this.winType=="TN"){Photo.title="Next enlargement";Photo.onclick=function(event){TN.nextImage(1,event);this.title="";}
gId("SsTnCount").onmouseover=function(){var Numbers=this.innerHTML.split("/");this.title="Photo #"+Numbers[0]+" of "+Numbers[1];}
TN.imgWidOld=Photo.width;TN.imgHgtOld=Photo.height;TN.preloadNext();}
else if(this.winType=="SS"){Photo.title="Next";Photo.onclick=function(event){SS.next(event);this.title="";}
gId("SsTnCount").onmouseover=function(){var Numbers=this.innerHTML.split("/");this.title="Photo #"+Numbers[0]+" of "+Numbers[1];}
SS.imgWidOld=Photo.width;SS.imgHgtOld=Photo.height;SS.preLoadNext();if(Settings.SS.audio){if(window.audioFile){SS.audioFile=window.audioFile;SS.MusicMenuLink=(gId(window.audioFile))?gId(window.audioFile):null;setTimeout("if( window.SS ) SS.playAudio();",1000);}}}
else{Photo.onclick=DW.removeWin;Photo.title="Click to close";}
Photo.style.cursor="pointer";if(fullSize)startFade(Photo,this.transDur,0);else(IE)?Photo.style.visibility="visible":Photo.style.opacity=1;}
function keepInWin(NewWindow,leftEdge,topEdge){var BodyMetrics=gBM();var bodyWid=BodyMetrics[0];var bodyHgt=BodyMetrics[1];var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];var winHgt=NewWindow.offsetHeight;var vScreenPos=topEdge-scrollY;var vSkew=bodyHgt-vScreenPos;if(vScreenPos<10)topEdge=10+scrollY;else if(vSkew<winHgt+10)topEdge-=winHgt-vSkew+10;var winWid=NewWindow.offsetWidth;var hScreenPos=leftEdge-scrollX;var hSkew=bodyWid-hScreenPos;if(hScreenPos<10)leftEdge=10+scrollX;else if(hSkew<winWid+10)leftEdge-=winWid-hSkew+10;if(leftEdge<11)leftEdge=10;if(topEdge<11)topEdge=10;if(winHgt>=bodyHgt)topEdge=scrollY+10;return[leftEdge,topEdge];}
function getClickPosition(evt){var x=0,y=0;if(!evt)evt=window.event;try{var BodyMetrics=gBM();var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];x=evt.clientX+((iOS)?0:scrollX);y=evt.clientY+((iOS)?0:scrollY);}
catch(err){x=0;y=0;alert(err)}
return[x,y];}
function getData(dataSrc,TheLink){if(dataSrc=="nextSibling"){if(eval("typeof this.LastSrc")=="object")eval("this.LastSrc.innerHTML = this.lastData");try{var DataSource=(TheLink.nextSibling.innerHTML)?TheLink.nextSibling:TheLink.nextSibling.nextSibling;}
catch(err){alert("EXCEPTION: Data source not found");return false;}
try{var Title=(DataSource.firstChild.innerHTML)?DataSource.firstChild:DataSource.firstChild.nextSibling;var title=Title.innerHTML;}
catch(err){alert("EXCEPTION: Title source not found");return false;}
try{var Body=(Title.nextSibling.innerHTML)?Title.nextSibling:Title.nextSibling.nextSibling;var body=Body.innerHTML;}
catch(err){alert("EXCEPTION: Body source not found");return false;}
eval("this.LastSrc = DataSource");eval("this.lastData = DataSource.innerHTML");DataSource.innerHTML="";}
else{var title=dataSrc[0];var body=dataSrc[1];}
return[title,body];}
function mouseDown(e){if(DW.overTitleBar){document.onmousedown=DW.mouseDown;document.onmousemove=DW.mouseMove;document.onmouseup=DW.mouseUp;this.Window=gId("dWinID");if(IE){var borderWid=(DW.overlayExists)?0:Settings.borderWidDW;if(DW.winType=="TN"||DW.winType=="SS"){this.dWinOffsetX=event.offsetX+borderWid+DW.ssTnskewIeX;this.dWinOffsetY=event.offsetY+borderWid+DW.ssTnskewIeY;var Elem=event.srcElement,ParentElem=Elem.offsetParent;if(Elem.id=="dwTitleCenter")this.dWinOffsetX+=gId("dwTitleLeft").scrollWidth;else if(Elem.id=="SsTnTitle"||ParentElem.id=="SsTnTitle"){var CurComponent=Elem;var xPos=0,yPos=0;while(CurComponent){if(CurComponent.id=="tnTable"){yPos=CurComponent.offsetTop;xPos=CurComponent.offsetLeft;break;}
CurComponent=CurComponent.offsetParent;}
this.dWinOffsetX+=gId("dwTitleLeft").scrollWidth+gId("SsTnBackTD").scrollWidth+xPos;}
else if(Elem.id=="dwTitleRight"){var CurComponent=Elem;var xPos=0,yPos=0;while(CurComponent){if(CurComponent.id=="dwTitleRight"){yPos=CurComponent.offsetTop;xPos=CurComponent.offsetLeft;break;}
CurComponent=CurComponent.offsetParent;}
this.dWinOffsetX+=xPos;}}
else{this.dWinOffsetX=event.offsetX+borderWid+DW.skewIeX;this.dWinOffsetY=event.offsetY+borderWid+DW.skewIeY;}}
else{this.dWinOffsetX=e.layerX;this.dWinOffsetY=e.layerY;return false;}}
else if(DW.overImg&&Settings.preventImageTheft){document.onmousemove=function(){return false;}
document.onmouseup=function(){return false;}
return false;}}
function mouseMove(evt){if(!evt)evt=window.event;if(this.Window&&!OP){var ClickPos=DW.getClickPosition(evt);var BodyMetrics=gBM();var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];if(ClickPos[0]<=0||ClickPos[1]<=0){this.Window=null;return false;}
if(IE&&evt.button!=1)return false;this.Window.style.left=(evt.clientX-this.dWinOffsetX+scrollX)+"px";this.Window.style.top=(evt.clientY-this.dWinOffsetY+scrollY)+"px";DW.moveTopImage();return false;}}
function removeWin(){DW.killDW=true;var EvalOnClose=gId("EvalOnClose");if(EvalOnClose)eval(EvalOnClose.value);if(DW.killDW){var Window=gId("dWinID");if(Window)rCh(Window);DW.cancelPreloader();if(window.SSE&&!SSE.running)SSE.pauseSS(0);DW.overTitleBar=false;switch(DW.winType){case "SS":if(window.SS)SS.kill();break;case "TN":if(window.TN)TN.kill();break;}
DW.otherFunctionalityOnRemoveWin();}}
function moveTopImage(){var TopImage=gId("TopImage");if(TopImage){var BotImage=gId("ImageDW");var x=0;var y=0;TheElement=BotImage;var parPosAbs=false;while(TheElement){if(SF){if(!parPosAbs)parPosAbs=(TheElement.style.position=="absolute");if(parPosAbs&&TheElement==document.body)break;}
y+=TheElement.offsetTop;x+=TheElement.offsetLeft;TheElement=TheElement.offsetParent;}
var borderWid=(DW.overlayExists||OP)?0:Settings.borderWidDW;TopImage.style.left=(x+borderWid-parseInt(BotImage.parentNode.style.marginLeft))+"px";TopImage.style.top=(y+borderWid-parseInt(BotImage.parentNode.style.marginTop))+"px";}}
function mouseUp(){this.Window=null;}
function cancelEvt(evt){(evt&&evt.stopPropagation)?evt.stopPropagation():event.cancelBubble=true;}}
DW=new DynamicWindow();function ProgressBar(){this.nBarsDefault=10;this.barOffColorDefault="rgb( 204,204,204 )";this.barOnColorDefault="rgb( 204,0,0 )";this.barActiveWidDefault="6px";this.barInactiveWidDefault="4px";this.barFontSizeDefault="12pt";this.nBars;this.barOffColor;this.barOnColor;this.barActiveWid;this.barInactiveWid;this.barFontSize;this.speed=150;this.progressTimer=0;this.ActiveBars=null;this.cellIndexOn=0;this.getProgressBar=getProgressBar;this.initProgressBar=initProgressBar;this.showProgress=showProgress;this.stopProgress=stopProgress;function getProgressBar(nBars,barOffColor,barOnColor,barInactiveWid,barActiveWid,barFontSize){this.nBars=(nBars)?nBars:this.nBarsDefault;this.barOffColor=(barOffColor)?barOffColor:this.barOffColorDefault;this.barOnColor=(barOnColor)?barOnColor:this.barOnColorDefault;this.barInactiveWid=(barInactiveWid)?barInactiveWid:this.barInactiveWidDefault;this.barActiveWid=(barActiveWid)?barActiveWid:this.barActiveWidDefault;this.barFontSize=(barFontSize)?barFontSize:this.barFontSizeDefault;var Htm=new Array();Htm.push("<table align=\"center\" id=\"ProgressBar\" style=\"border-collapse:collapse;\">");Htm.push("<tbody>");Htm.push("<tr>");for(var i=0;i<this.nBars*2-1;i++){Htm.push("<td style=\"padding:0px; font-size:");Htm.push(this.barFontSize);Htm.push(";");if(i%2){Htm.push("width:");Htm.push(this.barInactiveWid);Htm.push(";");Htm.push("\"></td>");}
else{Htm.push("width:");Htm.push(this.barActiveWid);Htm.push(";");Htm.push("background-color:");Htm.push(this.barOffColor);Htm.push(";");Htm.push("\">&nbsp;</td>");}}
Htm.push("</tr>");Htm.push("</tbody>");Htm.push("</table>");var htm=Htm.join("");return htm;}
function initProgressBar(){this.ActiveBars=new Array();var ProgressBar=gId("ProgressBar");var Td=ProgressBar.firstChild.firstChild.firstChild;while(Td){this.ActiveBars.push(Td);Td=(Td.nextSibling&&Td.nextSibling.nextSibling)?Td.nextSibling.nextSibling:null;}
this.stopProgress();this.showProgress();}
function showProgress(){if(gId("ProgressBar")){if(this.cellIndexOn==this.ActiveBars.length){for(var i=0;i<this.ActiveBars.length;i++)this.ActiveBars[i].style.backgroundColor=this.barOffColor;this.cellIndexOn=0;}
else{this.ActiveBars[this.cellIndexOn].style.backgroundColor=this.barOnColor;this.cellIndexOn++;}
this.progressTimer=setTimeout("try{ PB.showProgress(); } catch( Err ) {}",this.speed);}}
function stopProgress(){clearTimeout(this.progressTimer);this.cellIndexOn=0;for(var i=0;i<this.ActiveBars.length;i++)this.ActiveBars[i].style.backgroundColor=this.barOffColor;}}
PB=new ProgressBar();function ToolTip(){this.delay=500;this.ActiveTip=null;this.delayTimer=0;this.x=0;this.y=0;this.displayIt=displayIt;this.showIt=showIt;this.removeAll=removeAll;this.setPosition=setPosition;function showIt(tip,evt,delay){this.setPosition(evt);this.tip=tip.replace(/ +<> +/g, "<span class='TooltipBullet'>&#149;</span>" );
delay=(typeof delay=="number")?delay:this.delay;this.delayTimer=setTimeout("if( window.Tip ) Tip.displayIt();",delay);}
function setPosition(evt){if(!evt)evt=window.event;var BodyMetrics=gBM();var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];this.x=evt.clientX+((iOS)?0:scrollX);this.y=evt.clientY+((iOS)?0:scrollY);}
function displayIt(){this.removeAll();this.ActiveTip=gEl("span");this.ActiveTip.id="ToolTip";this.ActiveTip.className="ToolTip";this.ActiveTip.innerHTML=this.tip;aCh(this.ActiveTip);var BodyMetrics=gBM();var bodyWid=BodyMetrics[0];var bodyHgt=BodyMetrics[1];var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];this.ActiveTip.style.left=(screen.width*-1)+"px";this.ActiveTip.style.top=(screen.height*-1)+"px";var tipWid=this.ActiveTip.offsetWidth;var hScreenPos=this.x-scrollX;var hSkew=bodyWid-hScreenPos;if(hSkew<tipWid+10)this.x=this.x-tipWid+hSkew-5;var marTop=22;var tipHgt=this.ActiveTip.offsetHeight;var vScreenPos=this.y-scrollY;var vSkew=bodyHgt-vScreenPos;if(vSkew<tipHgt+marTop+5)this.y=this.y-tipHgt-marTop-10;this.ActiveTip.style.left=(this.x)+"px";this.ActiveTip.style.top=(this.y+marTop)+"px";this.ActiveTip.style.visibility="visible";}
function removeAll(){clearTimeout(this.delayTimer);var ToolTipsOld=gId("ToolTip");while(ToolTipsOld){rCh(ToolTipsOld);ToolTipsOld=gId("ToolTip");}}}
var Tip=new ToolTip();
