//' Software by DavidRegier.com. Unauthorized use of this code is prohibited
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="default.aspx"
path=document.location.pathname;delimeter=(path.indexOf("\\")>=0)?"\\":"/";if(path.charAt(path.length-1)==delimeter)path+=homePage;Path=path.split(delimeter);fileName=Path[Path.length-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"){eMailOut="";eMailIn=DB.Contact.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.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;}
InstructionsHomePage="This HTML text box contains your homepage slide-show data and you are free to add/remove and or move their positions, with the exception of the first one called \"ssHome_ma_0001.jpg\". Slide show plays from top down in a loop and ALL these images must be sized to exactly 420 x 280 pixels - the border is part of the image. Makana Akua and the text is part of the image file \"homePageBkg.jpg\". If you need to change this text you will need to create a new \"homePageBkg.jpg\" with your new or edited text embedded onto it.<ol style='margin-top:4px; margin-bottom:4px;'><li>Right-click a photo to get image-properties & pause the slide-show.</li><li><a href='javascript:PopUp.openWin( \"uploader.aspx\", 650, 350, 2, 0, 0, 0, 0, 0, 0 );' title='Upload files to the server' class='fw'>Click here</a> to upload new photos.</li><li>Hold Shift & click photo to pause it, repeat this action to re-start it.</li><li>Hold Ctrl & click photo to run it at hi-speed, repeat this action to revert to normal speed. This is useful for quickly checking that it's working correctly.</li></ol>";function PreLoader(){this.Files=["images/header.jpg","about.aspx","images/ma_4124TN.jpg","images/ma_4001TN.jpg","images/ma_4016TN.jpg","images/ma_4082TN.jpg","ss.aspx?db=images-main.js","images.js","images/ma_3019.jpg","rates.aspx","images/ma_4148TN.jpg","images/ma_4041TN.jpg","images/ma_3019TN.jpg","images/ma_4062TN.jpg","calendar.aspx","cal-data.js","calendar.js","printer-friendly.css","default.aspx","images/homePageBkg.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;if(this.debug)top.document.title="File preloader started...";function run(){if(window.XMLHttpRequest){try{this.Request=new XMLHttpRequest();}
catch(Err){this.Request=null;}}
else if(window.ActiveXObject){try{this.Request=new ActiveXObject("Msxml2.XMLHTTP");}
catch(Err){try{this.Request=new ActiveXObject("Microsoft.XMLHTTP");}
catch(Err){this.Request=null;}}}
clearTimeout(PL.timer);if(this.Request){if(this.nFilesCached<this.Files.length-1){this.Request.onreadystatechange=function(){try{if(PL.Request.readyState==4){if(PL.Request.status==200){if(PL.debug)top.document.title=PL.Files[PL.nFilesCached]+" preloaded; #"+((PL.nFilesCached+1)+" of "+(PL.Files.length-1));}
else{if(PL.debug)alert("File preloader encountered an error retrieving: \n "+PL.Files[PL.nFilesCached]+"\n Status: "+PL.Request.status+"\n StatusText: "+PL.Request.statusText+"\n Number "+((PL.nFilesCached+1)+" of "+(PL.Files.length-1)));}
PL.nFilesCached++;SetCookie("nFilesCached",PL.nFilesCached);PL.timer=setTimeout("if( window.PL ) PL.run();",100);}}
catch(Err){var eMsg="Exception at PL.run()\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";try{if(PL.debug)alert(eMsg);} catch(Err){self.status=eMsg.replace(/\n/g," ");}}}
this.Request.open("GET",this.Files[this.nFilesCached],true);this.Request.send(null);}}
else if(PL.debug)top.document.title="Browser does not support the HttpRequest Request Protocol";}}
PL=new PreLoader();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;var Msg=new Array();Msg.about="Learn more about the home & area";Msg.cal="Check our booking calendar for availability";Msg.contact="Contact us via phone, e-mail or mail";Msg.home="Back to our homepage";Msg.links="Links to other related web sites";Msg.rates="Get our Rental rates";Msg.SS="View photos via our automated slide-show";Msg.enlarge="Click to enlarge";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="-moz-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.MozOpacity=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.MozOpacity=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(widDB>0&&hgtDB>0){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 getCookieDomain(){var cookieDomain=null;if(live&&theHost){var Host=theHost.split("."),hLen=Host.length;if(hLen>=2)cookieDomain="."+Host[hLen-2]+"."+Host[hLen-1];}
return cookieDomain;}
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){var path="/",domain=getCookieDomain(),secure=null;document.cookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");}
function DeleteCookie(name){var path="/",domain=getCookieDomain();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 activateLink(Img,on){try{Img.src=(on)?eval(Img.id+"On.src"):eval(Img.id+"Off.src");}
catch(Err){}}
function PopUp(){this.winName="hbhWin";this.Win=null;this.openWin=openWin;this.printerFriendly=printerFriendly;this.closeWin=closeWin;this.linkToWin=linkToWin;function openWin(url,wWid,wHgt,wPos,tBar,lBar,sBar,mBar,scBar,reSize){this.closeWin();if(typeof wWid=="undefined")wWid=.8;if(typeof wHgt=="undefined")wHgt=.6;if(typeof wPos=="undefined")wPos=1;if(typeof tBar=="undefined")tBar=1;if(typeof lBar=="undefined")lBar=1;if(typeof sBar=="undefined")sBar=1;if(typeof mBar=="undefined")mBar=1;if(typeof scBar=="undefined")scBar=1;if(typeof reSize=="undefined")reSize=1;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);}
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( 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 DynamicIndex(setEvtHandlers){this.msg=new Array();this.msg.show="Click to show content";this.msg.hide="Click to hide content";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)?"tnOn":"tn";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;}}}
function getEmailLink(subject){if(subject)subject="?subject="+escape(subject);return "<a href='mailto:"+DB.Contact.Email+subject+"' title='Send us an e-mail' class='dwLink'>"+DB.Contact.Email+"</a>";}
function showHawaiiTime(){var gmtOffset=10;var now=new Date();var difhrs=now.getTimezoneOffset()/60;var lochrs=now.getHours();GMThours=lochrs+difhrs;now.setHours(GMThours-gmtOffset);var am_pm="AM";var hours=now.getHours();if(hours>=12)am_pm="PM";if(hours>=13)hours-=12;if(hours==0)hours="12";var minutes=now.getMinutes();if(minutes<10)minutes="0"+minutes;var seconds=now.getSeconds();if(seconds<10)seconds="0"+seconds;try{document.getElementById("hawaii_time").innerHTML=hours+":"+minutes+":"+seconds+" "+am_pm;}
catch(Err){}
finally{setTimeout("showHawaiiTime()",1000);}}
function 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){var htm="<div><table align='center' border='0' cellspacing='0' cellpadding='0' class='contactUs'><tr><td valign='top' align='right'><div style='margin:0px 0px 0px 0px;' class='noWrap'>Name:</div></td><td valign='top'><div style='margin:0px 0px 0px 6px;'>"+DB.Contact.Name+"</div></td></tr><tr><td valign='top' align='right'><div style='margin:4px 0px 0px 0px;' class='noWrap'>Mail:</div></td><td><div style='margin:4px 0px 0px 6px;'>"+DB.Contact.Address1+"<br>"+DB.Contact.Address2+"</div></td></tr><tr><td valign='top' align='right'><div style='margin:4px 0px 0px 0px;' class='noWrap'>Primary Tel:</div></td><td><div style='margin:4px 0px 0px 6px;'>"+DB.Contact.PhonePrimary+"</div></td></tr>";if(DB.Contact.PhoneOther)htm+="<tr><td valign='top' align='right'><div style='margin:4px 0px 0px 0px;' class='noWrap'>Other Tel:</div></td><td><div style='margin:4px 0px 0px 6px;'>"+DB.Contact.PhoneOther+"</div></td></tr>";htm+="<tr><td align='right'><div style='margin:4px 0px 0px 0px;' class='noWrap'>Hawaii Time:</div></td><td><div style='margin:4px 0px 0px 6px;'><span id='hawaii_time'></span></div></td></tr><tr><td align='right'><div style='margin:4px 0px 0px 0px;' class='noWrap'>Send E-Mail:</div></td><td><div style='margin:4px 0px 0px 6px;'>"+getEmailLink("Makana Akua Web Site Inquiry")+"</div></td></tr></table></div>";this.ContactUs=["Contact Us",htm];this.dissolveMZ=1;this.dissolveSF=1;this.gDisableContextImgMenu=0;this.Msg=new Array();this.Msg.fullSize="View this image full-size";this.maxDissolve=800*500;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.IeBody=null;this.createWindow=createWindow;this.showImg=showImg;this.keepInWin=keepInWin;this.getClickPosition=getClickPosition;this.getData=getData;this.mouseDown=mouseDown;this.mouseMove=mouseMove;this.removeWin=removeWin;this.mouseUp=mouseUp;document.onmousedown=this.mouseDown;document.onmousemove=this.mouseMove;document.onmouseup=this.mouseUp;function createWindow(dataSrc,WinDim,TheLink,theEvent,bodyMargin,RequestedPos,disableContextImgMenu){this.IeBody=(IE&&document.compatMode=="CSS1Compat")?document.documentElement:document.body;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&&(winWid*winHgt<=this.maxDissolve));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&&document.compatMode!="CSS1Compat")?(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=0,yPos=0;if(clickPos||aboveClkPos){var ClickPos=this.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 scrollX,scrollY,bodyWid,bodyHgt;if(IE){scrollX=this.IeBody.scrollLeft;scrollY=this.IeBody.scrollTop;bodyWid=this.IeBody.clientWidth;bodyHgt=this.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);}
else{var Component=document.getElementById(RequestedPos[3]);var CurComponent=Component;var parPosAbs=false;while(CurComponent){if(SF){if(!parPosAbs)parPosAbs=(CurComponent.style.position=="absolute");if(parPosAbs&&CurComponent==Body)break;}
yPos+=CurComponent.offsetTop;xPos+=CurComponent.offsetLeft;CurComponent=CurComponent.offsetParent;}
switch(RequestedPos[0]){case 10:xPos+=xOffset;yPos-=NewWindow.offsetHeight-yOffset;break;case 11:xPos+=Component.offsetWidth+xOffset;yPos-=NewWindow.offsetHeight-yOffset;break;case 12:xPos+=Component.offsetWidth+xOffset;yPos+=yOffset;break;case 13:xPos+=Component.offsetWidth+xOffset;yPos+=Component.offsetHeight+yOffset;break;case 14:xPos+=xOffset;yPos+=Component.offsetHeight+yOffset;break;case 15:xPos+=Component.offsetWidth+xOffset-NewWindow.offsetWidth;yPos+=Component.offsetHeight+yOffset;break;case 16:xPos+=xOffset-NewWindow.offsetWidth;yPos+=Component.offsetHeight+yOffset;break;case 17:xPos+=xOffset-NewWindow.offsetWidth;yPos+=yOffset;break;default:alert("Switch/Case Error at DW.createWindow: RequestedPos[ 0 ] has a value of "+RequestedPos[0]+" which is invalid.");}}
var NewWindowPos=this.keepInWin(NewWindow,xPos,yPos);xPos=Math.round(NewWindowPos[0]);yPos=Math.round(NewWindowPos[1]);NewWindow.style.left=xPos+"px";NewWindow.style.top=yPos+"px";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&&(Photo.width*Photo.height<=this.maxDissolve));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){var bodyHgt=(IE)?this.IeBody.clientHeight:window.innerHeight;var bodyWid=(IE)?this.IeBody.clientWidth:window.innerWidth;var winHgt=NewWindow.offsetHeight;var yOffset=(IE)?this.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)?this.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 getClickPosition(theEvent){try{if(IE){var x=event.clientX+this.IeBody.scrollLeft;var y=event.clientY+this.IeBody.scrollTop;}
else{var x=theEvent.pageX;var y=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=DW.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+DW.IeBody.scrollLeft)+"px";this.Window.style.top=(event.clientY-this.dWinOffsetY+DW.IeBody.scrollTop)+"px";return false;}
else{this.Window.style.top=(e.pageY-this.dWinOffsetY)+"px";this.Window.style.left=(e.pageX-this.dWinOffsetX)+"px";}}}
function removeWin(){var Window=document.getElementById("dWinID");if(Window)document.body.removeChild(Window);}
function mouseUp(){this.Window=null;}}
function FileWriter(){var serverTimeZoneOffsetLive=7;this.HtmNotes="A couple tips to remember...<ol><li>Just Published but don't see your changes? Then press Reload</li><li>Completely hosed a page? Go to Help >> Restore</li></ol>";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>";if(qStr&&qStr.getVal("db")){this.JsNotes="The Images Array below controls the photos that show on your Slide-Show & Thumbnail pages. Ideally, your large image (ex: beach.jpg) should have a height of 500 pixels while it's thumbnail (beachTN.jpg) must be 100&times;100 pixels square. Read these <a href='javascript:PopUp.openWin( \"http://www.davidregier.com/webdesign/other/images.html?ss=sstn&tnEdge=100\" );' class='fw' title='Preparing images for the Slide-Show/Thumbnails pages'>detailed instructions</a> on preparing images for the slide-show/thumbnail pages.<ol><li>Right-click a thumbnail to read properties for the large image.</li><li>To add a new photo you will first prepare & <a href='javascript:PopUp.openWin( \"uploader.aspx\", 650, 350, 2, 0, 0, 0, 0, 0, 0 );' title='Upload files to the server' class='fw'>upload</a> the large image with thumbnail per the instructions above.</li><li>Then enter a new blank line at the position you would like your new photo to appear.</li><li>With your cursor at the beginning of the new line, click the \"Add New Data Structure\" button. A blank data structure is auto-inserted.</li><li>Fill out the photo information. From left to right it is: (1) Photo Filename, within double quotes. (2) Photo width in pixels. (3) Photo height in pixels. (4) Description, if none, leave blank (empty double quotes).</li><li>On rare occasions, you may need to use double quotes w/i the Description (4th field). If so, you must first \"escape the text\" you are quoting. Here's how: (1) Highlight the text you would like quoted. (2) Click Escape.</li></ol>";this.JsButtons="<button onClick='FW.insertTags( \"[\\\"\\\",,, \\\"\\\"],\", \"\", \"EditedJS\" ); return false;' title='Insert new blank data structure at cursor position' class='htmlTags'>Add New Data Structure</button> &nbsp;";this.JsButtons+="<button onClick='FW.insertTags( \"\\\\\\\"\", \"\\\\\\\"\", \"EditedJS\" ); return false;' title='Surrounds text you have highlighted with double quotes' class='htmlTags'>\\\"Escape\\\"</button>";}
else{this.JsNotes="";this.JsButtons="";}
this.XmlNotes="<div class='underline'>Here's why you may need to edit this XML data:</div><ol><li>Change contact information like Name, Address, Phone, etc.</li><li>To change Administrator Names, E-mails, Passwords & Editing Privileges<ol class='fSize10' type='a'><li>Set it to yes to allow administrator to edit that particular data type</li><li>Set it to no to prohibit administrator from editing that particular data type</li></ol></li><li>To add new administrators. There are several blank administrator records for you. Anytime you need to add a new administrator just fill one out & publish, here's some tips:<ol class='fSize10' type='a'><li><b>Important</b>: As an anti-spam measure, our server requires that all administrators who subscribe to calendar-updates use an &ldquo;@TunnelsBeach.com&rdquo; e-mail address. This requires that a forward be set up on the server for every administrator. Scroll to the bottom of the XML data for instructions on setting up new forwards.</li><li>Give each new administrator a completely new & unique password.</li><li>By setting the editing-privileges (for each of the data types) to &ldquo;no&rdquo;, the new administrator can only edit the calendar. They will not see the HTML, JavaScript or XML text boxes.</li><li>Set subscribe-to-calendar-updates to &ldquo;yes&rdquo; to receive an e-mail update whenever the calendar is published.</li><li>Set subscribe-to-send-mail-list to &ldquo;yes&rdquo; to be included in the read-all pop-up window email list.</li></ol></li><li>To change calendar read-all password.</li><li>To change e-mail address where website generated error messages (if any) are delivered.</li></ol>";this.AdminLinks=" &#149; <a href='javascript:PopUp.openWin( \"http://www.davidregier.com/webdesign/other/images.html?ss=ss\" );' class='fw' title='How to add images to the Slide-Show'>Slide-Show Help</a>";this.serverTimeZoneOffset=(live)?serverTimeZoneOffsetLive:10;this.forceLogin=forceLogin;this.forceLogin();this.getLogInGUI=getLogInGUI;this.logIn=logIn;if(!GetCookie("userWithWritePrivileges"))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 nTicks_Jan_1_1970=621355968000000000;var ms=(LastAdministrator[1]-nTicks_Jan_1_1970)/10000;var loggedIn=new Date(ms+this.serverTimeZoneOffset*60*60*1000).toLocaleString();var sub="Are you logged onto "+theHost+" right now?";sub=(SF)?sub:escape(sub);var body="\r\n\r\n"+lastAdminFull+", 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").replace(/_/g," ")+". "+lastAdminFull+" logged in on "+loggedIn+". "+lastAdminFull+" 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 not allowed. With that in mind, you can:<ol style='margin-top:6px; margin-bottom:6px;'><li style='margin-bottom:2px;'>Wait until "+lastAdminFull+" logs out.</li><li style='margin-bottom:2px;'>Email "+lastAdminFull+" at <a href='mailto:"+DB.Administrators[lastAdminFull]+"?subject="+sub+"&body="+body+"' title='Send e-mail asking if this person is logged-in' class='dwLink'>"+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' class='dwLink'>Load the calendar</a> with read-all access, because you only need to get info not edit it...</li>":"")+"<li><a href='"+document.location.href+"' onClick='SetCookie( \"forcedLogin\", \"yes\" ); return true;' title='Logs you in & forces out other active administrator (if any)' class='dwLink'>Force Log-In</a> now because you know that "+lastAdminFull+" failed to log-out last time and is NOT actively logged-in. Note that you will terminate "+lastAdminFull+"'s session if logged-in right now.</li></ol></div>";DW.createWindow(["Concurrent Administrator Conflict",htm],[0,540,0],null,null,6,[4,0,0]);}}
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='dwLink'>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>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='dwLink'>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='dwLink'>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='dwLink'>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 mistake, which you only realized after publishing, then try restore. 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:' onClick='return FW.restore( \"RestoreHTM\" );' title='Restore this file to a prior selected time' />&nbsp;&nbsp;";htm+="<select id='BackUpHTM_PopUp' title='Select a prior restore point'>";for(var i=0;i<BackUpHTM.length;i++)htm+="<option value='"+BackUpHTM[i].value+"'>"+(i+1)+". "+BackUpHTM[i].text+"</option>";htm+="</select>";}
else if(helpType=="JavaScript"){var BackUpJS=document.AspForm.BackUpJS;htm+="<input type='button' value='Restore To:' onClick='return FW.restore( \"RestoreJS\" );' title='Restore this file to a prior selected time' />&nbsp;&nbsp;";htm+="<select id='BackUpJS_PopUp' title='Select a prior restore point'>";for(var i=0;i<BackUpJS.length;i++)htm+="<option value='"+BackUpJS[i].value+"'>"+(i+1)+". "+BackUpJS[i].text+"</option>";htm+="</select>";}
else{var BackUpXML=document.AspForm.BackUpXML;htm+="<input type='button' value='Restore To:' onClick='return FW.restore( \"RestoreXML\" );' title='Restore this file to a prior selected time' />&nbsp;&nbsp;";htm+="<select id='BackUpXML_PopUp' title='Select a prior restore point'>";for(var i=0;i<BackUpXML.length;i++)htm+="<option value='"+BackUpXML[i].value+"'>"+(i+1)+". "+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, try the immediate prior backup. It will be #1 and selected for you by default. \"Restore 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, first press reload 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='dwLink'>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\" );' class='dwLink'>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\" );' class='dwLink'>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\" );' class='dwLink'>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\" );' class='dwLink'>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;}
switch(aspJob){case "RestoreHTM":Form.BackUpHTM.selectedIndex=document.getElementById("BackUpHTM_PopUp").selectedIndex;break;case "RestoreJS":Form.BackUpJS.selectedIndex=document.getElementById("BackUpJS_PopUp").selectedIndex;break;case "RestoreXML":Form.BackUpXML.selectedIndex=document.getElementById("BackUpXML_PopUp").selectedIndex;break;default:alert("Switch/Case Error at FW.restore");}
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(!tagClose)alert("To auto-insert you must place your cursor at the location where you are inserting into.");else
alert("To auto-insert you must first highlight the text you would like formatted.");}}
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"){var HtmTitle=document.getElementById("HtmTitle");if(HtmTitle.innerHTML=="")HtmTitle.innerHTML="HTML CONTENT FOR THIS PAGE";var HtmNotes=document.getElementById("HtmNotes");if(HtmNotes.innerHTML=="")HtmNotes.innerHTML=this.HtmNotes;var HtmButtons=document.getElementById("HtmButtons");if(HtmButtons.innerHTML=="")HtmButtons.innerHTML=this.HtmButtons;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;}
var ReloadHTM=document.getElementById("ReloadHTM");ReloadHTM.onmouseover=function(){this.title=justPub;}
ReloadHTM.onclick=function(){FW.reLoad("EditedHTML");}
var PublishHTM=document.getElementById("PublishHTM");PublishHTM.onmouseover=function(){this.title="Write HTML to file";}
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";}
ResetHTM.onclick=function(){FW.resetUI("EditedHTML");}}
var EditContainerJS=document.getElementById("EditContainerJS");if(EditContainerJS&&EditContainerJS.className=="on"){var JsTitle=document.getElementById("JsTitle");if(JsTitle.innerHTML=="")JsTitle.innerHTML="JAVASCRIPT DATA";var JsNotes=document.getElementById("JsNotes");if(JsNotes.innerHTML=="")JsNotes.innerHTML=this.JsNotes;var JsButtons=document.getElementById("JsButtons");if(JsButtons.innerHTML=="")JsButtons.innerHTML=this.JsButtons;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;}
var ReloadJS=document.getElementById("ReloadJS");ReloadJS.onmouseover=function(){this.title=justPub;}
ReloadJS.onclick=function(){FW.reLoad("EditedJS");}
var PublishJS=document.getElementById("PublishJS");PublishJS.onmouseover=function(){this.title="Write JavaScript to file";}
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";}
ResetJS.onclick=function(){FW.resetUI("EditedJS");}}
var EditContainerXML=document.getElementById("EditContainerXML");if(EditContainerXML&&EditContainerXML.className=="on"){var XmlTitle=document.getElementById("XmlTitle");if(XmlTitle.innerHTML=="")XmlTitle.innerHTML="GLOBAL XML DATA";var XmlNotes=document.getElementById("XmlNotes");if(XmlNotes.innerHTML=="")XmlNotes.innerHTML=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;}
var ReloadXML=document.getElementById("ReloadXML");ReloadXML.onmouseover=function(){this.title=justPub;}
ReloadXML.onclick=function(){FW.reLoad("EditedXML");}
var PublishXML=document.getElementById("PublishXML");PublishXML.onmouseover=function(){this.title="Write XML to file";}
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";}
ResetXML.onclick=function(){FW.resetUI("EditedXML");}}
var htm="<div class='otherFunctions'><a href='javascript:FW.logOff();' title='Log off as administrator' class='fw'>Log Off</a>&nbsp;&#149;&nbsp;<a href='javascript:PopUp.openWin( \"uploader.aspx\", 650, 350, 2, 0, 0, 0, 0, 0, 0 );' 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.serverTimeZoneOffset*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){function subDisableTextBoxes(htm,js,xml){if(htm&&document.getElementById("EditedHTML"))document.getElementById("EditedHTML").disabled=true;if(js&&document.getElementById("EditedJS"))document.getElementById("EditedJS").disabled=true;if(xml&&document.getElementById("EditedXML"))document.getElementById("EditedXML").disabled=true;}
var Form=document.AspForm;var EditedHTML=Form.EditedHTML;var EditedJS=Form.EditedJS;var EditedXML=Form.EditedXML;if(formType==1){if(leftClick&&EditedHTML.value==EditedHTML.defaultValue){alert("Edit the text then press Publish HTML...");EditedHTML.focus();FW.cursorReadyHtm=false;return false;}
else{EditedHTML.value=EditedHTML.value.trim();document.getElementById("PublishHTM").disabled=true;Form.Which_Button.value=(leftClick)?"html":"htmlRightClick";subDisableTextBoxes(0,1,1);}}
else if(formType==2){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;}
EditedJS.value=EditedJS.value.trim();document.getElementById("PublishJS").disabled=true;Form.Which_Button.value=(leftClick)?"js":"jsRightClick";subDisableTextBoxes(1,0,1);}}
else{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.trim();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";subDisableTextBoxes(1,1,0);}
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="xmlRightClick";subDisableTextBoxes(1,1,0);}
EditedXML.value=EditedXML.value.trim();}
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 logIn(){var Form=document.LogIn;if(Form.Privileges[1].checked){var formUser=Form.user.value;for(var user in DB.Administrators){if(user==formUser.replace(/_/g," ")){Form.pw.value=rapw;break;}}}
var userNameFW=Form.user.value;if(userNameFW==""){alert("Please enter your user name");Form.user.focus();return false;}
else if(Form.pw.value==""){alert("Please enter your password");Form.pw.focus();return false;}
if(userNameFW)SetCookie("userNameFW",userNameFW,expDate12Mon);var qStrExisting=qStr;if(qStrExisting){var user=qStr.getVal("user");if(user!=null)qStrExisting=qStrExisting.split("user="+user).join("");var pw=qStr.getVal("pw");if(pw!=null)qStrExisting=qStrExisting.split("pw="+pw).join("");var ms=qStr.getVal("ms");if(ms!=null)qStrExisting=qStrExisting.split("ms="+ms).join("");var logoff=qStr.getVal("logoff");if(logoff!=null)qStrExisting=qStrExisting.split("logoff="+logoff).join("");qStrExisting+="&";qStrExisting=qStrExisting.replace(/\&{2,}/g,"&");}
var user=(Form.Privileges[0].checked)?"user="+Form.user.value+"":"user=";var url=fileName+"?"+qStrExisting+user+"&pw="+Form.pw.value+"&ms="+new Date().getTime();document.location.replace(url);}
function getLogInGUI(evt){var userNameFW=(GetCookie("userNameFW"))?GetCookie("userNameFW"):"";var gui="<form name='LogIn' style='margin:0px;'><table align='center' border='0' cellspacing='0' cellpadding='0'><tr><td><table align='center' border='0' cellspacing='0' cellpadding='0'><tr class='"+((fileName=="calendar.aspx")?"on":"off")+"'><td class='fwField' style='padding-top:6px;'>Privileges</td><td class='fwValue' style='padding-top:6px;' id='tdBookingID'><input type='radio' name='Privileges' value='Write' title='Allows you to add/edit bookings' checked /> Read & Write;&nbsp;&nbsp;&nbsp;<input type='radio' name='Privileges' value='Read' title='Allows you to read-all booking info but not add or edit them' /> Read Only;</td></tr><tr><td class='fwField' style='padding-top:6px;'>User Name</td><td class='fwValue' style='padding-top:6px;' id='tdBookingID'><input type='text' name='user' class='fwText' title='Enter your user-name' value='"+userNameFW+"' onkeypress='if( window.event && window.event.keyCode == 13 || event.which == 13 ) { FW.logIn(); return false; }' /></td></tr><tr><td class='fwField' style='padding-top:6px;'>Password</td><td class='fwValue' style='padding-top:6px;' id='tdBookingID'><input type='password' name='pw' autocomplete='off' class='fwText' onMouseover='this.title=( document.LogIn.Privileges[0].checked ) ? \"Enter your password\" : \"Enter read-all password, User Name not required\";' onkeypress='if( window.event && window.event.keyCode == 13 || event.which == 13 ) { FW.logIn(); return false; }' /></td></tr><tr><td align='center' colspan='2' style='padding:10px 0px 0px 0px; white-space:nowrap;'><input type='button' value='OK' style='margin:0px 4px 0px 0px;' onClick='return FW.logIn();' /><input type='button' value='Cancel' onClick='DW.removeWin();' style='margin:0px 0px 0px 4px;' /></td></tr></table></td></tr></table></form>";DW.createWindow(["Administrator Log-In",gui],[0,400,0],null,evt,6);if(userNameFW)setTimeout("document.LogIn.pw.focus();",100);else
setTimeout("document.LogIn.user.focus();",100);}}
function SlideShow(popUp){initImagesArr();if(popUp){if(!AOL){window.moveTo(0,0);window.resizeTo(screen.availWidth,screen.availHeight);}}
this.userIsAdministrator=GetCookie("userWithWritePrivileges");this.popUp=popUp;this.slideNum=(Settings.SS.randomStart&&!this.userIsAdministrator)?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.dissolve=true;this.maxDissolveMZ=800*800;this.maxImgWid=0;this.maxImgHgt=0;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.rightClick=rightClick;this.changeSpeed=changeSpeed;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.ssExit="Close this slide-show window";function start(){if(Settings.SS.console){var Console=document.getElementById("ssConsole");var maxConsoleHgt=0;for(var i=0;i<Images.length;i++){Console.innerHTML=(Images[i][3])?Images[i][3]:"X";var consoleHgt=Console.offsetHeight;if(consoleHgt>maxConsoleHgt)maxConsoleHgt=consoleHgt;}
Console.style.height=maxConsoleHgt+"px";}
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&&this.dissolve&&(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&&Images[nOldImg][4])TheImage.style.borderColor="rgb( "+getRGB(Images[nOldImg][4])+" )";var imgStyle=(Settings.borderWid&&Images[nNewImg][4])?" 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='return SS.rightClick( this, event );' 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.MozOpacity=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&&Images[this.slideNum][4])TheImage.style.borderColor="rgb( "+getRGB(Images[this.slideNum][4])+" )";TheImage.src=this.NextImage.src;TheImage.style.visibility="visible";}
this.dissolve=true;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)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.dissolve=Settings.SS.dissolveOnJump;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;}
if(window.DW)DW.removeWin();}
function changeSpeed(Button){if(this.speedActual==Settings.SS.speed){this.speedActual=this.SPEED_FAST;if(SF)Button.value="Lo-Speed";else
Button.className="ssButtonOn";Button.title="Revert to normal speed";}
else{SS.speedActual=Settings.SS.speed;if(SF)Button.value="Hi-Speed";else
Button.className="ssButton";Button.title="Run at Hi-Speed";}
this.forward=true;this.pauseSS(false);}
function getControls(){this.buttons=true;htm="<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;";if(this.userIsAdministrator)htm+="&nbsp;<input class='ssButton' type='button' value='Hi-Speed' onClick='SS.changeSpeed( this );' title='Run at Hi-Speed'"+((SF)?" style='width:80px;'":"")+">&nbsp;";htm+="&nbsp;<input type='button' class='ssButton' value='&gt;&gt;' onClick='SS.next();' title='"+this.msg.next+"'>";return htm;}
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];if(!Images[i][4])Images[i][4]=Settings.borderCol;checkImgName(Images[i][0]);}
this.maxImgWid=maxWid+bordWid;this.maxImgHgt=maxHgt+bordWid;}
function rightClick(Photo,evt){if(this.userIsAdministrator){this.pauseSS(true);var nImages=Images.length;var indexNum=(this.slideNum>0)?this.slideNum-1:nImages-1;var Img=Images[indexNum];var wid=Img[1],hgt=Img[2],tnWid=-1,tnHgt=-1,longestEdge=150;var shape=(wid>hgt)?"horizontal":((wid<hgt)?"vertical":"square");if(shape=="horizontal"){tnWid=longestEdge;tnHgt=parseInt(hgt*longestEdge/wid);}
else{tnWid=parseInt(wid*longestEdge/hgt);tnHgt=longestEdge;}
var fileSize=Photo.fileSize;if(fileSize)fileSize=Math.round(fileSize/1000)+" KB";var htm="<table align='left' border='0' cellspacing='0' cellpadding='0'><tr><td align=center valign=top><img src='"+Photo.src+"' width='"+tnWid+"' height='"+tnHgt+"'></td><td align=center valign=top style='padding:4px;'><table align='center' border='0' cellspacing='0' cellpadding='0' class='dwText'><tr><td align=right>Name:&nbsp;</td><td align=left>"+Img[0]+"</td></tr><tr><td align=right>Number:&nbsp;</td><td align=left>"+((this.slideNum>0)?this.slideNum:nImages)+" of "+Images.length+"</td></tr><tr><td align=right>Dimensions:&nbsp;</td><td align=left>"+wid+" &times; "+hgt+" px; "+shape+"</td></tr>"+((fileSize)?"<tr><td align=right valign=top>File Size:&nbsp;</td><td align=left>"+fileSize+"</td></tr>":"")+((typeof Img[3]=="string")?"<tr><td align=right valign=top> Caption:&nbsp;</td><td align=left>"+Img[3]+"</td></tr>":"")+"<tr><td align=left colspan=2>Slide-Show paused, <a href='javascript:SS.dissolve=false; SS.pauseSS( false );' class='dwLink'>click here</a> to resume</td></tr></table></td></table>";DW.createWindow(["Image Properties",htm],[0,500,0],Photo,evt);return false;}
else
return(Settings.disableRightClick)?false:true;}
function getGUI(guiAlign,consoleLoc,buttonsLoc){this.init();var imgStyle=(Settings.borderWid&&Images[this.slideNum][4])?" style='border-color:rgb("+getRGB(Images[this.slideNum][4])+");'":"";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;'>X</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' class='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='return SS.rightClick( this, event );'></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 initPage(){try{var Links=document.links;for(var i=0;i<Links.length;i++){var LinkComponents=Links[i].href.split("/");var file=LinkComponents[LinkComponents.length-1].replace(/\?.*/,"");if(file.toLowerCase()==fileName.toLowerCase()){if(Links[i].className=="navBot")Links[i].className="navBotDisabled";if(Links[i].className=="navTop")Links[i].className="navTopDisabled";}
if(fileName=="default.aspx"){document.getElementById("HomeBullet").className="off";document.getElementById("HomeLink").className="off";}}
var Images=document.images;for(var i=0;i<Images.length;i++){if(Images[i].className=="tn"||Images[i].className=="tnLeft"||Images[i].className=="tnRight")Images[i].title=Msg.enlarge;}
self.status="";}
catch(Err){if(local)alert(Err);self.status="Initializing at initPage()...";setTimeout("initPage()",200);}}
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 initHomepage(){try{var Body=(IE&&document.compatMode=="CSS1Compat")?document.documentElement:document.body;var bodyHeight=(IE)?Body.clientHeight:window.innerHeight;var contentHeight=parseInt(document.getElementById("content").style.height);var marginTop=Math.round((bodyHeight-contentHeight)/2)-30;if(marginTop<0)marginTop=0;document.getElementById("content").style.marginTop=marginTop+"px";SS.moveImgOverlay();self.status="";}
catch(Err){self.status="Exception at function initHomepage(), trying again...";setTimeout("initHomepage();",100);}}