// Web software by DavidRegier.com
IE=false,AOL=false,SF=false,MZ=false;if(navigator.appName=="Microsoft Internet Explorer"){IE=true;if(navigator.userAgent.indexOf("AOL")>=0)AOL=true;}
else if(navigator.userAgent.indexOf("Safari")>=0)SF=true;else if(navigator.appName=="Netscape")MZ=true;winOS=(navigator.platform.substring(0,3)=="Win");winIE=(winOS&&IE);macOS=(navigator.platform.substring(0,3)=="Mac");macIE=(macOS&&IE);theHost=document.location.hostname;theHostLC=theHost.toLowerCase();local=(theHostLC.length==0||theHostLC=="127.0.0.1"||theHostLC=="localhost"),live=!local;qStr=unescape(document.location.search).substring(1);homePage="index.aspx"
path=document.location.pathname;if(path.charAt(path.length-1)=="/")path+=homePage;Path=path.split("/");fileName=Path[Path.length-1];cookieDomain=null;if(live&&theHost){var Host=theHost.split("."),hLen=Host.length;if(hLen>=2)cookieDomain="."+Host[hLen-2]+"."+Host[hLen-1];}
if(typeof window.DB=="object"){if(typeof window.DB.Administrators=="object"){for(var key in DB.Administrators){eMailOut="";eMailIn=DB.Administrators[key].replace(/\s{2}/g, "." );
eMailIn=eMailIn.replace(/\s{1}/g, "@" );
for(i=0;i<=eMailIn.length;i++)eMailOut=eMailIn.charAt(i)+eMailOut;DB.Administrators[key]=eMailOut;}}
if(typeof window.DB.Contact=="object"&&typeof window.DB.Contact.RentalAgent=="object"){eMailOut="";eMailIn=DB.Contact.RentalAgent.Email.replace(/\s{2}/g, "." );
eMailIn=eMailIn.replace(/\s{1}/g, "@" );
for(i=0;i<=eMailIn.length;i++)eMailOut=eMailIn.charAt(i)+eMailOut;DB.Contact.RentalAgent.Email=eMailOut;}
eMailOut="";eMailIn=DB.ReportErrorsTo.replace(/\s{2}/g, "." );
eMailIn=eMailIn.replace(/\s{1}/g, "@" );
for(i=0;i<=eMailIn.length;i++)eMailOut=eMailIn.charAt(i)+eMailOut;DB.ReportErrorsTo=eMailOut;}
var Msg=new Array();Msg.home="To our Home Page";Msg.enlarge="Click to enlarge";Msg.about="Learn all about our luxurious condo: Photo narrative";Msg.ratesAvail="Get Rates & View Booking Calendar: Loads our Rental Agent's Site in a pop-up window...";Msg.ss="View photos via our automated pop-up slide-show";Msg.tn="View photos on a traditional click-to-enlarge page";Msg.fav="Adds our site to your web browser favorites (bookmark it)";Msg.eMailToFriend="Notify family & friends about our luxury condo";Msg.photos="Choose to view our photos via our Slide-Show OR as Thumbnails";Msg.contact="Get contact info (phone, address, etc.) for our Rental Management Company";Msg.map="View street map of Kamaole Sands & get driving instructions: Loads Yahoo! Maps in a pop-up window...";Msg.enter="Hover your mouse over \"Aloha & Welcome\" to enter...";Msg.subMenu="Please click a sub-menu item...";Msg.testimonials="Read testimonials from our satisfied guests...";function PreLoader(){this.Files=["images/headerHiRes.jpg","about.aspx","images/headerHiRes.jpg","images/fountains1TNB.jpg","images/PoolView2TNB.jpg","images/Beach1TNB.jpg","images/_067-OceMauiTNB.jpg","images/LivingRm1TNB.jpg","images/MastBdrm2TNB.jpg","images/Kitchen3TNB.jpg","images/LivingRm2TNB.jpg","testimonials.aspx","images/couple_hammockTNB.jpg","images/snorklersFromBelowTNB.jpg","images/coupleUnderPalmsSunsetTNB.jpg","images/yellow_hibiscusTNB.jpg","images/paragon_diveboatTNB.jpg","images/seaTurtleTNB.jpg","images/hula_dancers_luauTNB.jpg","images/PoolView2TNB.jpg","images/mahiMahiMaalaeaTNB.jpg","images/LivingRm2TNB.jpg","images/Beach1TNB.jpg","images/singleTropicalFishCUTNB.jpg","calendar.aspx","calendar.js","cal-data.js","ss.aspx?db=image-data.js","image-data.js","images/Beach1.jpg","thumbnails.aspx?db=image-data.js","index.aspx","images/homepageHiRes.jpg","images/homepageLoRes.jpg","images/ssKitchenHiRes.jpg","images/ssKitchenLoRes.jpg",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;this.getImages=getImages;this.nextImg=nextImg;this.getFileName=getFileName;if(this.debug)self.status="File preloader started...";function run(){if(!AOL&&!SF){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(){if(window.PL&&PL.Request.readyState==4){if(PL.Request.status==200){if(PL.debug)self.status=PL.getFileName()+" preloaded; #"+((PL.nFilesCached+1)+" of "+(PL.Files.length-1));}
else{if(PL.debug)alert("File preloader encountered an error retrieving: \n "+PL.getFileName()+"\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("PL.run();",100);}}
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";this.timer=setTimeout("PL.getImages();",100);}}
function getImages(){clearTimeout(PL.timer);if(this.nFilesCached<this.Files.length-1){var FileComponents=this.Files[this.nFilesCached].split(".");var fileExt=FileComponents[FileComponents.length-1].toLowerCase();if(fileExt=="jpg"||fileExt=="gif"){this.Img=document.createElement("div");document.body.appendChild(this.Img);this.Img.style.display="none";this.Img.innerHTML="<img src='"+this.Files[this.nFilesCached]+"' onload='PL.nextImg(1);' onerror='PL.nextImg(0);' onabort='PL.nextImg(0);'>";}
else{if(PL.debug)self.status=PL.getFileName()+" skipped, preloading images only; #"+((PL.nFilesCached+1)+" of "+(PL.Files.length-1));this.nFilesCached++;SetCookie("nFilesCached",this.nFilesCached);this.timer=setTimeout("PL.getImages();",100);}}}
function nextImg(success){if(PL.debug){if(success)self.status=PL.getFileName()+" image preloaded; #"+((PL.nFilesCached+1)+" of "+(PL.Files.length-1));else
alert("Image preloader encountered an error retrieving: \n1) "+PL.getFileName()+"\n 2) "+((PL.nFilesCached+1)+" of "+(PL.Files.length-1)));}
PL.nFilesCached++;SetCookie("nFilesCached",PL.nFilesCached);PL.timer=setTimeout("PL.getImages();",100);}
function getFileName(){var FileComponents=PL.Files[PL.nFilesCached].split("/");return FileComponents[FileComponents.length-1];}}
PL=new PreLoader();function randompick(){return randompick.arguments[Math.floor(Math.random()*randompick.arguments.length)];}
function getTransition(transNum,duration){var trans="";if(winIE){var d=duration;if(parseFloat(navigator.userAgent.split("MSIE")[1])>=5.5){var thisTrans=(transNum==1)?Math.floor(Math.random()*17)+2:transNum;switch(thisTrans){case 2:trans="Fade(duration="+d+",overlap=1)";break;case 3:trans="Blinds(duration="+d+",bands="+randompick(2,4,6,8)+",direction="+randompick('up','down','right','left')+")";break;case 4:trans="CheckerBoard(duration="+d+",squaresX="+randompick(2,4,8,12)+",squaresY="+randompick(2,4,8,12)+",direction="+randompick('up','down','right','left')+")";break;case 5:trans="Barn(duration="+d+",motion="+randompick('in','out')+",orientation=",randompick('horizontal','vertical')+")";break;case 6:trans="GradientWipe(duration="+d+",gradientSize="+randompick(0,0.1,0.3,0.5,0.7,0.9,1)+",wipeStyle="+randompick(0,1)+",motion="+randompick('forward','reverse')+")";break;case 7:trans="Inset(duration="+d+")";break;case 8:trans="Iris(duration="+d+",irisStyle="+randompick('DIAMOND','CIRCLE','CROSS','PLUS','SQUARE','STAR')+",motion="+randompick('in','out')+")";break;case 9:trans="RadialWipe(duration="+d+",wipeStyle="+randompick('CLOCK','WEDGE','RADIAL')+")";break;case 10:trans="RandomBars(duration="+d+",orientation="+randompick('horizontal','vertical')+")";break;case 11:trans="RandomBars(duration="+d+")";break;case 12:trans="Slide(duration="+d+",pushStyle="+randompick('HIDE','PUSH','SWAP')+",bands="+randompick(1,2,3,4,5,6,7)+")";break;case 13:trans="Spiral(duration="+d+",gridSizeX="+randompick(8,16,32,64)+",gridSizeY="+randompick(8,16,32,64)+")";break;case 14:trans="Stretch(duration="+d+",stretchStyle="+randompick('HIDE','PUSH','SPIN')+")";break;case 15:trans="Strips(duration="+d+",motion="+randompick('leftdown','leftup','rightdown','rightup')+")";break;case 16:trans="Wheel(duration="+d+",spokes="+randompick(2,4,10,16,20)+")";break;case 17:trans="Zigzag(duration="+d+",gridSizeX="+randompick(8,16,32,64)+",gridSizeY="+randompick(8,16,32,64)+")";break;case 18:trans="RandomDissolve(duration="+d+")";break;default:alert("SWITCH/CASE ERROR: Case caught by default handler in \"getTransition\"");}
trans="progid:DXImageTransform.Microsoft."+trans;}
else{switch(transNum){case 2:trans="blendTrans(duration="+d+")";break;default:trans="revealTrans(duration="+d+",transition="+Math.floor(Math.random()*23)+")";}}}
return trans;}
function getRGB(abbrev){var rgb=abbrev;switch(abbrev){case "b":rgb="0,0,0";break;case "w":rgb="255,255,255";break;}
var reRGB=/^\d{1,3},\d{1,3},\d{1,3}$/,badRGB=false;if( !reRGB.test(rgb))badRGB=true;else{var Channels=rgb.split(",");for(var i=0;i<3;i++)if(parseInt(Channels[i])>255)badRGB=true;}
if(badRGB){reportError("Errant Data","Bad RGB value \""+rgb+"\"");rgb="255,255,255";}
return rgb;}
function getOpacity(dissolveSF,dissolveMZ){var opac="";if(winIE)opac="visibility:hidden;";else if(MZ&&dissolveMZ)opac="opacity:0;";else if(SF&&dissolveSF)opac="opacity:0;";return opac;}
function startFade(FadeInPhoto,transNum,transDur,transDelay,dissolveSF,dissolveMZ){window.FadeInPhoto=FadeInPhoto;window.transNum=transNum;window.transDur=transDur;window.transDelay=transDelay;if(winIE)setTimeout("fadeInDirectX()",transDelay);else if((MZ&&dissolveMZ)||(SF&&dissolveSF)){FadeInPhoto.onload=function(){};(transDelay)?setTimeout("fadeIn( FadeInPhoto )",transDelay):fadeIn(FadeInPhoto);}
else{if(SF)FadeInPhoto.style.opacity=1.0;else FadeInPhoto.style.visibility="visible";}}
function fadeInDirectX(){try{FadeInPhoto.style.filter=getTransition(transNum,transDur);FadeInPhoto.filters(0).apply();FadeInPhoto.style.visibility="visible";FadeInPhoto.filters(0).play();}
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);}
FadeInPhoto.style.visibility="visible";}}
GuiObj=null,fadeOpacity=0,fadeOpacityTimer=0;function fadeIn(GuiObj){if(MZ)GuiObj.style.opacity=fadeOpacity;else GuiObj.style.opacity=fadeOpacity;this.fadeOpacity+=.05;if(fadeOpacity<1){window.GuiObj=GuiObj;fadeOpacityTimer=setTimeout("fadeIn( GuiObj )",40);}
else{if(MZ)GuiObj.style.opacity=0.9999;else GuiObj.style.opacity=0.9999;clearTimeout(fadeOpacityTimer);GuiObj=null;fadeOpacity=0;fadeOpacityTimer=0;}}
function dissolveDirectX(OldPhoto,newPhotoSrc,borderWid,borderCol,transNum,transDur){try{OldPhoto.style.filter=getTransition(transNum,transDur);OldPhoto.filters(0).apply();OldPhoto.src=newPhotoSrc;if(borderWid)OldPhoto.style.borderColor="rgb( "+getRGB(borderCol)+" )";OldPhoto.filters(0).play();}
catch(Err){if(local){var eMsg="Exception Caught in dissolveDirectX function:\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";alert(eMsg);}
OldPhoto.src=newPhotoSrc;if(borderWid)OldPhoto.style.borderColor="rgb( "+getRGB(borderCol)+" )";}}
function directX(OldPhoto,newPhotoSrc,borderWid,borderCol,transNum,transDur){try{OldPhoto.parentNode.style.filter=getTransition(transNum,transDur);OldPhoto.parentNode.filters(0).apply();OldPhoto.src=newPhotoSrc;if(borderWid)OldPhoto.style.borderColor="rgb( "+getRGB(borderCol)+" )";OldPhoto.parentNode.filters(0).play();}
catch(Err){if(local){var eMsg="Exception Caught in directX function:\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";alert(eMsg);}
OldPhoto.src=newPhotoSrc;if(borderWid)OldPhoto.style.borderColor="rgb( "+getRGB(borderCol)+" )";}}
function initImagesArr(){try{Images.length=Images.length-1;}
catch(Err){reportError("Image Data Error","ERROR: Images array cannot be initialized because:\n 1) Data file \""+window.dataFile+"\" is non-existent; OR\n 2) The data it contains is malformed (bad syntax)");}}
fileNameErr=false;function checkImgName(fileName){var rePattern=/\s+/g;if( !fileNameErr && rePattern.test(fileName)){fileNameErr=true;reportError("Image File Name Error","ERROR: An image file name \""+fileName+"\" contains forbidden white-space characters.");}}
ImgReal=null;checkDimTimer=0;function checkDim(imgRealSrc,widDB,hgtDB){if(ImgReal==null){ImgReal=new Image();ImgReal.src=imgRealSrc;}
if(ImgReal.complete){clearTimeout(checkDimTimer);var realWid=ImgReal.width,realHgt=ImgReal.height;if(realWid>1&&realHgt>1&&(realWid!=widDB||realHgt!=hgtDB)){var FileComponents=ImgReal.src.split("/");var fileName=FileComponents[FileComponents.length-1];var eMsg="\""+fileName+"\" has incorrect dimensions: \n  1) "+widDB+" x "+hgtDB+" are the errant values \n  2) "+realWid+" x "+realHgt+" are the true values";reportError("Image Dimension Error",eMsg);}
ImgReal=null;}
else{clearTimeout(checkDimTimer);eval("checkDimTimer = setTimeout( 'checkDim( \""+imgRealSrc+"\", "+widDB+", "+hgtDB+" )', 250 );");}}
function getBodyWid(){return(document.body.clientWidth)?document.body.clientWidth:window.innerWidth;}
oldBodyWid=0;function showImage(){var HiRes=["images/homepageHiRes.jpg",896,487],LoRes=["images/homepageLoRes.jpg",698,377];var thePath=document.location.pathname;var homePage=(thePath.indexOf("index.aspx")>=0||thePath.indexOf(".htm")==-1);if(getBodyWid()>850){var img=HiRes[0];var wid=HiRes[1];var hgt=HiRes[2];var marTop=parseInt(hgt/2)*-1;var marLef=parseInt(wid/2)*-1;var imgMap="hiRes";Images=new Array(["ssKitchenHiRes.jpg",276,184,"Our beautifully remodeled kitchen; (c) Shane Tegarden Photography"],["ssPoolHiRes.jpg",276,184,"The large renovated swimming pool; (c) Shane Tegarden Photography"],["ssHibiscusHiRes.jpg",276,184,"Hibiscus is the Hawaii State Flower; (c) CreativeTouchPhoto.com"],["ssLivingRoomHiRes.jpg",276,184,"Our lovely condo was recently remodeled; (c) Shane Tegarden Photography"],["ssDiversHiRes.jpg",276,184,"Divers enjoy Maui's warm tropical waters; (c) nviProductions.com"],["ssCourtYardHiRes.jpg",276,184,"Kamaole Sands resort sits on 15 tropical acres; (c) Shane Tegarden Photography"],["ssTurtleHiRes.jpg",276,184,"Sea Turtles are a common site along Maui's Coast; (c) nviProductions.com"],["ssFlowerHiRes.jpg",276,184,"Lovely Tahitian Gingers bloom year-round; (c) CreativeTouchPhoto.com"],["ssWhaleHiRes.jpg",276,184,"Humpback whales are a common site during our winter months; (c) nviProductions.com"],["ssSunsetHiRes.jpg",276,184,"A couple enjoys a sunset in Kihei; (c) nviProductions.com"],null);var ssOverlay=(macIE)?"":"<DIV STYLE='position:absolute; top:50%; left:50%; margin-top:-202px; margin-left:98px;'><IMG name='slideShow' SRC='images/ssKitchenHiRes.jpg' BORDER='0' WIDTH='276' HEIGHT='184' HSPACE='0' VSPACE='0' border='0' GALLERYIMG='no' STYLE='float:left; margin:0px 0px 0px 0px;' onAbort='this.src=this.src;'></DIV>";}
else{var img=LoRes[0];var wid=LoRes[1];var hgt=LoRes[2];var marTop=parseInt(hgt/2)*-1;var marLef=parseInt(wid/2)*-1;var imgMap="loRes";Images=new Array(["ssKitchenLoRes.jpg",215,143,"Our beautifully remodeled kitchen; (c) Shane Tegarden Photography"],["ssPoolLoRes.jpg",215,143,"The large renovated swimming pool; (c) Shane Tegarden Photography"],["ssHibiscusLoRes.jpg",215,143,"Hibiscus is the Hawaii State Flower; (c) CreativeTouchPhoto.com"],["ssLivingRoomLoRes.jpg",215,143,"Our lovely condo was recently remodeled; (c) Shane Tegarden Photography"],["ssDiversLoRes.jpg",215,143,"Divers enjoy Maui's warm tropical waters; (c) nviProductions.com"],["ssCourtYardLoRes.jpg",215,143,"Kamaole Sands resort sits on 15 tropical acres; (c) Shane Tegarden Photography"],["ssTurtleLoRes.jpg",215,143,"Sea Turtles are a common site along Maui's Coast; (c) nviProductions.com"],["ssFlowerLoRes.jpg",215,143,"Lovely Tahitian Gingers bloom year-round; (c) CreativeTouchPhoto.com"],["ssWhaleLoRes.jpg",215,143,"Humpback whales are a common site during our winter months; (c) nviProductions.com"],["ssSunsetLoRes.jpg",215,143,"A couple enjoys a sunset in Kihei; (c) nviProductions.com"],null);var ssOverlay=(macIE)?"":"<DIV STYLE='position:absolute; top:50%; left:50%; margin-top:-159px; margin-left:77px;'><IMG name='slideShow' SRC='images/ssKitchenHiRes.jpg' BORDER='0' WIDTH='215' HEIGHT='143' HSPACE='0' VSPACE='0' border='0' GALLERYIMG='no' STYLE='float:left; margin:0px 0px 0px 0px;' onAbort='this.src=this.src;'></DIV>";}
var GraphicKS=document.getElementById("GraphicKS");GraphicKS.innerHTML="<DIV STYLE='position:absolute; top:50%; left:50%; margin-top:"+marTop+"px; margin-left:"+marLef+"px;'><img src='"+img+"' border='0' width='"+wid+"' height='"+hgt+"' hspace='0' vspace='0' style='"+getOpacity(false)+"' onLoad='startFade( this, 2, 1, 0, false );' onAbort='this.src=this.src;' usemap='#"+imgMap+"'><DIV STYLE='margin:20px 0px 10px 0px;'><DIV STYLE='margin-top:15px;' CLASS='fSize8 fColorGray76'>Design by <A HREF='javascript:PopUp.openWin( \"http://www.DavidRegier.com?ref=mauiparadisehale.com/\", 1 );' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' TITLE='Go to Web Designer&#39;s Site'><SPAN CLASS='fSize8 underline fColorGray76'>David Regier</A></SPAN></DIV></DIV></DIV>"+ssOverlay;}
function getVal(key){var value=null;var strToSearch=this.toString();var KeyVals=strToSearch.split("&");for(member in KeyVals){var ThisPair=KeyVals[member].split("=");if(key==ThisPair[0]){value=ThisPair[1];break;}}
if(typeof value=="undefined")value="";return value;}
String.prototype.getVal=getVal;function trim(){var str=this.toString();str=str.replace(/^\s*|\s*$/g, "" );
str=str.replace(/^\n*|\n*$/g, "" );
return str;}
String.prototype.trim=trim;function DynamicMenu(FormElements){this.homePage=homePage;this.clearAll=clearAll;this.write=write;this.show=show;this.hide=hide;this.keepAlive=keepAlive;this.kill=kill;this.on=on;this.off=off;this.refreshItems=refreshItems;this.resetItems=resetItems;this.setVis=setVis;this.getElement=getElement;this.showMsg=showMsg;this.init=init;this.write();this.resetItems();function init(){try{var Link=document.getElementsByTagName("a");for(var i=0;i<Link.length;i++){if(Link[i].id=="homeMenu"){Link[i].onmouseover=function(event){Menu.clearAll();Menu.subMenuPos=21;Menu.show(this,"Sub_SectHome",14,event,0,5);return true;}
Link[i].onmouseout=function(){Menu.hide([["Sub_SectHome"]]);return true;}}
if(Link[i].id=="cotMenu"){Link[i].onmouseover=function(event){Menu.clearAll();Menu.subMenuPos=21;Menu.show(this,"Sub_SectCottage",14,event,0,5);return true;}
Link[i].onmouseout=function(){Menu.hide([["Sub_SectCottage"]]);return true;}}}
self.status="";}
catch(Err){setTimeout("DM.init();",250);self.status="Initializing Menus: DM.init()...";}}
function clearAll(){kill(["Home"]);kill(["Sub_Photos"]);off("Photos");}
function write(){var menu="";menu+="<div id='Home' onMouseOver='Menu.keepAlive([\"Home\"]); return true;' onMouseOut='Menu.hide([[\"Home\"]]); return true;' class='menu'><table align='left' border='0' cellspacing='0' cellpadding='0' class='menuBorder'><tr><td><a href='about.aspx' class='menu'><div onMouseOver='Menu.on(this); Menu.off(\"Photos\"); Menu.kill([\"Sub_Photos\"]); Menu.showMsg(this,Msg.about); return true;' onMouseOut='Menu.off(this); Menu.showMsg(); return true;' class='menuItemOff'><div class='menuItem'>About our Condo</div></div></a></td></tr><tr><td><a href='testimonials.aspx' class='menu'><div onMouseOver='Menu.on(this); Menu.off(\"Photos\"); Menu.kill([\"Sub_Photos\"]); Menu.showMsg(this,Msg.testimonials); return true;' onMouseOut='Menu.off(this); Menu.showMsg(); return true;' class='menuItemOff'><div class='menuItem'>Testimonials</div></div></a></td></tr><tr><td><a href='calendar.aspx' class='menu'><div onMouseOver='Menu.on(this); Menu.off(\"Photos\"); Menu.kill([\"Sub_Photos\"]); Menu.showMsg(this,Msg.ratesAvail); return true;' onMouseOut='Menu.off(this); Menu.showMsg(); return true;' class='menuItemOff'><div class='menuItem'>Availability</div></div></a></td></tr><tr><td><div id='Photos' onMouseOver='Menu.on(this); Menu.show(this,\"Sub_Photos\",23,event,-5,2); Menu.showMsg(this,Msg.subMenu); return true;' onMouseOut='Menu.hide([[\"Sub_Photos\",750]]); Menu.showMsg(); return true;' class='menuItemNoClickOff'><div class='menuItem'>View Photos <span class='menuArrow'>&raquo;</span></div></div></td></tr>";if(winIE)menu+="<tr><td><a href='javascript:addToFavs();' class='menu'><div onMouseOver='Menu.on(this); Menu.off(\"Photos\"); Menu.kill([\"Sub_Photos\"]); Menu.showMsg(this,Msg.fav); return true;' onMouseOut='Menu.off(this); Menu.showMsg(); return true;' class='menuItemOff'><div class='menuItem'>Add to Favorites</div></div></a></td></tr>";menu+="<tr><td><a href='javascript:eMailFriend();' class='menu'><div onMouseOver='Menu.on(this); Menu.off(\"Photos\"); Menu.kill([\"Sub_Photos\"]); Menu.showMsg(this,Msg.eMailToFriend); return true;' onMouseOut='Menu.off(this); Menu.showMsg(); return true;' class='menuItemOff'><div class='menuItem'>E-mail a Friend</div></div></a></td></tr><tr><td><a href='javascript:PopUp.openWin( \"http://maps.google.com/maps?q=2695+S+Kihei+Rd,+Kihei,+HI&iwloc=A&hl=en\", 1 );' class='menu'><div onMouseOver='Menu.on(this); Menu.off(\"Photos\"); Menu.kill([\"Sub_Photos\"]); Menu.showMsg(this,Msg.map); return true;' onMouseOut='Menu.off(this); Menu.showMsg(); return true;' class='menuItemOff'><div class='menuItem'>Street Map</div></div></a></td></tr><tr><td><a href='javascript:void(0);' onClick='if( window.Menu ) { Menu.off(\"ContactUs\"); Menu.clearAll(); } if( window.DW ) DW.createWindow( DW.RentalAgent, [1,300,0], this, event, 6, [ 2, -150, -10 ] );' class='menu'><div onMouseOver='Menu.on(this); Menu.off(\"Photos\"); Menu.kill([\"Sub_Photos\"]); Menu.showMsg(this,Msg.contact); return true;' onMouseOut='Menu.off(this); Menu.showMsg(); return true;' class='menuItemOff' id='ContactUs'><div class='menuItem'>Contact Us</div></div></a></td></tr><tr><td><a href='index.aspx' class='menu'><div onMouseOver='Menu.on(this); Menu.off(\"Photos\"); Menu.kill([\"Sub_Photos\"]); Menu.showMsg(this,Msg.home); return true;' onMouseOut='Menu.off(this); Menu.showMsg(); return true;' class='menuItemOff'><div class='menuItem'>Home</div></div></a></td></tr></table></div>";menu+="<div id='Sub_Photos' onMouseOver='Menu.keepAlive([\"Home\",\"Sub_Photos\"]); return true;' onMouseOut='Menu.hide([[\"Home\"],[\"Sub_Photos\",750]]); return true;' class='menu'><table align='left' border='0' cellspacing='0' cellpadding='0' class='menuBorder'><tr><td><a href='ss.aspx?db=image-data.js' class='menu'><div onMouseOver='Menu.on(this); Menu.showMsg(this,Msg.ss); return true;' onMouseOut='Menu.off(this); Menu.showMsg(); return true;' class='menuItemOff'><div class='menuItem'>Slide-Show</div></div></a></td></tr><tr><td><a href='thumbnails.aspx?db=image-data.js' class='menu'><div onMouseOver='Menu.on(this); Menu.showMsg(this,Msg.tn); return true;' onMouseOut='Menu.off(this); Menu.showMsg(); return true;' class='menuItemOff'><div class='menuItem'>Thumbnails</div></div></a></td></tr></table></div>";document.write(menu);}
function show(Link,menuID,menuPos,evt,xOffset,yOffset,hideMeID){var TheMenu=getElement(menuID);if(typeof menuPos!="number")menuPos=this.subMenuPos;this.setVis(hideMeID,"hidden");this.keepAlive([menuID]);var e=(window.event)?event:evt;var Body=document.body;with(TheMenu.style){position="absolute";left=(screen.width*-1)+"px";top=(screen.height*-1)+"px";visibility="hidden";display="block";}
var x=0,y=0;if(menuPos==0){x=(IE)?e.clientX+Body.scrollLeft:e.pageX;y=(IE)?e.clientY+Body.scrollTop:e.pageY;}
else{var ThisLink=Link;var parPosAbs=false;while(ThisLink){if(SF){if(!parPosAbs)parPosAbs=(ThisLink.style.position=="absolute");if(parPosAbs&&ThisLink==Body)break;}
y+=ThisLink.offsetTop;x+=ThisLink.offsetLeft;ThisLink=ThisLink.offsetParent;}}
switch(menuPos){case 0:x+=xOffset;y+=yOffset;break;case 14:x+=xOffset;y-=TheMenu.offsetHeight+yOffset;break;case 21:x+=Link.offsetWidth+xOffset;y+=Link.offsetHeight-TheMenu.offsetHeight-yOffset;break;case 23:x+=Link.offsetWidth+xOffset;y+=yOffset;break;case 34:x+=xOffset;y+=Link.offsetHeight+yOffset;break;case 44:x=x-TheMenu.offsetWidth+xOffset;y=y+yOffset;break;default:alert("Switch/Case Error at Menu.show: menuPos \""+menuPos+"\" is invalid.");}
var bodyHgt=(IE)?Body.clientHeight:window.innerHeight;var bodyWid=(IE)?Body.clientWidth:window.innerWidth;var menuHgt=TheMenu.offsetHeight;var yFromTop=(IE)?Body.scrollTop:window.pageYOffset;var vScreenPos=y-yFromTop;var vSkew=bodyHgt-vScreenPos;if(vSkew<menuHgt+10)y-=menuHgt-vSkew+10;else if(vScreenPos<10)y=10+yFromTop;var menuWid=TheMenu.offsetWidth;var xFromLeft=(IE)?Body.scrollLeft:window.pageXOffset;var hScreenPos=x-xFromLeft;var hSkew=bodyWid-hScreenPos;if(hSkew<menuWid+10)x-=menuWid-hSkew+10;else if(hScreenPos<10)x=10+xFromLeft;with(TheMenu.style){left=x;top=y;visibility="visible";}}
function hide(Settings){for(var i=0;i<Settings.length;i++){var menuID=Settings[i][0],delay=Settings[i][1],hideMeID=Settings[i][2];if(getElement(menuID)){if(typeof delay=="undefined")delay=1000;if(eval("Menu.timer"+menuID+" == 0")){eval("Menu.timer"+menuID+" = setTimeout( \"Menu.timer"+menuID+" = 0; document.getElementById( '"+menuID+"' ).style.display = 'none'; Menu.setVis( '"+hideMeID+"', 'visible' );\", "+delay+" )");}}}}
function keepAlive(MenuID){for(var i in MenuID){if(getElement(MenuID[i])){clearTimeout(eval("Menu.timer"+MenuID[i]));eval("Menu.timer"+MenuID[i]+" = 0;");}}}
function kill(MenuID){for(var i in MenuID){if(getElement(MenuID[i])){keepAlive([MenuID[i]]);hide([[MenuID[i],0]]);}}}
function on(Elem){if(typeof Elem=="string")Elem=document.getElementById(Elem);if(Elem.className=="menuItemOff")Elem.className="menuItemOn";else if(Elem.className=="menuItemNoClickOff")Elem.className="menuItemNoClickOn";}
function off(Elem){if(typeof Elem=="string")Elem=document.getElementById(Elem);if(Elem.className=="menuItemOn")Elem.className="menuItemOff";else if(Elem.className=="menuItemNoClickOn")Elem.className="menuItemNoClickOff";}
function refreshItems(Div){this.targetPage=Div.parentNode.href;this.resetItems();}
function resetItems(){var Links=document.links;for(var i=0;i<Links.length;i++){if(Links[i].className=="menu"){var target=Links[i].target;var targetLC=target.toLowerCase();if(target.charAt(0)!="_"||target=="_top"||target=="_parent"||targetLC=="_self"){var frame=(target&&target.charAt(0)!="_")?"parent."+target+".":"";if(frame&&parent==self)frame="";var targetPage=(this.targetPage)?this.targetPage:eval(frame+"document.location.href");if(targetPage.charAt(targetPage.length-1)=="/")targetPage+=this.homePage;var Div=(Links[i].firstChild.tagName)?Links[i].firstChild:Links[i].firstChild.nextSibling;if(Links[i].href==targetPage){if(Div.innerHTML.indexOf("menuArrow")==-1)Div.className="menuItemDisable";}
else if(Div.className=="menuItemDisable")Div.className="menuItemOff";}}}}
function setVis(hideMeID,vis){if(hideMeID&&winIE&&document.getElementById(hideMeID))document.getElementById(hideMeID).style.visibility=vis;}
function getElement(menuID){var Elem=null;if(document.getElementById(menuID))Elem=document.getElementById(menuID);else{var callFun=getElement.caller.toString().replace(/\n/g, "" );
callFun=callFun.split("(")[0];alert("ERROR: Menu.getElement unable to getElementById( \""+menuID+"\" )\n\nCALLER: "+callFun);}
return Elem;}
function showMsg(TheMenu,msg){self.status=(msg&&TheMenu&&TheMenu.className!="menuItemDisable")?msg:"";}}
function PopUp(){this.winName="ksWin";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){var nArgs=arguments.length;if(nArgs==2||nArgs==10){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;}}
this.closeWin();var avWid=screen.availWidth-10;var avHgt=screen.availHeight-30;if(wWid<1)wWid=wWid*avWid;if(wHgt<1)wHgt=wHgt*avHgt;if(wWid>avWid*0.90||wWid==1)wWid=avWid*0.90;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,PopUp.winName,"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(){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='printer-friendly.css' type='text\/css'></head><body onLoad='if( document.location.hostname != \"\" && document.location.hostname != \"127.0.0.1\"  && window.print ) window.print();'><div class='title'>"+pfPageTitle+"</div><div class='metaData'>"+document.location.href+" &#149; "+new Date().toLocaleString()+"</div>";var nContent=1;while(document.getElementById("pfContent"+nContent)){var content=document.getElementById("pfContent"+nContent).innerHTML;content=content.replace(/<a\s.*?>/gi , "" );
content=content.replace(/<\/a.*?>/gi , "" );
htm+=content;nContent++;}
if(document.getElementById("pfFooter"))htm+="<p class='footer'>"+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...");}
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)PopUp.Win.MyOpener=self;else setTimeout("PopUp.linkToWin()",250);}}
PopUp=new PopUp();function SlideShow(popUp){initImagesArr();if(popUp){if(!AOL){window.moveTo(0,0);window.resizeTo(screen.availWidth,screen.availHeight);}}
this.disableRightClick=0;this.popUp=popUp;this.slideNum=(Settings.SS.randomStart)?Math.floor(Math.random()*Images.length):0;this.nFirstSlide=this.slideNum;this.speedActual=Settings.SS.speed;this.automated=(this.speedActual<86400000);this.SPEED_FAST=500;this.preLoadTimer=0;this.NextImage=null;this.slideDelay=0;this.running=true;this.forward=true;this.buttons=false;this.maxDissolveMZ=800*800;this.maxImgWid=this.maxImgWid;this.maxImgHgt=this.maxImgHgt;this.longestCaption="";this.init=init;this.start=start;this.showSlide=showSlide;this.skipErrantSlide=skipErrantSlide;this.preLoadNext=preLoadNext;this.imgClickHandler=imgClickHandler;this.back=back;this.stop=stop;this.reStart=reStart;this.next=next;this.showMsg=showMsg;this.getCoordinates=getCoordinates;this.moveImgOverlay=moveImgOverlay;this.pauseSS=pauseSS;this.getControls=getControls;this.getGUI=getGUI;window.onresize=this.moveImgOverlay;this.msg=new Array();this.msg.ssRunning="Slide Show Running...";this.msg.downloadingImg="Preparing next slide...";this.msg.pleaseWait="Downloading image, please wait...";this.msg.ssPaused="Slide Show Paused, re-click \"Pause\" to continue...";this.msg.ssPausedSF="Slide Show Paused, click \"Run\" to continue...";this.msg.next="Jump forward";this.msg.back="Go back";this.msg.tn="View slide-show photos as clickable thumbnails";this.msg.ssExit="Close this slide-show window";function start(){if(Settings.SS.console){var Console=document.getElementById("ssConsole");Console.style.height=Console.offsetHeight;}
this.showMsg();if(Settings.SS.console)Console.style.visibility="visible";this.preLoadNext();}
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;}
return[x,y];}
function moveImgOverlay(){if(SS.ImgOverlay){var OverlayPos=SS.getCoordinates(document.images.slideShow.parentNode);SS.ImgOverlay.style.left=OverlayPos[0]+"px";SS.ImgOverlay.style.top=OverlayPos[1]+"px";}}
function showSlide(){if(this.NextImage){this.showMsg();var TheImage=document.images.slideShow;var widNew=Images[this.slideNum][1];var hgtNew=Images[this.slideNum][2];var imgArea=widNew*hgtNew;checkDim(this.NextImage.src,widNew,hgtNew);if(this.forward&&(winIE||(MZ&&imgArea<=this.maxDissolveMZ)||(SF&&Settings.dissolveSF))&&Settings.transNum>=1&&this.speedActual>this.SPEED_FAST){var nNewImg=(Images.length==this.slideNum)?0:this.slideNum;var nOldImg=(nNewImg==0)?Images.length-1:nNewImg-1;TheImage.width=Images[nOldImg][1];TheImage.height=Images[nOldImg][2];TheImage.src=Settings.folder+Images[nOldImg][0];if(Settings.borderWid)TheImage.style.borderColor="rgb( "+getRGB(Images[nOldImg][4])+" )";var imgStyle=(Settings.borderWid)?" style='border:"+Settings.borderWid+"px solid rgb("+getRGB(Images[nNewImg][4])+");'":"";var newImg="<img name='slideShowNew' src='"+Settings.folder+Images[nNewImg][0]+"' width='"+Images[nNewImg][1]+"' height='"+Images[nNewImg][2]+"' title='"+TheImage.title+"'"+imgStyle+" onmousedown='SS.imgClickHandler( event );' onContextMenu='"+((this.disableRightClick)?"return false;":"return true;")+"' class='ssImage'>";if(!SS.ImgOverlay){SS.ImgOverlay=document.createElement("DIV");SS.ImgOverlay.style.textAlign="center";SS.ImgOverlay.style.top=(screen.height*-1)+"px";SS.ImgOverlay.style.left=(screen.width*-1)+"px";SS.ImgOverlay.style.zIndex=1000;SS.ImgOverlay.style.position="absolute";SS.ImgOverlay.style.backgroundColor="rgb( "+Settings.SS.bkgColor+" )";document.body.appendChild(SS.ImgOverlay);}
SS.ImgOverlay.style.width=this.maxImgWid+"px";SS.ImgOverlay.style.height=this.maxImgHgt+"px";if(winIE)SS.ImgOverlay.style.visibility="hidden";if(MZ)SS.ImgOverlay.style.opacity=0;else SS.ImgOverlay.style.opacity=0;var OverlayPos=SS.getCoordinates(TheImage.parentNode);SS.ImgOverlay.style.left=OverlayPos[0]+"px";SS.ImgOverlay.style.top=OverlayPos[1]+"px";SS.ImgOverlay.innerHTML=newImg;if(winIE)startFade(SS.ImgOverlay,Settings.transNum,Settings.transDur,0,0,0);else fadeIn(SS.ImgOverlay);}
else{if(this.ImgOverlay){document.body.removeChild(this.ImgOverlay);this.ImgOverlay=null;}
TheImage.style.visibility="hidden";TheImage.width=widNew;TheImage.height=hgtNew;if(Settings.borderWid)TheImage.style.borderColor="rgb( "+getRGB(Images[this.slideNum][4])+" )";top.document.title=TheImage.src;TheImage.src=this.NextImage.src;TheImage.style.visibility="visible";}
this.forward=true;}}
function showMsg(){if(Settings.SS.statusBar||Settings.SS.console){var imgTitle=(Images[this.slideNum][3])?Images[this.slideNum][3].replace(/\^/g, "\"" ) : "";
var colon=(imgTitle)?": ":"";var slideNumDisplay=this.slideNum-this.nFirstSlide+1;if(slideNumDisplay<1)slideNumDisplay=Images.length+slideNumDisplay;var slideCount=slideNumDisplay+" of "+Images.length
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;if(Settings.SS.statusBar)self.status="Slide "+slideCount+colon+imgTitle;if(Settings.SS.console){if(document.getElementById("ssConsoleAlt")){document.getElementById("ssConsoleAlt").innerHTML=slideCount;document.getElementById("ssConsole").innerHTML=imgTitle;}
else
document.getElementById("ssConsole").innerHTML=slideCount+colon+imgTitle;}}}
function skipErrantSlide(){if(local||SS.speedActual==SS.SPEED_FAST){if(!SS.errReported){alert("Slide #"+(SS.slideNum+1)+"; "+SS.NextImage.src+" failed to load");SS.errReported=true;}}
SS.NextImage=null;}
function preLoadNext(){if(!Settings.SS.statusBar&&this.automated)self.status=this.msg.ssRunning;var recursionTimer=100;this.slideDelay+=recursionTimer;if(!this.NextImage){this.slideNum++;if(this.slideNum==Images.length)this.slideNum=0;this.NextImage=new Image();this.NextImage.onerror=this.skipErrantSlide;this.NextImage.src=Settings.folder+Images[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();if(Settings.SS.controls&&document.getElementById("backBut"))document.getElementById("backBut").disabled=false;if(Settings.SS.scrollSlide)window.scroll(Settings.SS.scrollSlide[0],Settings.SS.scrollSlide[1]);}
else
this.preLoadTimer=setTimeout("SS.preLoadNext()",recursionTimer);}
function imgClickHandler(e){if(!e)e=window.event;if(e.ctrlKey||e.metaKey){if(this.speedActual==Settings.SS.speed)this.speedActual=this.SPEED_FAST;else
this.speedActual=Settings.SS.speed;}
if(e.shiftKey){if(this.running)this.pauseSS(true);else
this.pauseSS(false);}}
function back(){if(Settings.SS.console)document.getElementById("ssConsole").innerHTML=this.msg.pleaseWait;if(Settings.SS.statusBar)self.status=this.msg.pleaseWait;clearTimeout(this.preLoadTimer);this.forward=false;this.slideNum-=3;if(this.slideNum==-2)this.slideNum=Images.length-2;if(this.slideNum==-3)this.slideNum=Images.length-3;this.NextImage=null;this.pauseSS(false);}
function stop(){clearTimeout(this.preLoadTimer);}
function reStart(){this.slideDelay=Settings.SS.speed+1;this.preLoadNext();}
function next(){if(Settings.SS.console)document.getElementById("ssConsole").innerHTML=this.msg.pleaseWait;if(Settings.SS.statusBar)self.status=this.msg.pleaseWait;clearTimeout(this.preLoadTimer);this.forward=true;this.pauseSS(false);}
function pauseSS(pause){var Button=(this.buttons)?document.getElementById("pauseButton"):null;if(pause){if(SF){if(Button)Button.value="Run";self.status=this.msg.ssPausedSF;}
else{if(Button)Button.className="ssButtonOn";self.status=this.msg.ssPaused;}
this.stop();this.running=false;if(Button)Button.title="Resume";}
else{this.reStart();if(this.automated)self.status=this.msg.ssRunning;if(Button){if(SF)Button.value="Pause";Button.className="ssButton";Button.title="Pause";}
this.running=true;}}
function getControls(){this.buttons=true;return "<input type='button' id='backBut' class='ssButton' value='&lt;&lt;' onClick='SS.back();' title='"+this.msg.back+"'>&nbsp;&nbsp;<input name='pauseButton' class='ssButton' id='pauseButton' type='button' value='Pause' onClick='SS.pauseSS( ( ( SS.running ) ? true : false ) );' title='Pause'"+((SF)?" style='width:60px;'":"")+">&nbsp;&nbsp;<input type='button' class='ssButton' value='&gt;&gt;' onClick='SS.next();' title='"+this.msg.next+"'>";}
function init(){var maxWid=-1,maxHgt=-1,bordWid=Settings.borderWid*2;for(var i=0;i<Images.length;i++){if(Images[i][1]>maxWid)maxWid=Images[i][1];if(Images[i][2]>maxHgt)maxHgt=Images[i][2];}
this.maxImgWid=maxWid+bordWid;this.maxImgHgt=maxHgt+bordWid;var nChars=0;for(var i=0;i<Images.length;i++){if(!Images[i][4])Images[i][4]=Settings.borderCol;var caption=Images[i][3];if(caption&&caption.length>nChars){this.longestCaption=Images[i][3];nChars=caption.length;}
checkImgName(Images[i][0]);}}
function getGUI(guiAlign,consoleLoc,buttonsLoc){this.init();var bordCol=(Images[this.slideNum][4])?Images[this.slideNum][4]:Settings.borderCol;var imgStyle=(Settings.borderWid)?" style='border-color:rgb("+getRGB(bordCol)+");'":"";var img1Title=(Images[0][3])?Images[0][3].replace(/\^/g, "\"" ) : "";
var console="",buttons="";if(Settings.SS.console)console="<tr><td align='center'><div class='ssConsole' id='ssConsole' style='visibility:hidden; width:"+this.maxImgWid+"px;'>"+Images.length+" of "+Images.length+((img1Title)?": ":"")+this.longestCaption+"</div></td></tr>";if(Settings.SS.controls)buttons="<tr><td align='center'><div class='ssControls' style='white-space:nowrap;'>"+SS.getControls()+"</div></td></tr>";var htm="<table align='"+guiAlign+"' border='0' cellspacing='0' cellpadding='0' id='ssGUI'>";if(Settings.pageTitle)htm+="<tr><td align='center'><div class='ssTnTitle'>"+Settings.pageTitle+"</div></td></tr>";if(buttonsLoc=="above")htm+=buttons;if(consoleLoc=="above")htm+=console;htm+="<tr><td valign='top' align='center'><table align='center' border='0' cellspacing='0' cellpadding='0'><tr><td valign='top'><table align='center' border='0' cellspacing='0' cellpadding='0'><tr><td align='center' valign='top' style='width:"+this.maxImgWid+"px; height:"+this.maxImgHgt+"px;'><img name='slideShow' src='"+Settings.folder+Images[this.slideNum][0]+"' onError='SS.skipErrantSlide(); SS.preLoadNext(); this.slideDelay = this.speedActual + 1;' width='"+Images[this.slideNum][1]+"' height='"+Images[this.slideNum][2]+"' title='Slide-Show' onmousedown='SS.imgClickHandler( event );'"+imgStyle+" galleryimg='no' onAbort='this.src=this.src;' class='ssImage' onContextMenu='"+((this.disableRightClick)?"return false;":"return true;")+"'></td></tr>";if(consoleLoc=="below")htm+=console;if(buttonsLoc=="below")htm+=buttons;htm+="</table></td></tr></table></td></tr></table>";if(this.popUp)htm+="<div style='position:absolute; top:0%; right:1%; margin:10px 15px 0px 0px;'><a href='javascript:void(0);' onClick='window.close(); return false;' onMouseover='this.title=SS.msg.ssExit; self.status=SS.msg.ssExit; return true;' onMouseOut='self.status=\"\"; return true;' class='ssExitPopUp'>Exit</a></div>";return htm;}}
function ThumbNails(){this.disableRightClick=0;this.dissolveSF=1;this.transNum=2;this.transDur=0.8;this.maxDissolveMZ=800*800;initImagesArr();this.nImages=Images.length;this.maxIndex=this.nImages-1;for(var i=0;i<this.nImages;i++){var imgTitle=(Images[i][3])?Images[i][3]:"";Images[i][3]=imgTitle.replace(/'/g, "^^" );
if(!Images[i][4])Images[i][4]=Settings.borderCol;checkImgName(Images[i][0]);}
this.init=init;this.checkTnDim=checkTnDim;this.setSectVis=setSectVis;this.getNewIndex=getNewIndex;this.preloadNext=preloadNext;this.getNumLinesInTitle=getNumLinesInTitle;this.swapLgImg=swapLgImg;this.show=show;this.hideLgImg=hideLgImg;this.setImgTitle=setImgTitle;this.imgBorder=imgBorder;this.disableBackButton=disableBackButton;this.showNumImages=showNumImages;this.writeConsole=writeConsole;this.updateProgressBar=updateProgressBar;this.reportImgName=reportImgName;this.writeHtmlTN=writeHtmlTN;this.Link=null;this.scrollFromTop=0;this.scrollFromLeft=0;this.lgPhotoShowing=false;this.NextLgImage=null;this.nextImgTimer=0;this.curIndex=-1;this.tnRemainingTN=0;function init(){this.showNumImages();this.checkTnDim();}
this.checkTN=1;this.checkTnTimer=0;this.TnReal=null;this.TnSizeErr="";function checkTnDim(){if(GetCookie("userHasWritePrivleges")){if(this.TnReal==null){var TN=document.getElementById("TN_"+this.checkTN);if(TN){TnReal=new Image();TnReal.src=TN.src;}
else{TnReal=null;clearTimeout(this.checkTnTimer);if(this.TnSizeErr)DW.createWindow(["Thumbnail Dimension Error","<div style='margin:0px 0px 4px 0px;'>Thumbnails must be "+Settings.TN.width+" x "+Settings.TN.height+" pixels:</div>"+this.TnSizeErr],[0,400,0],null,null,6,[4,0,0]);}}
if(TnReal&&TnReal.complete){var realWid=TnReal.width,realHgt=TnReal.height;if(realWid>1&&realHgt>1&&(realWid!=Settings.TN.width||realHgt!=Settings.TN.height)){var FileComponents=TnReal.src.split("/");var fileName=FileComponents[FileComponents.length-1];this.TnSizeErr+="<div style='margin:0px 0px 0px 8px;'>#"+this.checkTN+" "+fileName+" is "+realWid+" x "+realHgt+"</div>";}
this.checkTN++;this.checkTnTimer=setTimeout("TN.checkTnDim();",100);}}}
function setSectVis(sectName,className){var i=0;while(document.getElementById(sectName+i)){var PageSection=document.getElementById(sectName+i);PageSection.className=className;i++;}}
function getNewIndex(movingForward){if(movingForward)return(this.curIndex<this.maxIndex)?this.curIndex+1:0;else
return(this.curIndex>0)?this.curIndex-1:this.maxIndex;}
function preloadNext(){var newIndex=this.getNewIndex(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 swapLgImg(movingForward){var Img=document.getElementById("imgLargeID");if(Img){Img.onload=null;var newIndex=this.getNewIndex(movingForward);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){document.getElementById("imgLargeID").style.visibility="hidden";var imgTitle=Images[newIndex][3];TN.setImgTitle(imgTitle,newIndex);Img.width=Images[newIndex][1];Img.height=Images[newIndex][2];Img.style.border=Settings.borderWid+"px solid rgb( "+getRGB(Images[newIndex][4])+" )";Img.src=this.NextLgImage.src;setTimeout("document.getElementById( 'imgLargeID' ).style.visibility = 'visible'",1);checkDim(this.NextLgImage.src,Images[newIndex][1],Images[newIndex][2]);this.NextLgImage=null;clearInterval(this.nextImgTimer);this.nextImgTimer=0;this.curIndex=(movingForward)?this.curIndex+1:this.curIndex-1;if(this.curIndex>this.maxIndex)this.curIndex=0;else if(this.curIndex<0)this.curIndex=this.maxIndex;this.preloadNext();}
else{if(this.nextImgTimer==0){eval("this.nextImgTimer = setInterval( 'TN.swapLgImg( "+movingForward+" )', 250 );");var lineBrks=getNumLinesInTitle(Images[newIndex][3]);TN.setImgTitle("Downloading image, please wait..."+lineBrks,null);}}}
else{this.NextLgImage=null;clearInterval(this.nextImgTimer);this.nextImgTimer=0;}}
function show(ImgInfoArr){this.lgPhotoShowing=true;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;this.Link=ImgInfoArr[7];var sectName=ImgInfoArr[8];this.setSectVis(sectName,"off");ImgInfoArr[5]=getRGB(ImgInfoArr[5]);var tableHgt=1;tableHgt=(IE)?document.body.clientHeight-60:window.innerHeight-60;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='bigID"+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=" STYLE='background-color:"+Settings.TN.bkgColOn+";'";var thisIndex=this.curIndex;var backMsg="Back to thumbnails";var imgTitle=ImgInfoArr[4];var lineBrks=getNumLinesInTitle(imgTitle);html+="<TD id='imgTD' ALIGN='center'"+bkgStyle+"><A HREF='javascript:TN.hideLgImg( \""+sectName+"\" );' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' TITLE='"+backMsg+"'"+bkgStyle+">";var dissolveMZ=(ImgInfoArr[2]*ImgInfoArr[3]<=this.maxDissolveMZ);html+="<IMG ID='imgLargeID' NAME='"+sectName+"ID' 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(TN.dissolveSF,dissolveMZ)+"' onAbort='this.src=this.src;' onLoad='startFade( this, TN.transNum, TN.transDur, 0, TN.dissolveSF, "+dissolveMZ+" ); TN.setImgTitle( \""+imgTitle+"\", "+thisIndex+" ); TN.preloadNext(); checkDim( this.src, "+ImgInfoArr[2]+", "+ImgInfoArr[3]+" );' onContextMenu='"+((TN.disableRightClick)?"return false;":"return true;")+"'></A></TD></TR><TR><TD ALIGN='center' width='100%'><DIV ID='imgTitleID' CLASS='tnLgImgTitle'>Loading image, please wait..."+lineBrks+"</DIV><DIV STYLE='line-height:4px;'> &nbsp;</DIV></TD></TR><TR><TD ALIGN='center'><A HREF='javascript:TN.swapLgImg( 0 );' 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;<A HREF='javascript:TN.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+"'>Back to Thumbnails</A>&nbsp;&nbsp;<A HREF='javascript:TN.swapLgImg( 1 );' 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></TD></TR><TR><TD><A HREF='javascript:void(0);' ID='botFocalPt'></A><BR></TD></TR></TABLE><BR>";html+="</TD></TR></TABLE><BR>";html+="</DIV>";var ImgConsole=document.getElementById(sectName);ImgConsole.innerHTML=html;ImgConsole.className="on";var FocuserTop=document.getElementById("topFocalPt");FocuserTop.focus();var FocuserBot=document.getElementById("botFocalPt");FocuserBot.focus();return false;}
function hideLgImg(sectName){this.lgPhotoShowing=false;var ImgConsole=document.getElementById("bigID"+sectName);ImgConsole.innerHTML="";ImgConsole.className="off";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;TN.setSectVis(sectName,"on");if(typeof this.Link=="object"){this.Link.focus();this.Link.blur();}
window.scroll(this.scrollFromLeft,this.scrollFromTop);}
function setImgTitle(imgTitle,newIndex){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 "+(this.maxIndex+1)+colon+imgTitle;}
if(!imgTitle)imgTitle="&nbsp; <br>";var ImgTitle=document.getElementById("imgTitleID");imgTitle=imgTitle.replace(/\^\^/g, "'" );
imgTitle=imgTitle.replace(/\^/g, "\"" );
ImgTitle.innerHTML=imgTitle;}
function imgBorder(Img,color){if(Img.complete)Img.style.borderColor=color;}
function disableBackButton(){if(this.lgPhotoShowing)document.location.href=document.location.href;}
function showNumImages(){if(this.nImages>-1){if(Settings.TN.ProgressBar.hideOnSuccess)document.getElementById("consoleTN").style.visibility="hidden";setTimeout('self.status=TN.nImages+" Thumbnails loaded..."',500);}}
function writeConsole(){document.write("<div id='consoleTN' style='line-height:14px;' align='center'><div>&nbsp; </div><br></div>");}
function updateProgressBar(){var Console=document.getElementById("consoleTN");try{if(this.tnRemainingTN>=0){var dBarWid=(this.nImages-this.tnRemainingTN)*(Settings.TN.ProgressBar.width/this.nImages);var percentLoaded=parseInt(((this.nImages-this.tnRemainingTN)/this.nImages)*100)+"%";var pBar="<div style='width:"+Settings.TN.ProgressBar.width+"px; background-color:"+Settings.TN.ProgressBar.bgColor+"; text-align:left; z-index:0;'><div style='width:"+dBarWid+"px; background-color:"+Settings.TN.ProgressBar.progressColor+";'>&nbsp;</div></div><div style='position:relative; top:-14px; left:0px; width:"+Settings.TN.ProgressBar.width+"px; text-align:center; z-index:1; font-family:arial,helvetica; font-size:8pt; color:"+Settings.TN.ProgressBar.fontColor+"; font-weight:bold'>Loading Thumbnails "+percentLoaded+"</div>";Console.innerHTML=pBar;if(this.tnRemainingTN>0)setTimeout("TN.updateProgressBar()",250);else if(Settings.TN.ProgressBar.hideOnSuccess)Console.style.visibility="hidden";}}
catch(Err){setTimeout("TN.updateProgressBar()",250);}}
function reportImgName(Link,imageNum,evt){if(GetCookie("userHasWritePrivleges")){var Img=Images[imageNum-1];var ImgTN=Link.firstChild;var wid=Img[1],hgt=Img[2];var shape=(wid>hgt)?"horizontal":((wid<hgt)?"vertical":"square");var htm="<table align='left' border='0' cellspacing='0' cellpadding='0'><tr><td align=center valign=top><img src='"+ImgTN.src+"' width='"+ImgTN.width+"' height='"+ImgTN.height+"'></td><td align=center valign=top style='padding:4px;'><table align='center' border='0' cellspacing='0' cellpadding='0'><tr><td align=right> Name:&nbsp;</td><td>"+Img[0]+"</td></tr><tr><td align=right> Number:&nbsp;</td><td>"+imageNum+" of "+TN.nImages+"</td></tr><tr><td align=right> Size:&nbsp;</td><td>"+wid+" &times; "+hgt+" px; "+shape+"</td></tr><tr><td align=right valign=top> Caption:&nbsp;</td><td>"+Img[3]+"</td></tr></table></td></table>";if(window.DW)DW.createWindow(["Image Information",htm],[0,400,0],Link,evt);return false;}}
function writeHtmlTN(){self.status="Reading information in data-base...";if(dataFile){this.tnRemainingTN=this.nImages;self.status="Rendering data as HTML, please wait...";var htm="<div id='thumbnails0'>";var tnNum=0;thePageTitle=Settings.pageTitle;thePageTitle=thePageTitle.replace(/\^\^/g, "&#39;" );
thePageTitle=thePageTitle.replace(/\^/g, "&#34;" );
if(thePageTitle)htm+="<div class='ssTnTitle' align='center'>"+thePageTitle+"</div><div style='line-height:10px;'>&nbsp; </div>";htm+="<table align='center' border=0 cellpadding=0 cellspacing=0>";var nRows=Math.floor(this.nImages/Settings.TN.nImagesRow)+1;for(var row=0;row<nRows;row++){htm+="<tr align='center' valign='middle'><td align=center nowrap>";for(var i=0;i<Settings.TN.nImagesRow;i++){var thisTnImgData='';var writeTN=(tnNum<this.nImages)?true:false;if(writeTN){var lgImageName=Images[tnNum][0],tnImageName="";lastDotPos=lgImageName.lastIndexOf(".");var fileExt="TN"+lgImageName.substring(lastDotPos,lgImageName.length);tnImageName=lgImageName.split(".")[0]+fileExt;var lgWid=Images[tnNum][1];var lgHgt=Images[tnNum][2];var imgTitle=Images[tnNum][3];imgTitle=imgTitle.replace(/\"/g, "^" );
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=lgImageName.split(".")[0];var toolTip=imgTitle.replace(/<.*?>/g, "" ); // Remove HTML tags
toolTip=toolTip.replace(/\^\^/g, "&#39;" );
toolTip=toolTip.replace(/\^/g, "&#34;" );
var lgBorderCol=Images[tnNum][4];var lgBorderWid=Settings.borderWid;var tn=Settings.folder+tnImageName;tnNum++;}
var imageNum=row*Settings.TN.nImagesRow+i+1;if(writeTN){var lgImgName=tnImageName.replace(/TN\./, "." );
var toolTipColon=(toolTip)?": ":"";toolTip=imageNum+" of "+this.nImages+toolTipColon+toolTip;htm+="<a href='"+Settings.folder+lgImgName+"' onMouseOver='self.status=\""+toolTip+"\"; return true;' onMouseOut='self.status=\"\"; return true;' title=\""+toolTip+"\" onClick='if( window.TN ) { TN.curIndex = "+(imageNum-1)+"; return TN.show( [ \""+Settings.folder+"\", \""+lgImgName+"\", "+lgWid+", "+lgHgt+", \""+imgTitle+"\", \""+lgBorderCol+"\", "+lgBorderWid+", this, \"thumbnails\" ] ); }' onContextMenu='return TN.reportImgName( this, "+imageNum+", event );'><img src='"+tn+"' border='0' hspace='2' vspace='2' width='"+Settings.TN.width+"' HEIGHT='"+Settings.TN.height+", ' title=\""+toolTip+"\" style='border:1px solid "+Settings.TN.bordColOff+";' onMouseover='if( window.TN ) TN.imgBorder(this,Settings.TN.bordColOn);' onMouseout='if( window.TN ) TN.imgBorder(this,Settings.TN.bordColOff);' onAbort='this.src=this.src;' onLoad='TN.tnRemainingTN--;' onContextMenu='"+((TN.disableRightClick)?"return false;":"return true;")+"' id='TN_"+imageNum+"'></a>";}}
htm+="</td></tr>";}
htm+="</table></div><span id='thumbnails' class='off'></span>";document.write(htm);self.status="";}}}
function largePic(cap,wid,hgt,Link,evt){if(window.DW){DW.createWindow([cap,"imgSrc="+Link.href],[0,wid,hgt],Link,evt);return false;}
else
return true;}
function DynamicWindow(transNum,transDur){this.dissolveMZ=1;this.dissolveSF=1;this.gDisableContextImgMenu=false;this.Msg=new Array();this.Msg["fullSize"]="View this image full-size";this.RentalAgent=[DB.Contact.RentalAgent.CompanyName,"<DL><DT>PHONE NUMBERS<DD>"+((DB.Contact.RentalAgent.PhTollFree)?DB.Contact.RentalAgent.PhTollFree+" Toll Free<br>":"")+((DB.Contact.RentalAgent.PhOther)?DB.Contact.RentalAgent.PhOther+" Direct<br>":"")+"<DT>OUR ADDRESS<DD>"+DB.Contact.RentalAgent.CompanyName+"<br>"+DB.Contact.RentalAgent.Address1+"<br>"+DB.Contact.RentalAgent.Address2+"<br>"+((DB.Contact.RentalAgent.OfficeMapURL)?"<a href='javascript:void(0);' onClick='PopUp.openWin( \""+DB.Contact.RentalAgent.OfficeMapURL+"\", 1 );' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title=''>View Map</a>"+"<br>":"")+"<DT>OFFICE HOURS<DD>"+DB.Contact.RentalAgent.OfficeHours+"<DT>E-MAIL ADDRESS<DD><A HREF='mailto:"+DB.Contact.RentalAgent.Email+"?subject="+(escape("Kamaole Sands #5-207"))+"' onMouseOver='self.status = \"Send e-mail to our Rental Management Company\"; return true;' onMouseOut='self.status = \"\"; return true;'>"+DB.Contact.RentalAgent.Email+"</A></DL>"];this.transNum=(transNum)?transNum:2;this.transDur=(transDur)?transDur:0.8;this.dWinOffsetX=0;this.dWinOffsetY=0;this.Window=null;this.overTitleBar=false;this.Photo=null;this.disableContextImgMenu=false;this.createWindow=createWindow;this.showImg=showImg;this.keepInWin=keepInWin;this.getClickPosition=getClickPosition;this.getIeBody=getIeBody;this.getData=getData;this.mouseDown=mouseDown;this.mouseMove=mouseMove;this.removeWin=removeWin;this.mouseUp=mouseUp;this.dissolve=dissolve;document.onmousedown=this.mouseDown;document.onmousemove=this.mouseMove;document.onmouseup=this.mouseUp;function createWindow(dataSrc,WinDim,TheLink,theEvent,bodyMargin,RequestedPos,disableContextImgMenu){if(TheLink)TheLink.blur();if(!bodyMargin)bodyMargin=0;this.disableContextImgMenu=(typeof disableContextImgMenu=="boolean")?disableContextImgMenu:this.gDisableContextImgMenu;var Data=getData(dataSrc,TheLink),title,body;title=Data[0].replace(/\^\^/g, "'" );
title=title.replace(/\^/g, "\"" );
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]:10;if(showImg){var mzDissolve=(MZ&&this.dissolveMZ&&this.dissolve(winWid,winHgt));var sfDissolve=(SF&&this.dissolveSF);var body="<img src='"+body.split("imgSrc=")[1]+"' width='"+winWid+"' height='"+winHgt+"' border='0' hspace='0' vspace='0' galleryimg='no' style='"+getOpacity(sfDissolve,mzDissolve)+"' onload='DW.showImg( this );' onAbort='this.src=this.src;'"+">";this.title=title;var titleLC=title.toLowerCase(),lineBrks="";var nLinesInTitle=titleLC.split("<br>").length;for(var i=0;i<nLinesInTitle;i++)lineBrks+="<br>";title="Loading Image..."+lineBrks;}
var Window=document.getElementById("dWinID");if(Window)document.body.removeChild(Window);var NewWindow=document.createElement("DIV"),scrollSt,bodyHgtSt;bodyHgtStyle=(winHgt)?" height:"+winHgt+"px;":"";NewWindow.id="dWinID";NewWindow.className="dwWin";document.body.appendChild(NewWindow);NewWindow.style.visibility="hidden"
NewWindow.style.position="absolute";NewWindow.style.width=(IE)?(winWid+2*parseInt(NewWindow.currentStyle["borderWidth"]))+"px":winWid+"px";NewWindow.style.top=(screen.height*-1)+"px";NewWindow.style.left=(screen.width*-1)+"px";NewWindow.style.zIndex=10000;var myWindow="<div class='dwTitleRow' id='dwTitleRowID'><table align='center' border='0' cellspacing='0' cellpadding='0'><tr><td class='dwTitle' style='width:100%; text-align:center;' onmouseover='DW.overTitleBar=true;' onmouseout='DW.overTitleBar=false;' id='dwTitleTd1ID'><div id='dwTitleBarID'>"+title+"</div></td><td valign='top' id='dwTitleTd2ID'><a href='javascript:DW.removeWin();' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' onClick='this.blur(); return true;' title='Close' class='dwX'>&times;</a></td></tr></table></div><div class='"+((showImg)?"dwBodyParentImg":"dwBodyParent")+"' style='width:100%;"+bodyHgtStyle+scrollStyle+"'><div class='dwBody' id='dwBodyID' style='margin:"+bodyMargin+"px;'>"+body+"</div></div>";NewWindow.innerHTML=myWindow;var xPos,yPos;if(clickPos||aboveClkPos){var ClickPos=getClickPosition(theEvent);xPos=ClickPos[0];var vPortWid=(document.body.clientWidth)?document.body.clientWidth:window.innerWidth;var skew=Math.round(100*xPos/vPortWid)/100;xPos=xPos-(skew*NewWindow.offsetWidth);if(clickPos)yPos=ClickPos[1]+yOffset;else
yPos=ClickPos[1]-NewWindow.offsetHeight+yOffset;}
else if(topCent||center||botCent){var IeBody,scrollX,scrollY,bodyWid,bodyHgt;if(IE){IeBody=getIeBody();scrollX=IeBody.scrollLeft;scrollY=IeBody.scrollTop;bodyWid=IeBody.clientWidth;bodyHgt=IeBody.clientHeight;}
else{scrollX=window.pageXOffset;scrollY=window.pageYOffset;bodyWid=window.innerWidth;bodyHgt=window.innerHeight;}
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);}
var NewWindowPos=keepInWin(NewWindow,xPos,yPos);xPos=Math.round(NewWindowPos[0]);yPos=Math.round(NewWindowPos[1]);NewWindow.style.left=xPos+"px";NewWindow.style.top=yPos+"px";NewWindow.style.visibility="visible";}
function showImg(Photo){Photo.onclick=DW.removeWin;Photo.oncontextmenu=function(){if(DW.disableContextImgMenu)return false;};Photo.onmouseover=function(){Photo.title="Click to close";self.status=Photo.title;Photo.style.cursor=(IE)?"hand":"pointer";return true;};Photo.onmouseout=function(){self.status="";return true;};try{checkDim(Photo.src,Photo.width,Photo.height);document.getElementById("dwTitleBarID").innerHTML=this.title;var mzDissolve=(MZ&&this.dissolveMZ&&this.dissolve(Photo.width,Photo.height));var sfDissolve=(SF&&this.dissolveSF);startFade(Photo,this.transNum,this.transDur,0,sfDissolve,mzDissolve);}
catch(Err){self.status="Exception thrown at method DW.showImg...";}}
function keepInWin(NewWindow,leftEdge,topEdge){if(IE)var IeBody=getIeBody();var bodyHgt=(IE)?IeBody.clientHeight:window.innerHeight;var bodyWid=(IE)?IeBody.clientWidth:window.innerWidth;var winHgt=NewWindow.offsetHeight;var yOffset=(IE)?IeBody.scrollTop:window.pageYOffset;var vScreenPos=topEdge-yOffset;var vSkew=bodyHgt-vScreenPos;if(vSkew<winHgt+10)topEdge-=winHgt-vSkew+10;else if(vScreenPos<10)topEdge=10+yOffset;var winWid=NewWindow.offsetWidth;var xOffset=(IE)?IeBody.scrollLeft:window.pageXOffset;var hScreenPos=leftEdge-xOffset;var hSkew=bodyWid-hScreenPos;if(hSkew<winWid+10){leftEdge-=winWid-hSkew+10;if(!IE&&document.body.scrollHeight>bodyHgt)leftEdge-=15;}
else if(hScreenPos<10)leftEdge=10+xOffset;return[leftEdge,topEdge];}
function getIeBody(){var ieCSS=(document.compatMode)?document.compatMode=="CSS1Compat":false;return(ieCSS)?document.documentElement:document.body;}
function getClickPosition(theEvent){try{if(IE)IeBody=getIeBody();var x=(IE)?event.clientX+IeBody.scrollLeft:theEvent.pageX;var y=(IE)?event.clientY+IeBody.scrollTop:theEvent.pageY;}
catch(err){var x=0;var y=0;}
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){this.Window=document.getElementById("dWinID");if(IE){this.dWinOffsetX=event.offsetX;this.dWinOffsetY=event.offsetY;}
else{this.dWinOffsetX=e.layerX;this.dWinOffsetY=e.layerY;return false;}}}
function mouseMove(e){if(this.Window){var ClickPos=getClickPosition(e);if(ClickPos[0]<=0||ClickPos[1]<=0){this.Window=null;return false;}
if(IE){if(event.button!=1)return false;this.Window.style.left=event.clientX-this.dWinOffsetX+document.body.scrollLeft;this.Window.style.top=event.clientY-this.dWinOffsetY+document.body.scrollTop;return false;}
else{this.Window.style.top=e.pageY-this.dWinOffsetY;this.Window.style.left=e.pageX-this.dWinOffsetX;}}}
function removeWin(){var Window=document.getElementById("dWinID");if(Window)document.body.removeChild(Window);}
function mouseUp(){this.Window=null;}
function dissolve(wid,hgt){var imgArea=wid*hgt;var maxImgArea=500*500;return(imgArea<=maxImgArea);}}
function addToFavs(){window.external.AddFavorite("http://www.mauiparadisehale.com","Kamaole Sands 5-207 - A Luxury Maui Vacation Condo");}
function writeTopLinks(){document.write("<DIV STYLE='position:absolute; left:50%; top:0px; margin-left:-446px; width:500px; text-align:left;'><DIV STYLE='position:relative; left:60px; top:17px; width:443px; height:48px;' onMouseover='this.style.cursor=\"pointer\"; if( window.Menu ) Menu.show( this, \"Home\", 0, event, 4, 4 ); return true;' onMouseout='this.style.cursor=\"default\"; if( window.Menu ) Menu.hide([[\"Home\"]]); return true;' onClick='document.location.href=\"index.aspx\";'></DIV></DIV>");}
function getLinks(page){var theLinks="<table border=0 align=center style='color:rgb(80,80,80); background-color:rgb(35,35,35);'><tr><td class='fSize11'>&nbsp;&nbsp;";theLinks+=(page=="about.aspx")?"About our Condo &#149; ":"<A HREF='about.aspx' onMouseOver='if( window.Menu ) Menu.clearAll(); self.status = Msg.about; return true;' onMouseOut='self.status = \"\"; return true;'>About our Condo</A> &#149; ";theLinks+=(page=="testimonials.aspx")?"Testimonials &#149; ":"<A HREF='testimonials.aspx' onMouseOver='if( window.Menu ) Menu.clearAll(); self.status = Msg.testimonials; return true;' onMouseOut='self.status = \"\"; return true;'>Testimonials</A> &#149; ";theLinks+=(page=="calendar.aspx")?"Availability &#149; ":"<A HREF='calendar.aspx' onMouseOver='if( window.Menu ) Menu.clearAll(); self.status = Msg.ratesAvail; return true;' onMouseOut='self.status = \"\"; return true;'>Availability</A> &#149; ";theLinks+="<A HREF='thumbnails.aspx?db=image-data.js' onMouseOver='if( window.Menu ) Menu.show( this, \"Sub_Photos\", 14, event, 0, 2 ); self.status = Msg.photos; return true;' onMouseOut='if( window.Menu ) Menu.hide([[\"Sub_Photos\"]]); self.status = \"\"; return true;' STYLE='margin:60px 0px 60px 0px;'>Photos</A> &#149; ";theLinks+=(winIE)?"<A HREF='javascript:addToFavs();' onMouseOver='if( window.Menu ) Menu.clearAll(); self.status = Msg.fav; return true;' onMouseOut='self.status = \"\"; return true;'>Add to Favorites</A> &#149; ":"";theLinks+="<A HREF='javascript:eMailFriend();' onMouseOver='if( window.Menu ) Menu.clearAll(); self.status = Msg.eMailToFriend; return true;' onMouseOut='self.status = \"\"; return true;'>E-mail a Friend</A> &#149; ";theLinks+="<A HREF='javascript:PopUp.openWin( \"http://maps.google.com/maps?q=2695+S+Kihei+Rd,+Kihei,+HI&iwloc=A&hl=en\", 1 );' onMouseOver='if( window.Menu ) Menu.clearAll(); self.status = Msg.map; return true;' onMouseOut='self.status = \"\"; return true;'>Street Map</A> &#149; ";theLinks+="<A HREF='javascript:void(0);' onMouseOver='if( window.Menu ) Menu.clearAll(); self.status = Msg.contact; return true;' onMouseOut='self.status = \"\"; return true;' onClick='if( window.DW ) DW.createWindow( DW.RentalAgent, [1,300,0], this, event, 6, [ 1, -150, -280 ] ); return false;'>Contact Us</A> &#149; ";theLinks+=(page=="index.aspx")?"Home &#149; ":"<A HREF='index.aspx' onMouseOver='if( window.Menu ) Menu.clearAll(); self.status = Msg.home; return true;' onMouseOut='self.status = \"\"; return true;'>Home</A> &#149; ";theLinks=theLinks.substring(0,theLinks.length-8)+"&nbsp;&nbsp;</td></tr></table>";return theLinks;}
function eMailFriend(){var subject=escape("Kamaole Sands 5-207 - A Luxury Maui Vacation Condo");var body=escape("Check out this luxury vacation condo situated across the street from white sand swimming beach (Kamaole Beach Park III) in Kihei, Maui: \n\nhttp://www.MauiParadiseHale.com");document.location.href="mailto:?subject="+subject+"&body="+body;}
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:"+DB.ReportErrorsTo+"?subject="+escape(theHost+"; "+sub)+"&body="+escape(msg+" \n\nDIAGNOSTICS: This info may be used to help us troubleshoot technical problems"+diagnostics);}
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 expDate12Mon=new Date();expDate12Mon.setTime(expDate12Mon.getTime()+(24*60*60*365*1000));function FileWriter(){this.serverTimeZoneOffsetHours=4;this.HtmButtons="<button onClick='FW.insertTags( \"<br>\", \"\", \"EditedHTML\" ); return false;' title='Inserts line-break tag at cursor position' class='htmlTags'>&lt;br&gt;</button><button onClick='FW.insertTags( \"<b>\", \"</b>\", \"EditedHTML\" ); return false;' title='Inserts bold tags around highlighted text' class='htmlTags'><b>B</b></button><button onClick='FW.insertTags( \"<i>\", \"</i>\", \"EditedHTML\" ); return false;' title='Inserts italic tags around highlighted text' class='htmlTags'><i>I</i></button>";this.HtmNotes="";this.JsButtons="";this.JsNotes="";this.XmlNotes="<table align='center' border='0' cellspacing='0' cellpadding='0'><tr><td class='xmlInstructions'><div style='margin:8px 0px 4px 0px;'>Here's why you may need to edit this XML data:</div><ol style='margin-top:4px; margin-bottom:4px;'><li style='margin-top:6px;'>To change rental-agent information like Company Name, Address, Phone, etc.</li><li>To change Administrator Names, E-mails, Passwords & Privlege Level<ol class='fSize10' style='margin-top:0px; margin-bottom:4px;' type='a'><li>Setting full-privileges to yes allows user to access ALL data on All pages (Calendar/HTML/JavaScript/XML)</li><li>Setting full-privileges to no allows user to edit calendar only</li><li>Contact David to add or remove administrators</li></ol></li><li style='margin-top:6px;'>To change calendar read-all password.</li><li style='margin-top:6px;'>To change e-mail address where error messages (if any) are delivered.</li></ol></td></tr></table>";this.AdminLinks="";if(local)this.serverTimeZoneOffsetHours=10;this.forceLogin=forceLogin;this.forceLogin();if(!GetCookie("userWithWritePrivleges"))return;this.help=help;this.showHelp=showHelp;this.restore=restore;this.insertTags=insertTags;this.init=init;this.checkContent=checkContent;this.resetUI=resetUI;this.reLoad=reLoad;this.logOff=logOff;this.cursorReadyHtm=false;this.cursorReadyJS=false;this.init();function forceLogin(){try{if(window.LastAdministrator){var lastAdminFull=LastAdministrator[0];var lastAdminFirst=LastAdministrator[0].split(" ")[0];var nTicks_Jan_1_1970=621355968000000000;var ms=(LastAdministrator[1]-nTicks_Jan_1_1970)/10000;var loggedIn=new Date(ms+this.serverTimeZoneOffsetHours*60*60*1000).toLocaleString();var sub="Are you logged onto "+theHost+" right now?";sub=(SF)?sub:escape(sub);var body="\r\n\r\n"+lastAdminFirst+", are you logged onto the site as Administrator right now? I am trying to log-in and I am getting a warning indicating you logged-in on "+loggedIn+" and are still logged in!\r\nThe current time on my computer is "+new Date().toLocaleString();body=(SF)?body:escape(body);var htm="<div class='fwForceLogin'>Hello "+qStr.getVal("user").split("-")[0]+". "+lastAdminFull+" logged in on "+loggedIn+". "+lastAdminFirst+" is either presently logged in or may have failed to log-out!<br><br>In order to protect the integrity of our data, two or more users editing the same data at the same time is prohibited. With that in mind, you can:<ol style='margin-top:6px; margin-bottom:6px;'><li style='margin-bottom:2px;'>Wait until "+lastAdminFirst+" logs out.</li><li style='margin-bottom:2px;'>Email "+lastAdminFirst+" at <a href='mailto:"+DB.Administrators[lastAdminFull]+"?subject="+sub+"&body="+body+"' title='Send e-mail asking if this person is logged-in'>"+DB.Administrators[lastAdminFull]+"</a> to ask.</li>"+((fileName=="calendar.aspx")?"<li style='margin-bottom:2px;'><a href='calendar.aspx?pw="+rapw+"' title='You can read-all booking info but you cannot edit it'>Load the calendar</a> with read-all access.</li>":"")+"<li><a href='"+document.location.href+"' onClick='SetCookie( \"forcedLogin\", \"yes\", null, \"/\", cookieDomain ); return true;' title='Logs you in & forces out other active administrator (if any)'>Force Log-In</a> now because you know that "+lastAdminFirst+" failed to log-out last time and is NOT actively logged-in. Note that you will terminate "+lastAdminFirst+"'s session if "+lastAdminFirst+" is logged-in right now.</li></ol></div>";DW.createWindow(["Concurrent Administrator Conflict",htm],[0,500,0],null,null,6,[3,0,20]);}}
catch(Err){if(local){var err="";for(member in Err)err+=member+": "+Err[member]+"\n";alert("Exception at method FW.forceLogin:\n\n"+err);}
else{setTimeout("FW.forceLogin();",250);self.status="Initializing File Writer: FW.forceLogin()...";}}}
function showHelp(Link){var PlsMin=Link.previousSibling;var Content=Link.nextSibling;if(Content.className=="fw1"){Content.className="fw0";PlsMin.innerHTML="+";}
else{Content.className="fw1";PlsMin.innerHTML="-";}}
function help(nType,Link,evt){function getHelpTxt(helpType){var htm="<div class='fwHelpSect'><a href='javascript:void(0)' onClick='FW.showHelp(this.nextSibling);' class='fwPlusMinus'>+</a><a href='javascript:void(0);' onClick='FW.showHelp(this);' class='fw'>Reload & Cache</a><div class='fw0'><u>Cache Defined</u>: All browsers seamlessly store all recent pages that you have visited on your hard drive. This process is called \"caching\" and it greatly speeds up your web browsing because your browser is able to later retrieve these web pages off your hard drive much quicker than downloading them again from the server.<br><br><u>Caching will cause problems for you</u> because after you press Publish, and the page reloads, you may be looking at a past cached version of that page rather than the most recent version which you just published and are naturally expecting to see.<br><br><u>Here's a cure to all your cache problems</u>: After you press Publish, & once the page loads, don't evaluate it just yet - better yet, immediately go down to the Reload button (next to Publish) & press it. Now, after this full reload, where you can be sure cache is not an issue, you may evaluate the page to make sure it looks as you were expecting.<br><br><u>Remember this mantra</u> & you will eliminate cache frustrations forever!<br>&nbsp;&nbsp;\"Just Published but don't see your changes? Then press Reload\"</div></div><div class='fwHelpSect'><a href='javascript:void(0)' onClick='FW.showHelp(this.nextSibling);' class='fwPlusMinus'>+</a><a href='javascript:void(0);' onClick='FW.showHelp(this);' class='fw'>Publish "+helpType+"</a><div class='fw0'>Press Publish-"+helpType+" after you have made your edits. Your changes will be permanently written to file and the page will be reloaded. After the page reloads, verify your changes. If you don't see them press Reload.";if(helpType=="XML")htm+=" Changes made to XML data update across entire site immediately";htm+="</div></div><div class='fwHelpSect'><a href='javascript:void(0)' onClick='FW.showHelp(this.nextSibling);' class='fwPlusMinus'>+</a><a href='javascript:void(0);' onClick='FW.showHelp(this);' class='fw'>Reset</a><div class='fw0'>Press Reset if you made edit(s) but then changed your mind or you just want to start over! The content in the text-box will revert back to original start-up values since you last published.</div></div><div class='fwHelpSect'><a href='javascript:void(0)' onClick='FW.showHelp(this.nextSibling);' class='fwPlusMinus'>+</a><a href='javascript:void(0);' onClick='FW.showHelp(this);' class='fw'>Restore</a><div class='fw0'>Restore is the ultimate \"safety net\" and more powerful that Reset because it let's you go back to an earlier date & time. If you made a serious mistake, which you only realized after publishing, then restore is the solution. Before you consider using restore, please understand that you will lose the current working file as you will be reverting to an earlier time - so don't try this casually!<div align='center' style='margin:4px 0px 0px 0px;'><form>";if(helpType=="HTML"){var BackUpHTM=document.AspForm.BackUpHTM;htm+="<input type='button' value='Restore To:' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' onClick='return FW.restore( \"RestoreHTM\" );' title='Restore this file to a prior selected time' />&nbsp;&nbsp;";htm+="<select onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title='Select a prior restore point' onChange='document.AspForm.BackUpHTM.selectedIndex=this.selectedIndex;'>";for(var i=0;i<BackUpHTM.length;i++)htm+="<option value='"+BackUpHTM[i].value+"'>"+BackUpHTM[i].text+"</option>";htm+="</select>";}
else if(helpType=="JavaScript"){var BackUpJS=document.AspForm.BackUpJS;htm+="<input type='button' value='Restore To:' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' onClick='return FW.restore( \"RestoreJS\" );' title='Restore this file to a prior selected time' />&nbsp;&nbsp;";htm+="<select onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title='Select a prior restore point' onChange='document.AspForm.BackUpJS.selectedIndex=this.selectedIndex;'>";for(var i=0;i<BackUpJS.length;i++)htm+="<option value='"+BackUpJS[i].value+"'>"+BackUpJS[i].text+"</option>";htm+="</select>";}
else{var BackUpXML=document.AspForm.BackUpXML;htm+="<input type='button' value='Restore To:' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' onClick='return FW.restore( \"RestoreXML\" );' title='Restore this file to a prior selected time' />&nbsp;&nbsp;";htm+="<select onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title='Select a prior restore point' onChange='document.AspForm.BackUpXML.selectedIndex=this.selectedIndex;'>";for(var i=0;i<BackUpXML.length;i++)htm+="<option value='"+BackUpXML[i].value+"'>"+BackUpXML[i].text+"</option>";htm+="</select>";}
htm+="</form></div><ol style='margin-top:4px; margin-bottom:4px;'><li style='margin-left:-10px;'>Select a restore date. They will be listed & numbered with the most recent at the top.</li><li style='margin-left:-10px;'>If you don't know which date to select then try the immediate prior backup. It will be already selected for you (#1 at the top). Press Restore to revert to the selected date & time. If that doesn't help try #2, #3 and so on...</li><li style='margin-left:-10px;'>After restoring, if it appears the problem is not resolved, try a reload first before doing another restore.</li></ol></div></div><div class='fwHelpSect'><a href='javascript:void(0)' onClick='FW.showHelp(this.nextSibling);' class='fwPlusMinus'>+</a><a href='javascript:void(0);' onClick='FW.showHelp(this);' class='fw'>About "+helpType+"</a><div class='fw0'>";if(helpType=="HTML")htm+="<ol style='margin-top:4px; margin-bottom:4px;'><li style='margin-left:-10px;'>HTML (<b>H</b>yper <b>T</b>ext <b>M</b>arkup <b>L</b>anguage) is a web formating language: <a href='javascript:PopUp.openWin( \"http://en.wikipedia.org/wiki/Html\", 1 );' class='fw'>Learn more</a></li><li style='margin-left:-10px;'>Need help with your HTML skills? Try <a href='javascript:PopUp.openWin( \"http://www.w3schools.com/html/html_primary.asp\", 1 );' class='fw'>W3schools.com</a></li></ol>";else if(helpType=="JavaScript")htm+="JavaScript is a popular web programming language: <a href='javascript:PopUp.openWin( \"http://en.wikipedia.org/wiki/JavaScript\", 1 );' class='fw'>Learn more</a>";else
htm+="XML (e<b>X</b>tensible <b>M</b>arkup <b>L</b>anguage) is a web data-base language: <a href='javascript:PopUp.openWin( \"http://en.wikipedia.org/wiki/Xml\", 1 );' class='fw'>Learn more</a>";htm+="</div></div>";return htm;}
var DataSrc;switch(nType){case 1:DataSrc=["Publishing HTML",getHelpTxt("HTML")];break;case 2:DataSrc=["Publishing JavaScript",getHelpTxt("JavaScript")];break;case 3:DataSrc=["Publishing XML",getHelpTxt("XML")];break;}
if(window.DW)DW.createWindow(DataSrc,[1,600,300],Link,evt,6,[2,0,-15]);}
function restore(aspJob){var Form=document.AspForm;if(aspJob=="RestoreHTM"&&Form.BackUpHTM&&Form.BackUpHTM[Form.BackUpHTM.selectedIndex].value==""||aspJob=="RestoreJS"&&Form.BackUpJS&&Form.BackUpJS[Form.BackUpJS.selectedIndex].value==""||aspJob=="RestoreXML"&&Form.BackUpXML&&Form.BackUpXML[Form.BackUpXML.selectedIndex].value==""){alert("No action taken: There are no restore dates...");return false;}
Form.ASP_Job.value=aspJob;Form.submit();}
function insertTags(tagOpen,tagClose,TextBoxID){var editHTML=(TextBoxID=="EditedHTML");var editDATA=!editHTML;if(this.cursorReadyHtm&&editHTML||this.cursorReadyJS&&editDATA){var TextArea=document.getElementById(TextBoxID);if(IE){var theSelection=document.selection.createRange().text;TextArea.focus();if(theSelection.charAt(theSelection.length-1)==" "){theSelection=theSelection.substring(0,theSelection.length-1);document.selection.createRange().text=tagOpen+theSelection+tagClose+" ";}
else
document.selection.createRange().text=tagOpen+theSelection+tagClose;}
else{var replaced=false;var startPos=TextArea.selectionStart;var endPos=TextArea.selectionEnd;if(endPos-startPos)replaced=true;var scrollTop=TextArea.scrollTop;var myText=(TextArea.value).substring(startPos,endPos);if(myText.charAt(myText.length-1)==" ")subst=tagOpen+myText.substring(0,(myText.length-1))+tagClose+" ";else
subst=tagOpen+myText+tagClose;TextArea.value=TextArea.value.substring(0,startPos)+subst+TextArea.value.substring(endPos,TextArea.value.length);TextArea.focus();if(replaced){var cPos=startPos+(tagOpen.length+myText.length+tagClose.length);TextArea.selectionStart=cPos;TextArea.selectionEnd=cPos;}
else{TextArea.selectionStart=startPos+tagOpen.length;TextArea.selectionEnd=startPos+tagOpen.length+myText.length;}
TextArea.scrollTop=scrollTop;}
if(TextArea.createTextRange)TextArea.caretPos=document.selection.createRange().duplicate();}
else{if(tagOpen=="<br>")alert("To insert a line break you must place your cursor at the location you would like to add it.");else{if(editHTML)alert("To insert HTML formatting tags you must first highlight the text you would like formatted.");else{if(tagOpen=="\\\"")alert("To insert double quotes you must first highlight the text you would like quoted.");else
alert("To auto-insert you must place your cursor at the location you would like to add it.");}}}}
function init(){var help="About Caching, Reload, Publish, Reset & Restore";var justPub="Refresh page to override cached (old) version";try{var EditContainerHTM=document.getElementById("EditContainerHTM");if(EditContainerHTM&&EditContainerHTM.className=="on"){document.getElementById("htmTitle").innerHTML="HTML CONTENT FOR THIS PAGE<br>"+this.HtmButtons+this.HtmNotes;var EditedHTML=document.getElementById("EditedHTML");EditedHTML.onfocus=function(){this.title="Edit text then press \"Publish HTML\"";self.status=this.title;FW.cursorReadyHtm=true;}
EditedHTML.onblur=function(){self.status="";}
var HelpHTM=document.getElementById("HelpHTM");HelpHTM.onmouseover=function(){this.title=help;self.status=this.title;}
HelpHTM.onmouseout=function(){self.status="";}
var ReloadHTM=document.getElementById("ReloadHTM");ReloadHTM.onmouseover=function(){this.title=justPub;self.status=this.title;}
ReloadHTM.onmouseout=function(){self.status="";}
ReloadHTM.onclick=function(){FW.reLoad("EditedHTML");}
var PublishHTM=document.getElementById("PublishHTM");PublishHTM.onmouseover=function(){this.title="Write HTML to file";self.status=this.title;}
PublishHTM.onmouseout=function(){self.status="";}
PublishHTM.onclick=function(){return FW.checkContent(1,1);}
PublishHTM.oncontextmenu=function(){return FW.checkContent(1,0);}
var ResetHTM=document.getElementById("ResetHTM");ResetHTM.onmouseover=function(){this.title="Revert HTML back to original values since you last published";self.status=this.title;}
ResetHTM.onmouseout=function(){self.status="";}
ResetHTM.onclick=function(){FW.resetUI("EditedHTML");}}
var EditContainerJS=document.getElementById("EditContainerJS");if(EditContainerJS&&EditContainerJS.className=="on"){document.getElementById("dataTitleJS").innerHTML="JAVASCRIPT DATA<br>TIP: Need to use a double quote within a text string? Then \\\"<a href='javascript:void(0);' onClick='FW.insertTags( \"\\\\\\\"\", \"\\\\\\\"\", \"EditedJS\" ); return false;' title='Inserts double quotes around highlighted data text' class='fw'>escape</a>\\\" it."+((this.JsButtons)?"<br>"+this.JsButtons:"")+this.JsNotes;var EditedJS=document.getElementById("EditedJS");EditedJS.onfocus=function(){this.title="Edit data then press \"Publish JavaScript\"";self.status=this.title;FW.cursorReadyJS=true;}
EditedJS.onblur=function(){self.status="";}
var HelpJS=document.getElementById("HelpJS");HelpJS.onmouseover=function(){this.title=help;self.status=this.title;}
HelpJS.onmouseout=function(){self.status="";}
var ReloadJS=document.getElementById("ReloadJS");ReloadJS.onmouseover=function(){this.title=justPub;self.status=this.title;}
ReloadJS.onmouseout=function(){self.status="";}
ReloadJS.onclick=function(){FW.reLoad("EditedJS");}
var PublishJS=document.getElementById("PublishJS");PublishJS.onmouseover=function(){this.title="Write JavaScript to file";self.status=this.title;}
PublishJS.onmouseout=function(){self.status="";}
PublishJS.onclick=function(){return FW.checkContent(2,1);}
PublishJS.oncontextmenu=function(){return FW.checkContent(2,0);}
var ResetJS=document.getElementById("ResetJS");ResetJS.onmouseover=function(){this.title="Revert JavaScript back to original values since you last published";self.status=this.title;}
ResetJS.onmouseout=function(){self.status="";}
ResetJS.onclick=function(){FW.resetUI("EditedJS");}}
var EditContainerXML=document.getElementById("EditContainerXML");if(EditContainerXML&&EditContainerXML.className=="on"){document.getElementById("dataTitleXML").innerHTML="GLOBAL XML DATA"+this.XmlNotes;var EditedXML=document.getElementById("EditedXML");EditedXML.onfocus=function(){this.title="Edit data then press \"Publish XML\"";self.status=this.title;}
EditedXML.onblur=function(){self.status="";}
var HelpXML=document.getElementById("HelpXML");HelpXML.onmouseover=function(){this.title=help;self.status=this.title;}
HelpXML.onmouseout=function(){self.status="";}
var ReloadXML=document.getElementById("ReloadXML");ReloadXML.onmouseover=function(){this.title=justPub;self.status=this.title;}
ReloadXML.onmouseout=function(){self.status="";}
ReloadXML.onclick=function(){FW.reLoad("EditedXML");}
var PublishXML=document.getElementById("PublishXML");PublishXML.onmouseover=function(){this.title="Write XML to file";self.status=this.title;}
PublishXML.onmouseout=function(){self.status="";}
PublishXML.onclick=function(){return FW.checkContent(3,1);}
PublishXML.oncontextmenu=function(){return FW.checkContent(3,0);}
var ResetXML=document.getElementById("ResetXML");ResetXML.onmouseover=function(){this.title="Revert XML back to original values since you last published";self.status=this.title;}
ResetXML.onmouseout=function(){self.status="";}
ResetXML.onclick=function(){FW.resetUI("EditedXML");}}
var htm="<div class='otherFunctions'><a href='javascript:FW.logOff();' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title='Log off as administrator' class='fw'>Log Off</a>&nbsp;&#149;&nbsp;<a href='javascript:PopUp.openWin( \"uploader.aspx\", 0, 0, 1, 0, 650, 300, 1, 1, 2 );' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title='Upload files to the server' class='fw'>Upload</a>";htm+=this.AdminLinks;htm+="</div>";document.getElementById("fwBottomRow").innerHTML=htm;var nTicks_Jan_1_1970=621355968000000000;var offsetMS=this.serverTimeZoneOffsetHours*60*60*1000;var BackUpHTM=document.getElementById("BackUpHTM");if(BackUpHTM&&BackUpHTM[0].value){for(var i=0;i<BackUpHTM.length;i++){var Option=BackUpHTM[i];var ms=(parseInt(Option.text)-nTicks_Jan_1_1970)/10000;Option.text=new Date(ms+offsetMS).toLocaleString();}}
var BackUpJS=document.getElementById("BackUpJS");if(BackUpJS&&BackUpJS[0].value){for(var i=0;i<BackUpJS.length;i++){var Option=BackUpJS[i];var ms=(parseInt(Option.text)-nTicks_Jan_1_1970)/10000;Option.text=new Date(ms+offsetMS).toLocaleString();}}
var BackUpXML=document.getElementById("BackUpXML");if(BackUpXML&&BackUpXML[0].value){for(var i=0;i<BackUpXML.length;i++){var Option=BackUpXML[i];var ms=(parseInt(Option.text)-nTicks_Jan_1_1970)/10000;Option.text=new Date(ms+offsetMS).toLocaleString();}}
self.status="";}
catch(Err){if(local){var err="";for(member in Err)err+=member+": "+Err[member]+"\n";alert("Exception at method FW.init:\n\n"+err);}
else{setTimeout("FW.init();",250);self.status="Initializing File Writer: FW.init()...";}}}
function checkContent(formType,leftClick){var Form=document.AspForm;var EditedHTML=Form.EditedHTML;var EditedJS=Form.EditedJS;var EditedXML=Form.EditedXML;if(formType==1){EditedHTML.value=EditedHTML.value.trim();if(leftClick&&EditedHTML.value==EditedHTML.defaultValue){alert("Edit the text then press Publish HTML...");EditedHTML.focus();FW.cursorReadyHtm=false;return false;}
else{document.getElementById("PublishHTM").disabled=true;Form.Which_Button.value="html";}}
else if(formType==2){EditedJS.value=EditedJS.value.trim();if(leftClick&&EditedJS.value==EditedJS.defaultValue){alert("Edit the data then press Publish JavaScript...");EditedJS.focus();FW.cursorReadyJS=false;return false;}
else{try{eval(EditedJS.value);}
catch(Err){var err="";for(member in Err)err+=member+": "+Err[member]+"\n";alert("Sorry, you have mistakenly broken JavaScript's rigid syntax. As a result, the file cannot be saved to disk. Fix the error & try again or click \"Reset\"...\n\n"+err);return false;}
document.getElementById("PublishJS").disabled=true;Form.Which_Button.value="js";}}
else{EditedXML.value=EditedXML.value.trim();if(leftClick){if(EditedXML.value==EditedXML.defaultValue){alert("Edit the text then press Publish XML...");EditedXML.focus();return false;}
else{var textOrig=EditedXML.defaultValue;var textNew=EditedXML.value;var xmlOrig=textOrig.replace(/>[^<>]*</g, "><" );
var nLinesOrig=textOrig.split("\n").length;var xmlNew=textNew.replace(/>[^<>]*</g, "><" );
var nLinesNew=textNew.split("\n").length;if(xmlOrig==xmlNew&&nLinesOrig==nLinesNew){var xml=EditedXML.value;xml=xml.replace(/&amp;/g, "a_m_p_e_r_s_a_n_d" );
xml=xml.replace(/\\\"/g, "q_u_o_t_e" );
xml=xml.replace(/&/g, "&amp;" );
xml=xml.replace(/\"/g, "\\\"" );
xml=xml.replace(/q_u_o_t_e/g, "\\\"" );
xml=xml.replace(/a_m_p_e_r_s_a_n_d/g, "&amp;" );
EditedXML.value=xml;document.getElementById("PublishXML").disabled=true;Form.Which_Button.value="xml";}
else{var err=", as a result, the file cannot be saved to disk. Please edit the data only then press Publish XML.\n\n==> Fix the error & try again or click \"Reset\"";if(nLinesOrig!=nLinesNew)alert("ERROR: You have added or removed lines"+err);else
alert("ERROR: You have edited XML tag(s)"+err);EditedXML.focus();return false;}}}
else{document.getElementById("PublishXML").disabled=true;Form.Which_Button.value="xml";}}
Form.ASP_Job.value="File_Writer";Form.submit();return(leftClick)?true:false;}
function resetUI(TextBox){if(TextBox=="EditedHTML")this.cursorReadyHtm=false;else if(TextBox=="EditedJS")this.cursorReadyJS=false;eval("document.AspForm."+TextBox+".value = document.AspForm."+TextBox+".defaultValue;");}
function reLoad(TextBox){if(eval("document.AspForm."+TextBox+".value")==eval("document.AspForm."+TextBox+".defaultValue"))document.location.reload(true);else if(confirm("You have made edits that you have not published. Click OK to reload the page & clear all non-published edits."))document.location.reload(true);}
function logOff(){var qStrOut=(qStr)?qStr+"&logoff=yes":"logoff=yes";document.location.replace(fileName+"?"+qStrOut);}}
function DynamicIndex(setEvtHandlers){this.msg=new Array();this.msg.show="Click to show answer";this.msg.hide="Click to hide answer";this.getPlusMinus=getPlusMinus;this.reset=reset;this.switchDisplay=switchDisplay;this.showTip=showTip;this.maintainState=maintainState;this.setEventHandlers=setEventHandlers;if(setEvtHandlers)this.setEventHandlers();function setEventHandlers(){try{var AllLinks=document.getElementsByTagName("a");for(var i=0;i<AllLinks.length;i++){if(AllLinks[i].className=="diHeading"){AllLinks[i].onclick=function(){if(window.DI)DI.switchDisplay(this);}
AllLinks[i].onmouseover=function(){if(window.DI)DI.showTip(this);return true;}}
if(AllLinks[i].className=="diPlusMinus"){AllLinks[i].onclick=function(){if(window.DI)DI.switchDisplay(this.nextSibling);}
AllLinks[i].onmouseover=function(){if(window.DI)DI.showTip(this.nextSibling);return true;}}}
self.status="";}
catch(Err){self.status="Initializing DI.setEventHandlers() method, one moment please...";setTimeout("DI.setEventHandlers();",250);}}
function maintainState(){try{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){};}}}}
self.status="";}
catch(Err){self.status="Initializing DI.maintainState() method, one moment please...";setTimeout("DI.maintainState();",250);}}
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;PlusMinus.title=(msgOn)?msgOn:DI.msg.show;}
else{Link.title=(msgOff)?msgOff:DI.msg.hide;PlusMinus.title=(msgOff)?msgOff:DI.msg.hide;}}}