// Do not edit this compressed file. Download, rename & edit the master version of it.
var testEmail="Test"+"@DavidRegier.com";var IE=false,oldIE=false,AOL=false,SF=false,FF=false,CR=false,OP=false;var navAppName=navigator.appName,navUserAgent=navigator.userAgent;switch(navAppName.toLowerCase()){case "microsoft internet explorer":IE=true;if( /AOL/.test(navUserAgent))AOL=true;if(parseFloat(navUserAgent.split("MSIE")[1])<=6)oldIE=true;break;case "netscape":if( /Chrome/i.test(navUserAgent))CR=true;else if( /Safari/i.test(navUserAgent))SF=true;else FF=true;break;case "opera":OP=true;break;}
var winOS=(navigator.platform.substring(0,3)=="Win");var macOS=(navigator.platform.substring(0,3)=="Mac");var theHost=document.location.hostname;var local = ( /^\d+\.\d+\.\d+\.\d+$/.test(theHost)||theHost==""||theHost=="localhost");var live=!local;var emailRE=/^[\w\.-]*[^\.-]@[\w\.-]+\.[a-zA-Z]{2,}$/;var qStr=unescape(document.location.search).substring(1);var homePage="default.aspx"
var path=document.location.pathname;var delimeter=(path.indexOf("\\")>=0)?"\\":"/";if(path.charAt(path.length-1)==delimeter)path+=homePage;var Path=path.split(delimeter);var fileName=Path[Path.length-1];var fileNameLC=fileName.toLowerCase();var dayMS=86400000;function gId(str){return document.getElementById(str);}
function gTn(str){return document.getElementsByTagName(str);}
function gEl(str){return document.createElement(str);}
function aCh(Obj){document.body.appendChild(Obj);}
function rCh(Obj){document.body.removeChild(Obj);}
function getBodyMetrics(){var bodyWid=-1,bodyHgt=-1,scrollX=-1,scrollY=-1;if(SF||CR){var Body=document.body;if(Body){bodyWid=window.innerWidth;bodyHgt=window.innerHeight;scrollX=window.pageXOffset;scrollY=window.pageYOffset;if(Body.scrollHeight>bodyHgt)bodyWid-=17;if(Body.scrollWidth>bodyWid)bodyHgt-=17;}}
else{var Doc=window.document,Comp=Doc.compatMode;var Body = ( Comp && /CSS/.test(Comp))?Doc.documentElement:Doc.body;if(Body){bodyWid=Body.clientWidth;bodyHgt=Body.clientHeight;scrollX=Body.scrollLeft;scrollY=Body.scrollTop;}}
var bodyNotReady=(bodyWid<=0||bodyHgt<=0);return[bodyWid,bodyHgt,scrollX,scrollY,bodyNotReady];}
function getFirstChild(Elem){return(Elem.firstChild&&Elem.firstChild.nodeType==1)?Elem.firstChild:Elem.firstChild.nextSibling;}
function getNextSibling(Elem){return(Elem.nextSibling&&Elem.nextSibling.nodeType==1)?Elem.nextSibling:Elem.nextSibling.nextSibling;}
function getNodeVal(Node){return(Node.childNodes[0])?Node.childNodes[0].nodeValue:"";}
function getDateHST(TheDate){if(!TheDate)TheDate=new Date();var difhrs=TheDate.getTimezoneOffset()/60;var lochrs=TheDate.getHours();var gmtHours=lochrs+difhrs;TheDate.setHours(gmtHours-10);return TheDate;}
function getMonthName(nChars){var Months=["January","February","March","April","May","June","July","August","September","October","November","December"];var monthName=Months[this.getMonth()];return(nChars)?monthName.substring(0,nChars):monthName;}
Date.prototype.getMonthName=getMonthName;function getDayName(nChars){var Days=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var dayName=Days[this.getDay()];return(nChars)?dayName.substring(0,nChars):dayName;}
Date.prototype.getDayName=getDayName;function getVal(key,delimeter,equals){var value=null;var strToSearch=this.toString();if(!delimeter)delimeter="&";if(!equals)equals="=";var KeyVals=strToSearch.split(delimeter);for(member in KeyVals){var ThisPair=KeyVals[member].split(equals);if(key==ThisPair[0]){value=ThisPair[1];break;}}
if(typeof value=="undefined")value="";return value;}
String.prototype.getVal=getVal;function trim(){var str=this.toString();return str.replace(/^\s*|\s*$/g, "" );}
String.prototype.trim=trim;if(typeof window.DB=="object"&&typeof window.DB.Administrators=="object"){for(var key in DB.Administrators){eMailOut="";eMailIn=DB.Administrators[key][0].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][0]=eMailOut;}}
function decipherEmail(){if(typeof window.DB=="object"&&typeof window.DB.Contact=="object"){var eMailOut="";var 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;}}
decipherEmail();Settings=new Array();Settings.transDur=.8;Settings.folder="images/";Settings.borderWidDW=1;Settings.preventImageTheft=1;Settings.defaultCaption="Images & Art";Settings.SS=new Array();Settings.SS.speed=4.5;Settings.SS.randomStart=1;Settings.SS.audio=1;Settings.SS.audioFolder="http://www.mauiwebdesigners.net/webdesign/audio/";Settings.TN=new Array();Settings.TN.ProgressBar=new Array();Settings.TN.ProgressBar.hideOnSuccess=1;Settings.TN.ProgressBar.width=300;Settings.TN.pageTitle="";Settings.TN.align="center";Settings.TN.nImagesRow=8;Settings.TN.width=100;Settings.TN.height=100;Settings.TN.AppendSlideShowLink=0;function 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";}}
function recordToCookie(key,value,CookieExpDate){var cookieName=this.toString();var data=GetCookie(cookieName);if(!data)data="";value=value.toString();value=value.replace(/&/g, "and" ).replace(/=/g, "is" );
var KeyVals=data.split("&");var existingKey=0;for(var i=0;i<KeyVals.length;i++){var ThisPair=KeyVals[i].split("=");if(key==ThisPair[0]){if(value)KeyVals[i]=key+"="+value;else
KeyVals.splice(i,1);data=KeyVals.join("&");existingKey=1;break;}}
if(value&&!existingKey)data+=((data)?"&":"")+key+"="+value;if(data)SetCookie(cookieName,data,((CookieExpDate)?CookieExpDate:null));else
DeleteCookie(cookieName);}
String.prototype.recordToCookie=recordToCookie;var expDate12Mon=new Date();expDate12Mon.setTime(expDate12Mon.getTime()+(dayMS*365));userWithWritePrivileges=GetCookie("userWithWritePrivileges");if(userWithWritePrivileges){userWithWritePrivilegesFirstName=userWithWritePrivileges.split("_")[0];userWithWritePrivileges=userWithWritePrivileges.replace(/_/, " " );}
if(userWithWritePrivileges||local)Settings.preventImageTheft=0;var itsDavid=(userWithWritePrivileges=="David Regier");function getAjaxRequest(){var Request=null;if(window.XMLHttpRequest){try{Request=new XMLHttpRequest();}
catch(Err){Request=null;}}
else if(window.ActiveXObject){try{Request=new ActiveXObject("Msxml2.XMLHTTP");}
catch(Err){try{Request=new ActiveXObject("Microsoft.XMLHTTP");}
catch(Err){Request=null;}}}
return Request;}
function initAJAX(){switch(fileNameLC){case "calendar.aspx":Cal.pollData();break;default:if(window.CM&&userWithWritePrivileges)CM.pollAdministrators();else
PL.run();}}
function PreLoader(){this.dwWid=540;this.nBars=10;this.barOffColor="rgb( 140,101,63 )";this.barOnColor="rgb( 0,204,255 )";var BodyMetrics=getBodyMetrics();var bodyWid=BodyMetrics[0];var bodyHgt=BodyMetrics[1];var Files=new Array();Files.push("default.aspx");if(bodyWid>=1200&&bodyHgt>=759){Files.push("images/homeLg.jpg");Files.push("images/homeWebSoftwareLg.png");Files.push("images/homeWebSoftwareLg.jpg");}
else{Files.push("images/homeSm.jpg");Files.push("images/homeWebSoftwareSm.png");Files.push("images/homeWebSoftwareSm.jpg");}
Files.push("images/header.jpg");Files.push("images/WebSoftware.png");Files.push("images/WebSoftware.jpg");Files.push("about-david.aspx");Files.push("images/davidSM.jpg");Files.push("images/david.jpg");Files.push("thumbnails.js?cb=100211-0834");Files.push("web-sites.aspx");Files.push("images/clientDownesGrounds_TN.jpg");Files.push("images/clientOPH_TN.jpg");Files.push("images/clientTMW_TN.jpg");Files.push("images/clientBHBB_TN.jpg");Files.push("images/clientWML_TN.jpg");Files.push("images/clientHainly_TN.jpg");Files.push("images/clientMKP_TN.jpg");Files.push("images/clientRaquel_TN.jpg");Files.push("web-applications.aspx");Files.push("web-site-demo.aspx");Files.push("faq.aspx");Files.push("estimate.aspx");Files.push("estimate.js");Files.push("images/infoOff.gif");Files.push("images/infoOn.gif");Files.push("inquire.aspx");Files.push("davidContact.js?cb=100211-0834");Files.push("images/ContactUs.jpg");Files.push("slide-show.js");Files.push("thumbnails.aspx?db=images.js");Files.push("images.js");Files.push("calendar.aspx");Files.push("images/headerWide.jpg");Files.push("cal-data.js");Files.push("calendar.js");Files.push("slide-show.aspx");Files.push("slide-showEmbedded.js");Files.push("images-sse.js");Files.push("images/preloader.gif");this.Files=Files;this.showReport=0;try{if(top.qStr&&top.qStr.getVal("preloader")=="y")this.showReport=1;}
catch(Err){}
if(this.showReport)DeleteCookie("nFilesCached");this.begRequestTime=0;this.firstRequestTime=0;this.Request=null;this.timer=0;this.nFilesCachedCookie=GetCookie("nFilesCached");this.nFilesCached=(this.nFilesCachedCookie)?parseInt(this.nFilesCachedCookie):0;this.nFileErrors=0;this.sortIndex=-1;this.Data=new Array();this.run=run;this.sortColumn=sortColumn;function sortColumn(Link){var PreloaderWin=gId("PreloaderWin");var ascendingSort;if(Link){this.sortIndex=Link.parentNode.cellIndex;ascendingSort=(Link.innerHTML.indexOf("Down")>=0||Link.innerHTML.indexOf("PreLoaderArrowHidden")>=0);}
else{this.sortIndex=3;ascendingSort=false;}
switch(this.sortIndex){case 0:case 2:case 3:this.Data.sort((ascendingSort)?sortAscNum:sortDecNum);break;case 1:this.Data.sort((ascendingSort)?sortAscStr:sortDecStr);break;}
var Htm=new Array();Htm.push("<table class='PreLoader'>");Htm.push("<tbody>");Htm.push("<tr>");Htm.push("<th><a href='javascript:void(0);' onClick='PL.sortColumn( this );' class='PreLoaderHead' title='Order in which files are cached'>");addSortArrow(ascendingSort,0);Htm.push("#</a></th>");Htm.push("<th><a href='javascript:void(0);' onClick='PL.sortColumn( this );' class='PreLoaderHead' title='File name'>");addSortArrow(ascendingSort,1);Htm.push("File</a></th>");Htm.push("<th><a href='javascript:void(0);' onClick='PL.sortColumn( this );' class='PreLoaderHead' title='File size in kilobytes'>");addSortArrow(ascendingSort,2);Htm.push("KB</a></th>");Htm.push("<th><a href='javascript:void(0);' onClick='PL.sortColumn( this );' class='PreLoaderHead' title='Time in milliseconds'>");addSortArrow(ascendingSort,3);Htm.push("MS</a></th>");Htm.push("</tr>");for(var i=0;i<this.Data.length;i++){Htm.push("<tr");if((i+1)%2)Htm.push(" class='PreLoaderColorRow'");Htm.push(">");var Record=this.Data[i];for(var k=0;k<Record.length-1;k++){Htm.push("<td>");if(k==1){Htm.push("<a href='");Htm.push(Record[4]);Htm.push("' class='PreLoaderFile'>");Htm.push(Record[k]);Htm.push("</a>");}
else
Htm.push(Record[k]);Htm.push("</td>");}
Htm.push("</tr>");}
Htm.push("</tbody>");Htm.push("</table>");var htm=Htm.join("");PreloaderWin.innerHTML=htm;function sortAscStr(a,b){var aU=a[PL.sortIndex].toUpperCase();var bU=b[PL.sortIndex].toUpperCase();return aU<bU?-1:aU>bU?1:a[PL.sortIndex]==b[PL.sortIndex]?PL.sortIndex:a[PL.sortIndex]<b[PL.sortIndex]?-1:1;}
function sortDecStr(b,a){var aU=a[PL.sortIndex].toUpperCase();var bU=b[PL.sortIndex].toUpperCase();return aU<bU?-1:aU>bU?1:a[PL.sortIndex]==b[PL.sortIndex]?PL.sortIndex:a[PL.sortIndex]<b[PL.sortIndex]?-1:1;}
function sortAscNum(a,b){return a[PL.sortIndex]<b[PL.sortIndex]?-1:a[PL.sortIndex]>b[PL.sortIndex]?1:a[PL.sortIndex]==b[PL.sortIndex]?PL.sortIndex:a[PL.sortIndex]<b[PL.sortIndex]?-1:1;}
function sortDecNum(b,a){return a[PL.sortIndex]<b[PL.sortIndex]?-1:a[PL.sortIndex]>b[PL.sortIndex]?1:a[PL.sortIndex]==b[PL.sortIndex]?PL.sortIndex:a[PL.sortIndex]<b[PL.sortIndex]?-1:1;}
function addSortArrow(ascendingSort,tdIndex){if(PL.sortIndex==tdIndex)Htm.push((ascendingSort)?"<span class='PreLoaderArrow Up'>\u25B2</span> ":"<span class='PreLoaderArrow Down'>\u25BC</span> ");else
Htm.push("<span class='PreLoaderArrowHidden'>\u25B2</span> ");}}
function run(){this.Request=getAjaxRequest();clearTimeout(PL.timer);if(this.Request){if(this.showReport&&!gId("PreloaderWin")){var bodyHgt=getBodyMetrics()[1];var dwHgt=bodyHgt-100;DW.createWindow(["<div id=\"ProgressBarContainer\" align=\"center\" style=\"margin:5px 0px 5px 0px;\">"+PB.getProgressBar(this.nBars,this.barOffColor,this.barOnColor)+"</div>","<div align='center' id='PreloaderWin' style='margin:15px 20px 15px 20px;'>Generating Preloader Report &nbsp;&#149;&nbsp; One Moment Please</div>"],[1,this.dwWid,dwHgt],null,null,0,[4,0,0],null,0,1);PB.initProgressBar();}
if(this.nFilesCached<this.Files.length){this.Request.onreadystatechange=function(){try{if(PL.Request.readyState==4){if(PL.showReport){var PreloaderWin=gId("PreloaderWin");if(PreloaderWin){var endRequestTime=new Date().getTime();var elapsedTimeSec=endRequestTime-PL.begRequestTime;var fileSize=Math.round(PL.Request.getResponseHeader("Content-Length")/1024);if(!fileSize)fileSize=1;if(PL.Request.status==200||PL.Request.status==304){PL.Data[PL.Data.length-1][2]=fileSize;PL.Data[PL.Data.length-1][3]=elapsedTimeSec;}
else if(PL.Request.status){PL.Data[PL.Data.length-1][2]="<span class='PreLoaderError'>"+PL.Request.status+" Error</span>";PL.Data[PL.Data.length-1][3]=elapsedTimeSec;PL.nFileErrors++;}
if(PL.nFilesCached==PL.Files.length-1){var totalElapsedTimeSec=(endRequestTime-PL.firstRequestTime)/1000;var plural=(PL.nFileErrors==1)?"":"s";var ProgressBarContainer=gId("ProgressBarContainer");ProgressBarContainer.innerHTML=(PL.Files.length-PL.nFileErrors)+" Files Cached in "+totalElapsedTimeSec.toFixed(1)+" Seconds";if(PL.nFileErrors)ProgressBarContainer.innerHTML+="&nbsp;&#149;&nbsp; "+PL.nFileErrors+" Error"+plural;PL.sortColumn(null);}}}
if(PL.Request.status){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.showReport)alert(eMsg);} catch(Err){}}}
this.Request.open("GET",this.Files[this.nFilesCached],true);this.Request.send(null);if(PL.showReport){this.begRequestTime=new Date().getTime();if(PL.nFilesCached==0)this.firstRequestTime=this.begRequestTime;var PreloaderWin=gId("PreloaderWin");if(PreloaderWin){var nFiles=PL.nFilesCached+1;var fileNamePath=PL.Files[PL.nFilesCached];var fileName=fileNamePath.replace(/^.*\//, "" );
PL.Data.push([nFiles,fileName,-1,-1,fileNamePath]);}}}}
else if(PL.showReport)alert("Error at PL.run: Browser unable to make an AJAX request");}} PL=new PreLoader();Msg=new Array();Msg.About="About David Regier";Msg.Cal="Rental calendar \u2022 View working demo";Msg.CMS="Edit your own web site \u2022 View working demo";Msg.BusCard="Send E-Mail or Call";Msg.Contact="Submit an Inquiry";Msg.DavidExtSite="Go to this web site";Msg.EmailEst="E-mail this estimate to a friend or yourself";Msg.Enlarge="View enlargement";Msg.Estimate="Get an estimate";Msg.EstimateInstructions="Answer questions & your estimate will be displayed here";Msg.FAQ="Frequently Asked Questions";Msg.Homepage="Homepage";Msg.Login="Website administrator log-in";Msg.Logoff="Log off as website administrator";Msg.PW="Case Sensitive Password";Msg.Quote="Requirements for a binding price quote";Msg.RememberMe="Your computer only \u2022 Do NOT check on public computers";Msg.Sitemap="List of overall site content";Msg.SS="View slide-show";Msg.SS_Music="Slide-show & music auto-starts";Msg.SSE="View embedded slide-show";Msg.SsAudio="Play a song";Msg.TN="View thumbnail images";Msg.User="Case Sensitive User Name";Msg.WebApps="Browse sites using my web applications";Msg.WebSites="Browse some of my web sites";FadeObj=null;transDur=-1;transDelay=-1;fadeOpacity=0,fadeOpacityTimer=0,fadeStartTime=0;opacityStep=(window.Settings&&window.Settings.SS&&Settings.transDur)?1/(Settings.transDur/.04):.05;function getOpacity(){return(IE)?"visibility:hidden;":"opacity:0;";}
function setOpacity(Obj){(IE)?Obj.style.visibility="hidden":Obj.style.opacity=0;}
function startFade(FadeObj,transDur,transDelay){if(window.FadeObj==null){window.FadeObj=FadeObj;if(IE){window.transDur=transDur;window.transDelay=transDelay;setTimeout("fadeInDirectX()",transDelay);}
else{fadeStartTime=new Date().getTime();FadeObj.onload=function(){};(transDelay)?setTimeout("fadeIn()",transDelay):fadeIn();}}
else{(IE)?FadeObj.style.visibility="visible":FadeObj.style.opacity=1;FadeObj.style.visibility="visible";}}
function fadeIn(){if(FadeObj){FadeObj.style.opacity=fadeOpacity;fadeOpacity+=opacityStep;if(fadeOpacity<1)fadeOpacityTimer=setTimeout("fadeIn();",40);else{FadeObj.style.opacity=1;clearTimeout(fadeOpacityTimer);fadeOpacity=0;var fadeEndTime=new Date().getTime();var fadeDuration=fadeEndTime-fadeStartTime;fadeStartTime=0;if(fadeDuration>1500)opacityStep+=.03;FadeObj=null;}}}
function fadeInDirectX(){if(FadeObj){try{FadeObj.style.filter="progid:DXImageTransform.Microsoft.Fade(duration="+transDur+",overlap=1)";FadeObj.filters(0).apply();FadeObj.style.visibility="visible";FadeObj.filters(0).play();FadeObj.onfilterchange=function(){FadeObj=null;}}
catch(Err){if(local){var eMsg="Exception Caught in fadeInDirectX function:\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";alert(eMsg);}
try{FadeObj.style.visibility="visible";} catch(Err){;}}}}
function getPhotoCaption(captionIn){if(!captionIn)captionIn="";var captionOut=captionIn.trim();if(captionOut){captionOut=captionOut.replace(/\*/g, Settings.defaultCaption );
captionOut=captionOut.replace(/ *\[ */g, "[" ).replace(/ *\] */g, "]" );
captionOut=captionOut.replace(/\]\[/g, "<br/>" );
captionOut=captionOut.replace(/\[/, "<div class=\"dwTitleLine2\">" ).replace(/]/, "</div>" );
captionOut=captionOut.replace(/<>/g, "<span class=\"dwBullet\">&#149;</span>" );
captionOut=captionOut.replace(/'/g, "&#39;" );
captionOut=captionOut.replace(/%20/g, " " );}
return captionOut;}
function initImagesArr(){try{if(Images[Images.length-1]==null)Images.pop();}
catch(Err){alert("Images array cannot be initialized because the data it contains is malformed (bad syntax)");}}
function showImgProperties(ThePhoto){if(userWithWritePrivileges){var Photo=getAjaxRequest();if(Photo&&DW.winType=="Admin"){Photo.onreadystatechange=function(){try{if(Photo.readyState==4){if(Photo.status==200||Photo.status==304){this.ImgOffscreen=gId("ImgOffscreenLg");if(this.ImgOffscreen)rCh(this.ImgOffscreen);this.ImgOffscreen=gEl("IMG");this.ImgOffscreen.id="ImgOffscreen";this.ImgOffscreen.style.position="absolute";this.ImgOffscreen.style.top="-1000000px";this.ImgOffscreen.style.left="-1000000px";aCh(this.ImgOffscreen);this.ImgOffscreen.onload=function(){var fileSize=Math.round(parseInt(Photo.getResponseHeader("Content-Length"))/1024)+" K";var ImageProperties=gId("ImageProperties");ImageProperties.innerHTML=this.width+" &times; "+this.height+" <span class='dwBullet'>&#149;</span> "+fileSize;}
this.ImgOffscreen.src=ThePhoto.src;}
else if(Photo.status)alert("AJAX request error occurred at function showImgProperties\n\nStatus expected: 200 or 304\nStatus returned: "+Photo.status);}}
catch(Err){var eMsg="Exception at function showImgProperties\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";try{alert(eMsg);} catch(Err){}}}
Photo.open("GET",ThePhoto.src);Photo.send(null);}}}
RequestCode=null,RequestData=null;function launchSS(dataFile,Link,nAudio){if(window.TN)TN.kill();if(!dataFile)dataFile=qStr.getVal("db");(nAudio)?SetCookie("audio",nAudio):DeleteCookie("audio");if(Link){var titleOrig=Link.title;Link.style.cursor="wait";Link.title="Starting slide-show, please wait...";}
RequestCode=getAjaxRequest();if(RequestCode){RequestCode.onreadystatechange=function(){try{if(RequestCode.readyState==4){if(RequestCode.status==200||RequestCode.status==304){eval(RequestCode.responseText);RequestData=getAjaxRequest();RequestData.onreadystatechange=function(){try{if(RequestData.readyState==4){if(RequestData.status==200||RequestData.status==304){eval(RequestData.responseText);SS=new SlideShow();SS.init();if(Link){Link.style.cursor = ( /a/i.test(Link.tagName))?"pointer":"default";Link.title=titleOrig;Link.blur();}
DW.photoCaption=Images[SS.nFirstSlide][1];DW.photoCount=SS.getCount(SS.nFirstSlide);DW.createEnlargement("SS",Settings.folder+Images[SS.nFirstSlide][0]);}
else if(RequestData.status)alert("AJAX error retrieving file \u201C"+dataFile+"\u201D at function launchSS\n\nStatus expected: 200 or 304\nStatus returned: "+RequestData.status);}}
catch(Err){var eMsg="AJAX exception at function launchSS\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";try{alert(eMsg);} catch(Err){}}}
var cacheBuster=(local||userWithWritePrivileges)?"?CacheBuster="+Math.random():"";RequestData.open("GET",dataFile+cacheBuster,true);RequestData.send(null);}
else if(RequestCode.status)alert("AJAX error retrieving file \u201Cslide-show.js\u201D at function launchSS\n\nStatus expected: 200 or 304\nStatus returned: "+RequestCode.status);}}
catch(Err){var eMsg="AJAX exception at function launchSS\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";try{alert(eMsg);} catch(Err){}}}
var cacheBuster=(local)?"?CacheBuster="+Math.random():"";RequestCode.open("GET","slide-show.js"+cacheBuster,true);RequestCode.send(null);}
else
alert("We're sorry, but it seems your browser is unable to make an AJAX (Asynchronous JavaScript And XML) request. As a result, you will not be able to play our slide-show.");return false;}
function enlargement(photoCaption,Link){DW.photoCaption=photoCaption;DW.createEnlargement("PH",Link.href);return false;}
function showHawaiiTime(){var HST=getDateHST();var am_pm="am";var hours=HST.getHours();if(hours>=12)am_pm="pm";if(hours>=13)hours-=12;if(hours==0)hours="12";var nMinutes=HST.getMinutes();var minutes=(nMinutes<10)?"0"+nMinutes:nMinutes;var nSeconds=HST.getSeconds();var seconds=(nSeconds<10)?"0"+nSeconds:nSeconds;try{gId("hawaii_time").innerHTML=hours+":"+minutes+":"+seconds+" <span class='smallCaps'>"+am_pm+"</span>";}
catch(Err){}
finally{setTimeout("showHawaiiTime()",1000);}}
function getEmailLink(emailAddress,anchorText,sub){return "<a href='mailto:"+emailAddress+"?subject="+escape(sub)+"' title='Send an e-mail' class='dwLink'>"+anchorText+"</a>";}
function businessCard(){var Htm=new Array();Htm.push("<table border=0 align='center' style='margin-top:15px; margin-bottom:15px;'>");Htm.push("<tr>");Htm.push("<td class='ContactUsImg'>");Htm.push("<img src='images/ContactUs.jpg' onLoad='startFade( this, 0.8, 500 )' onContextmenu='return ( Settings.preventImageTheft ) ? false : true;'  class='ContactUs' style='");Htm.push(getOpacity());Htm.push("'>");Htm.push("</td>");Htm.push("<td align='left'>");Htm.push("<table align='center'>");if(DB.Contact.Name){Htm.push("<tr>");Htm.push("<td class='ContactUsCol' style='padding-top:0px;'>");Htm.push(DB.Contact.Name);Htm.push("</td>");Htm.push("</tr>");}
Htm.push("<tr>");Htm.push("<td class='ContactUsCol'>Maui Time <span id='hawaii_time'></span></td>");Htm.push("</tr>");if(DB.Contact.Phone1){Htm.push("<tr>");Htm.push("<td class='ContactUsCol'>");Htm.push(DB.Contact.Phone1);Htm.push("</td>");Htm.push("</tr>");}
if(DB.Contact.Phone2){Htm.push("<tr>");Htm.push("<td class='ContactUsCol'>");Htm.push(DB.Contact.Phone2);Htm.push("</td>");Htm.push("</tr>");}
if(DB.Contact.Phone3){Htm.push("<tr>");Htm.push("<td class='ContactUsCol'>");Htm.push(DB.Contact.Phone3);Htm.push("</td>");Htm.push("</tr>");}
if(DB.Contact.Phone4){Htm.push("<tr>");Htm.push("<td class='ContactUsCol'>");Htm.push(DB.Contact.Phone4);Htm.push("</td>");Htm.push("</tr>");}
if(DB.Contact.Email){Htm.push("<tr>");Htm.push("<td class='ContactUsCol'>");Htm.push(getEmailLink(DB.Contact.Email,DB.Contact.Email,"DavidRegier.com Web Site Inquiry"));Htm.push("</td>");Htm.push("</tr>");}
if(DB.Contact.Address1||DB.Contact.Address2||DB.Contact.Address3){Htm.push("<tr>");Htm.push("<td class='ContactUsCol'>");if(DB.Contact.Address1){Htm.push(DB.Contact.Address1);Htm.push("<br/>");}
if(DB.Contact.Address2){Htm.push(DB.Contact.Address2);Htm.push("<br/>");}
if(DB.Contact.Address3){Htm.push(DB.Contact.Address3);Htm.push("<br/>");}
Htm.push("</tr>");}
Htm.push("</table>");Htm.push("</td>");Htm.push("</tr>");Htm.push("</table>");var adminNotes=(window.userWithWritePrivileges&&DB.Administrators[window.userWithWritePrivileges][1]==1)?"<div class=adminChangePhoto>"+window.userWithWritePrivilegesFirstName+": To change photo upload a new <a href=\"images/ContactUs.jpg\" style=\"color:rgb(215,214,204); text-decoration:underline;\">ContactUs.jpg</a> at 133&times;200</div>":"";var titleBar=DB.Contact.Name;if(DB.Contact.Title)titleBar+=" <span class=\"dwBullet\">&#149;</span> "+DB.Contact.Title;titleBar+=adminNotes;var ContactUs=[titleBar,Htm.join("")];DW.createWindow(ContactUs,[0,380,0],null,null,0,[4,0,0],null,null,1);showHawaiiTime();return false;}
function DynamicWindow(transDur){this.ssTnskewIeX=2;this.ssTnskewIeY=6;this.skewIeX=2;this.skewIeY=2;window.gClickPos=null;this.transDur=(transDur)?transDur:0.8;this.dWinOffsetX=0;this.dWinOffsetY=0;this.ImgOffscreen=null;this.overlayExists=false;this.overTitleBar=false;this.Photo=null;this.Window=null;this.winType="";this.addOverlay=addOverlay;this.cancelEvt=cancelEvt;this.cancelPreloader=cancelPreloader;this.createEnlargement=createEnlargement;this.getScaledSize=getScaledSize;this.reCenter=reCenter;this.createWindow=createWindow;this.showImg=showImg;this.keepInWin=keepInWin;this.getClickPosition=getClickPosition;this.getData=getData;this.mouseDown=mouseDown;this.mouseMove=mouseMove;this.moveTopImage=moveTopImage;this.otherFunctionalityOnRemoveWin=otherFunctionalityOnRemoveWin;this.removeWin=removeWin;this.mouseUp=mouseUp;document.onmousedown=this.mouseDown;document.onmousemove=this.mouseMove;document.onmouseup=this.mouseUp;var Preloader=new Image();Preloader.src="images/preloader.gif";window.onscroll=function(){var Overlay=gId("dwOverlay");if(Overlay){rCh(Overlay);DW.overlayExists=false;if(window.SSE&&!SSE.running)SSE.pauseSS(0);}
if(window.DW){switch(DW.winType){case "SS":if(window.SS)SS.pause(1);break;case "PH":case "TN":DW.removeWin();break;}}}
function otherFunctionalityOnRemoveWin(){}
function cancelPreloader(){var Overlay=gId("dwOverlay");if(Overlay)rCh(Overlay);this.overlayExists=false;this.ImgOffscreen=gId("ImgOffscreen");if(this.ImgOffscreen){this.ImgOffscreen.onload=function(){};rCh(this.ImgOffscreen);}}
function createEnlargement(winType,imgSrc){DW.addOverlay(1,winType);this.ImgOffscreen=gId("ImgOffscreen");if(this.ImgOffscreen)rCh(this.ImgOffscreen);this.ImgOffscreen=gEl("IMG");this.ImgOffscreen.id="ImgOffscreen";this.ImgOffscreen.style.position="absolute";this.ImgOffscreen.style.top="-1000000px";this.ImgOffscreen.style.left="-1000000px";aCh(this.ImgOffscreen);this.ImgOffscreen.onload=function(){var CancelPreload=gId("CancelPreload");if(CancelPreload)CancelPreload.innerHTML="";DW.createWindow([DW.photoCaption,"imgSrc="+this.src],[0,this.width,this.height],null,null,0,[4,0,0],winType);if(winType=="SS"||winType=="TN"||winType=="Admin"){gId("SsTnCount").innerHTML=DW.photoCount;}}
this.ImgOffscreen.onerror=function(){var imgSrc=this.src;DW.cancelPreloader();alert("Image Not Found:\n"+imgSrc);}
this.ImgOffscreen.src=imgSrc;}
function createWindow(dataSrc,WinDim,TheLink,theEvent,bodyMargin,RequestedPos,winType,centerContent,addOverlay,noX){if(TheLink)TheLink.blur();if(window.SS&&winType!="SS")SS.kill();if(window.TN&&winType!="TN")TN.kill();if(!bodyMargin)bodyMargin=0;this.winType=(winType)?winType:"";var Data=this.getData(dataSrc,TheLink),theCaption,body;theCaption=getPhotoCaption(Data[0]);body=Data[1].replace(/\^\^/g, "'" );
body=body.replace(/\^/g, "\"" );
var showImg=(body.indexOf("imgSrc=")==0);var scrollStyle=(WinDim[0])?" overflow:auto;":"";var winWid=WinDim[1];var winHgt=WinDim[2];var clickPos=(RequestedPos)?(RequestedPos[0]==1):true;var aboveClkPos=(RequestedPos)?(RequestedPos[0]==2):false;var topCent=(RequestedPos)?(RequestedPos[0]==3):false;var center=(RequestedPos)?(RequestedPos[0]==4):false;var botCent=(RequestedPos)?(RequestedPos[0]==5):false;var xOffset=(RequestedPos)?RequestedPos[1]:0;var yOffset=(RequestedPos)?RequestedPos[2]:15;if(showImg){var imgSrc=body.split("imgSrc=")[1];var WinDim=this.getScaledSize(winWid,winHgt,theCaption);var fullSize=(WinDim[0]==winWid&&WinDim[1]==winHgt);winWid=WinDim[0];winHgt=WinDim[1];if(userWithWritePrivileges&&this.winType=="Admin")theCaption+="<div class='dwTitleLine2' id='ImageProperties'>&nbsp;</div>";var body="<img src='"+imgSrc+"' border='0' hspace='0' vspace='0' galleryimg='no' style='"+getOpacity()+" width:"+winWid+"px; height:"+winHgt+"px;' onload='DW.showImg( this, "+fullSize+" );' onAbort='this.src=this.src;' id='ImageDW' onmouseover='DW.overImg=true;' onmouseout='DW.overImg=false;'>";if(this.winType=="TN"){var titleBarGUI="<table align='center' id='tnTable'><tr align='center'><td class='dwBackEnlargementSsTn' id='SsTnBackTD' onmousedown='DW.cancelEvt( event );'><a href='javascript:void(0);' onClick='TN.nextImage( 0, event ); return false;' title='Last enlargement' onmousedown='DW.cancelEvt( event );' class='SsTnArrow'>\u25C4</a></td><td class='dwTitle dwImgTitleSS' id='SsTnTitle'>"+theCaption+"</td><td class='dwNextEnlargementSsTn'><a href='javascript:void(0);' onClick='TN.nextImage( 1, event ); return false;' title='Next enlargement, or click photo...' onmousedown='DW.cancelEvt( event );' class='SsTnArrow' id='SsTnNextArrow'>\u25BA</a></td></tr></table>";theCaption=titleBarGUI;}
else if(this.winType=="SS"){var titleBarGUI="<table align='center' id='tnTable'><tr align='center'><td class='dwBackEnlargementSsTn' id='SsTnBackTD' onmousedown='DW.cancelEvt( event );'><a href='javascript:void(0);' onClick='SS.back(); return false;' title='Back' onmousedown='DW.cancelEvt( event );' class='SsTnArrow'>\u25C4</a></td><td class='dwTitle dwImgTitleSS' id='SsTnTitle'>"+theCaption+"</td><td class='dwNextEnlargementSsTn'><a href='javascript:void(0);' onClick='SS.next( event ); return false;' title='Next' onmousedown='DW.cancelEvt( event );' class='SsTnArrow' id='SsTnNextArrow'>\u25BA</a></td></tr></table>";theCaption=titleBarGUI;}}
var Window=gId("dWinID");if(Window)rCh(Window);var NewWindow=gEl("DIV");var scrollSt,bodyHgtSt;bodyHgtStyle=(winHgt)?" height:"+winHgt+"px;":"";NewWindow.id="dWinID";NewWindow.className="dwWin";aCh(NewWindow);NewWindow.style.visibility="hidden"
NewWindow.style.position="absolute";var borderWid=(DW.overlayExists)?0:Settings.borderWidDW;NewWindow.style.borderWidth=borderWid+"px";NewWindow.style.width=(IE&&document.compatMode!="CSS1Compat")?(winWid+(2*borderWid))+"px":winWid+"px";NewWindow.style.top=(screen.height*-1)+"px";NewWindow.style.left=(screen.width*-1)+"px";NewWindow.style.zIndex=10000;var music=(this.winType=="SS"&&Settings.SS.audio)?"&nbsp; &nbsp;<a href='javascript:void(0);' onClick='SS.pause( 1 ); Menu.show( this, \"Menu_Music\", 34, event, 0, 6 );' Menu.keepAlive([\"Menu_Music\"]);' onMouseout='Menu.hide([\"Menu_Music\"]);' class='SsMusic' title='"+Msg.SsAudio+"'>&#9835;</a>&nbsp;":"";var counterCell=(this.winType=="TN"||this.winType=="SS"||this.winType=="Admin")?"<td id='dwTitleLeft' class='dwCounterSsTn' onmousedown='DW.cancelEvt( event );'><span id='SsTnCount' onmousedown='DW.cancelEvt( event );'></span><span onmousedown='DW.cancelEvt( event );'>"+music+"</td>":"";var pauseBut="";var dwX="<a href='javascript:DW.removeWin();' title='Close' id='dwX' class='dwX'>&nbsp;&times;&nbsp;</a>";if(this.winType=="SS"){var padTop=(macOS&&(CR||SF))?3:1;pauseBut="<table><tr style='vertical-align:top;'><td style='padding-top:"+padTop+"px;'>&nbsp;<a href='javascript:void(0);' onClick='SS.pause( ( SS.running ) ? 1 : 0 );' title='Pause' class='PauseSS' id='PauseSS'>||</a>&nbsp;</td>";dwX="<td>"+dwX+"</td></tr></table>";}
if(noX)dwX="";var winClass=(DW.overlayExists||addOverlay)?"dwTitleRowOverlay":"dwTitleRow";var myWindow="<div class='"+winClass+"' id='dwTitleRowID' onmouseover='DW.overTitleBar=true;' onmouseout='DW.overTitleBar=false;'><table align='center'><tr>"+counterCell+"<td class='dwTitle' style='width:100%; text-align:center;' id='dwTitleCenter'>"+theCaption+"</td><td valign='top' id='dwTitleRight' onmousedown='DW.cancelEvt( event );' style='white-space:nowrap;'>"+pauseBut+dwX+"</td></tr></table></div><div class='"+((showImg)?"dwBodyParentImg":"dwBodyParent")+"' style='width:100%;"+bodyHgtStyle+scrollStyle+"'><div class='dwBody' id='dwBodyID' style='margin:"+bodyMargin+"px;'>";if(centerContent)myWindow+="<table align='center'><tr><td>";myWindow+=body;if(centerContent)myWindow+="</td></tr></table>";myWindow+="</div></div>";NewWindow.innerHTML=myWindow;var xPos=0,yPos=0;var BodyMetrics=getBodyMetrics();var bodyWid=BodyMetrics[0];var bodyHgt=BodyMetrics[1];var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];if(clickPos||aboveClkPos){if(theEvent)var ClickPos=this.getClickPosition(theEvent);else if(window.gClickPos)var ClickPos=gClickPos;window.gClickPos=ClickPos;xPos=ClickPos[0];var skew=Math.round(100*xPos/bodyWid)/100;xPos=xPos+xOffset-(skew*NewWindow.offsetWidth);if(clickPos)yPos=ClickPos[1]+yOffset;else
yPos=ClickPos[1]-NewWindow.offsetHeight+yOffset;}
else if(topCent||center||botCent){winHgt=NewWindow.offsetHeight;winWid=NewWindow.offsetWidth;xPos=parseInt((bodyWid-winWid)/2+scrollX+xOffset);if(topCent)yPos=parseInt(scrollY+yOffset);else if(center)yPos=parseInt((bodyHgt-winHgt)/2+scrollY+yOffset);else yPos=parseInt(bodyHgt-winHgt+scrollY+yOffset);}
else{var Component=(window.ComponentDW)?window.ComponentDW:gId(RequestedPos[3]);if(SF&&theEvent){var Target=(theEvent.target)?theEvent.target:theEvent.srcElement;if(Target.nodeType==3)Component=Component.parentNode;}
var CurComponent=Component;var parPosAbs=false;while(CurComponent){yPos+=CurComponent.offsetTop;xPos+=CurComponent.offsetLeft;CurComponent=CurComponent.offsetParent;}
switch(RequestedPos[0]){case 10:xPos+=xOffset;yPos-=NewWindow.offsetHeight-yOffset;break;case 11:xPos+=Component.offsetWidth+xOffset;yPos-=NewWindow.offsetHeight-yOffset;break;case 12:xPos+=Component.offsetWidth+xOffset;yPos+=yOffset;break;case 13:xPos+=Component.offsetWidth+xOffset;yPos+=Component.offsetHeight+yOffset;break;case 14:xPos+=xOffset;yPos+=Component.offsetHeight+yOffset;break;case 15:xPos+=Component.offsetWidth+xOffset-NewWindow.offsetWidth;yPos+=Component.offsetHeight+yOffset;break;case 16:xPos+=xOffset-NewWindow.offsetWidth;yPos+=Component.offsetHeight+yOffset;break;case 17:xPos+=xOffset-NewWindow.offsetWidth;yPos+=yOffset;break;default:alert("Switch/Case Error at DW.createWindow: RequestedPos[ 0 ] has a value of "+RequestedPos[0]+" which is invalid.");}}
var NewWindowPos=this.keepInWin(NewWindow,xPos,yPos);xPos=Math.round(NewWindowPos[0]);yPos=Math.round(NewWindowPos[1]);NewWindow.style.left=xPos+"px";NewWindow.style.top=yPos+"px";if(addOverlay)this.addOverlay(0,winType);NewWindow.style.visibility="visible";}
function getScaledSize(imgWid,imgHgt,photoCaption){var photoCaptionLC=photoCaption.toLowerCase();var nLines=1;nLines+=photoCaptionLC.split("<div").length-1;nLines+=photoCaptionLC.split("<br").length-1;var marginX=45;var marginY=50+(10*nLines);var dwWid=imgWid+marginX;var dwHgt=imgHgt+marginY;var BodyMetrics=getBodyMetrics();var bodyWid=BodyMetrics[0];var bodyHgt=BodyMetrics[1];var winWidNew,winHgtNew;if(dwWid>=bodyWid||dwHgt>=bodyHgt){var widOver=dwWid-bodyWid;var hgtOver=dwHgt-bodyHgt;if(hgtOver/bodyHgt>widOver/bodyWid){winHgtNew=bodyHgt-marginY;winWidNew=Math.round((winHgtNew/imgHgt)*imgWid);}
else{winWidNew=bodyWid-marginX;winHgtNew=Math.round((winWidNew/imgWid)*imgHgt);}}
else{winWidNew=imgWid;winHgtNew=imgHgt;}
return[winWidNew,winHgtNew];}
function addOverlay(showPreloader,winType){this.winType=winType;var Overlay=gId("dwOverlay");if(!Overlay){if(window.SSE&&SSE.running)SSE.pauseSS(1);var Overlay=gEl("DIV");Overlay.id="dwOverlay";Overlay.className="dwOverlay";if(this.winType=="TN"||this.winType=="SS"){var TopImage=gId("TopImage");if(TopImage){rCh(TopImage);(this.winType=="SS")?SS.TopImage=null:TN.TopImage=null;}}
aCh(Overlay);var BodyMetrics=getBodyMetrics();var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];Overlay.style.left=scrollX+"px";Overlay.style.top=scrollY+"px";if(showPreloader)Overlay.innerHTML="<div align='center' class='cancelPreload' id='CancelPreload'><img src='images/preloader.gif' class='cancelPreload' id='CancelPreloadImg' /><div><a href='javascript:DW.cancelPreloader();' class='cancelPreload' title='Stop image loading'>Cancel</a></div></div>";}
this.overlayExists=true;}
function reCenter(DW){var scrollX,scrollY,bodyWid,bodyHgt,xPos,yPos;var BodyMetrics=getBodyMetrics();var bodyWid=BodyMetrics[0];var bodyHgt=BodyMetrics[1];var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];winHgt=DW.offsetHeight;winWid=DW.offsetWidth;xPos=parseInt((bodyWid-winWid)/2+scrollX);yPos=parseInt((bodyHgt-winHgt)/2+scrollY);DW.style.left=xPos+"px";DW.style.top=yPos+"px";}
function showImg(Photo,fullSize){Photo.oncontextmenu=function(){return(Settings.preventImageTheft)?false:true;};if(this.winType=="TN"||this.winType=="SS"||this.winType=="Admin"){gId("SsTnCount").onmouseover=function(){var Numbers=this.innerHTML.split("/");this.title="Photo #"+Numbers[0]+" of "+Numbers[1];}}
if(this.winType=="TN"){Photo.title="Next enlargement";Photo.onclick=function(event){TN.nextImage(1,event);this.title="";}
gId("SsTnCount").onmouseover=function(){var Numbers=this.innerHTML.split("/");this.title="Photo #"+Numbers[0]+" of "+Numbers[1];}
TN.imgWidOld=Photo.width;TN.imgHgtOld=Photo.height;TN.preloadNext();}
else if(this.winType=="SS"){Photo.title="Next";Photo.onclick=function(event){SS.next(event);this.title="";}
gId("SsTnCount").onmouseover=function(){var Numbers=this.innerHTML.split("/");this.title="Photo #"+Numbers[0]+" of "+Numbers[1];}
SS.imgWidOld=Photo.width;SS.imgHgtOld=Photo.height;SS.preLoadNext();if(Settings.SS.audio){var nAudio=(GetCookie("audio"))?parseInt(GetCookie("audio")):0;if(nAudio&&Audio[nAudio-1]&&Audio[nAudio-1][0]){var audioFile=Audio[nAudio-1][0];SS.audioFile=audioFile;SS.MusicMenuLink=gId(audioFile);setTimeout("if( window.SS ) SS.playAudio();",1000);}}}
else{Photo.onclick=DW.removeWin;Photo.title="Click to close";}
Photo.style.cursor="pointer";showImgProperties(Photo);if(fullSize)startFade(Photo,this.transDur,0);else(IE)?Photo.style.visibility="visible":Photo.style.opacity=1;}
function keepInWin(NewWindow,leftEdge,topEdge){var BodyMetrics=getBodyMetrics();var bodyWid=BodyMetrics[0];var bodyHgt=BodyMetrics[1];var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];var winHgt=NewWindow.offsetHeight;var vScreenPos=topEdge-scrollY;var vSkew=bodyHgt-vScreenPos;if(vScreenPos<10)topEdge=10+scrollY;else if(vSkew<winHgt+10)topEdge-=winHgt-vSkew+10;var winWid=NewWindow.offsetWidth;var hScreenPos=leftEdge-scrollX;var hSkew=bodyWid-hScreenPos;if(hScreenPos<10)leftEdge=10+scrollX;else if(hSkew<winWid+10)leftEdge-=winWid-hSkew+10;if(leftEdge<11)leftEdge=10;if(topEdge<11)topEdge=10;return[leftEdge,topEdge];}
function getClickPosition(evt){var x=0,y=0;if(!evt)evt=window.event;try{var BodyMetrics=getBodyMetrics();var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];x=evt.clientX+scrollX;y=evt.clientY+scrollY;}
catch(err){x=0;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){document.onmousedown=DW.mouseDown;document.onmousemove=DW.mouseMove;document.onmouseup=DW.mouseUp;this.Window=gId("dWinID");if(IE){var borderWid=(DW.overlayExists)?0:Settings.borderWidDW;if(DW.winType=="TN"||DW.winType=="SS"){this.dWinOffsetX=event.offsetX+borderWid+DW.ssTnskewIeX;this.dWinOffsetY=event.offsetY+borderWid+DW.ssTnskewIeY;var Elem=event.srcElement,ParentElem=Elem.offsetParent;if(Elem.id=="dwTitleCenter")this.dWinOffsetX+=gId("dwTitleLeft").scrollWidth;else if(Elem.id=="SsTnTitle"||ParentElem.id=="SsTnTitle"){var CurComponent=Elem;var xPos=0,yPos=0;while(CurComponent){if(CurComponent.id=="tnTable"){yPos=CurComponent.offsetTop;xPos=CurComponent.offsetLeft;break;}
CurComponent=CurComponent.offsetParent;}
this.dWinOffsetX+=gId("dwTitleLeft").scrollWidth+gId("SsTnBackTD").scrollWidth+xPos;}
else if(Elem.id=="dwTitleRight"){var CurComponent=Elem;var xPos=0,yPos=0;while(CurComponent){if(CurComponent.id=="dwTitleRight"){yPos=CurComponent.offsetTop;xPos=CurComponent.offsetLeft;break;}
CurComponent=CurComponent.offsetParent;}
this.dWinOffsetX+=xPos;}}
else{this.dWinOffsetX=event.offsetX+borderWid+DW.skewIeX;this.dWinOffsetY=event.offsetY+borderWid+DW.skewIeY;}}
else{this.dWinOffsetX=e.layerX;this.dWinOffsetY=e.layerY;return false;}}
else if(DW.overImg&&Settings.preventImageTheft){document.onmousemove=function(){return false;}
document.onmouseup=function(){return false;}
return false;}}
function mouseMove(evt){if(!evt)evt=window.event;if(this.Window&&!OP){var ClickPos=DW.getClickPosition(evt);var BodyMetrics=getBodyMetrics();var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];if(ClickPos[0]<=0||ClickPos[1]<=0){this.Window=null;return false;}
if(IE&&evt.button!=1)return false;this.Window.style.left=(evt.clientX-this.dWinOffsetX+scrollX)+"px";this.Window.style.top=(evt.clientY-this.dWinOffsetY+scrollY)+"px";DW.moveTopImage();return false;}}
function removeWin(){var EvalOnClose=gId("EvalOnClose");if(EvalOnClose)eval(EvalOnClose.value);var Window=gId("dWinID");if(Window)rCh(Window);DW.cancelPreloader();if(window.SSE&&!SSE.running)SSE.pauseSS(0);DW.overTitleBar=false;switch(DW.winType){case "SS":if(window.SS)SS.kill();break;case "TN":if(window.TN)TN.kill();break;}
DW.otherFunctionalityOnRemoveWin();}
function moveTopImage(){var TopImage=gId("TopImage");if(TopImage){var BotImage=gId("ImageDW");var x=0;var y=0;TheElement=BotImage;var parPosAbs=false;while(TheElement){if(SF){if(!parPosAbs)parPosAbs=(TheElement.style.position=="absolute");if(parPosAbs&&TheElement==document.body)break;}
y+=TheElement.offsetTop;x+=TheElement.offsetLeft;TheElement=TheElement.offsetParent;}
var borderWid=(DW.overlayExists||OP)?0:Settings.borderWidDW;TopImage.style.left=(x+borderWid-parseInt(BotImage.parentNode.style.marginLeft))+"px";TopImage.style.top=(y+borderWid-parseInt(BotImage.parentNode.style.marginTop))+"px";}}
function mouseUp(){this.Window=null;}
function cancelEvt(evt){(evt&&evt.stopPropagation)?evt.stopPropagation():event.cancelBubble=true;}}
DW=new DynamicWindow();function DynamicMenu(){this.homePage=homePage;this.clearAll=clearAll;this.write=write;this.show=show;this.hide=hide;this.keepAlive=keepAlive;this.kill=kill;this.refreshItems=refreshItems;this.resetItems=resetItems;this.getElement=getElement;this.write();this.resetItems();function write(){document.write(Menus.join(""));}
function clearAll(){var Menus=new Array();var Tables=gTn("table");for(var i=0;i<Tables.length;i++){if(Tables[i].id&&Tables[i].id.indexOf("Menu_")==0)Menus.push(Tables[i].id);}
if(Menus.length)this.kill(Menus);}
function show(Link,menuID,menuPos,evt,xOffset,yOffset){if(!evt)evt=window.event;this.clearAll();var TheMenu=getElement(menuID);if(typeof menuPos!="number")menuPos=this.subMenuPos;this.keepAlive([menuID]);var BodyMetrics=getBodyMetrics();var bodyWid=BodyMetrics[0];var bodyHgt=BodyMetrics[1];var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];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=evt.clientX+scrollX;y=evt.clientY+scrollY;}
else{var ThisLink=Link;var parPosAbs=false;if(SF&&evt){var Target=(evt.target)?evt.target:evt.srcElement;if(Target.nodeType==3)ThisLink=ThisLink.parentNode;}
while(ThisLink){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 BodyMetrics=getBodyMetrics();var bodyWid=BodyMetrics[0];var bodyHgt=BodyMetrics[1];var menuHgt=TheMenu.offsetHeight;var vScreenPos=y-scrollY;var vSkew=bodyHgt-vScreenPos;if(vSkew<menuHgt+10)y-=menuHgt-vSkew+10;else if(vScreenPos<10)y=10+scrollY;var menuWid=TheMenu.offsetWidth;var hScreenPos=x-scrollX;var hSkew=bodyWid-hScreenPos;if(hSkew<menuWid+10)x-=menuWid-hSkew+10;else if(hScreenPos<10)x=10+scrollX;with(TheMenu.style){left=x+"px";top=y+"px";visibility="visible";}}
function hide(MenuID){var callFunction=hide.caller.toString();var delay = ( /function +kill/.test(callFunction))?0:1000;for(var i=0;i<MenuID.length;i++){var menuID=MenuID[i];if(getElement(menuID)){if(window.Menu&&eval("Menu.timer"+menuID+" == 0")&&gId(menuID).style.display!="none")eval("Menu.timer"+menuID+" = setTimeout( \"Menu.timer"+menuID+" = 0; gId( '"+menuID+"' ).style.display = 'none'; if( window.SS && '"+menuID+"'=='Menu_Music' && !SS.running ) setTimeout( 'if( window.SS ) SS.pause( false );', 500 );\", "+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])){this.keepAlive([MenuID[i]]);this.hide([MenuID[i]]);}}}
function resetItems(){var Links=document.links;for(var i=0;i<Links.length;i++){var Link=Links[i];if(Link.className=="menu"){var target=Link.target;var targetLC=target.toLowerCase();if(Link.id!="StopAudio"){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;if(Link.href==targetPage)Link.className="menuDisabled";}}}}}
function getElement(menuID){var Elem=null;if(gId(menuID))Elem=gId(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 refreshItems(Link){this.targetPage=Link.href;this.resetItems();}}
function homeInit(){var HomePage=gId("HomePage");var WebAndSoftwareTd=gId("WebAndSoftwareTd");var WebAndSoftwareContainer=gId("WebAndSoftwareContainer");var WebAndSoftwareImg=gId("WebAndSoftwareImg");WebAndSoftwareImg.alt="";if( /transparent.gif$/i.test(WebAndSoftwareImg.src))setOpacity(WebAndSoftwareImg);var BodyMetrics=getBodyMetrics();if(BodyMetrics[0]>=1200&&BodyMetrics[1]>=759){HomePage.className="home homeLg";var marginTop=Math.round((BodyMetrics[1]-659)/2);if(marginTop<0)marginTop=0;HomePage.style.marginTop=marginTop+"px";WebAndSoftwareTd.style.height="395px";WebAndSoftwareImg.src=(oldIE)?"images/homeWebSoftwareLg.jpg":"images/homeWebSoftwareLg.png";WebAndSoftwareImg.style.width="423px";WebAndSoftwareImg.style.height="79px";WebAndSoftwareImg.style.margin="315px 0px 0px 647px";gId("LinksHiRes").style.height="264px";if(macOS||IE||OP){var ContactTdHiRes=gId("ContactTdHiRes");var EstimateTdHiRes=gId("EstimateTdHiRes");EstimateTdHiRes.style.paddingTop="43px";ContactTdHiRes.style.paddingTop="38px";}}
else{HomePage.className="home homeSm";var marginTop=Math.round((BodyMetrics[1]-525)/2);if(marginTop<0)marginTop=0;HomePage.style.marginTop=marginTop+"px";WebAndSoftwareTd.style.height="314px";WebAndSoftwareImg.src=(oldIE)?"images/homeWebSoftwareSm.jpg":"images/homeWebSoftwareSm.png";WebAndSoftwareImg.style.width="335px";WebAndSoftwareImg.style.height="63px";WebAndSoftwareImg.style.margin="251px 0px 0px 515px";gId("LinksLoRes").style.height="211px";if(macOS||IE||OP){var ContactTdLoRes=gId("ContactTdLoRes");var EstimateTdLoRes=gId("EstimateTdLoRes");EstimateTdLoRes.style.paddingTop="29px";ContactTdLoRes.style.paddingTop="25px";}}}
function pageInit(){var Images=document.images;for(var i=0;i<Images.length;i++){var Img=Images[i];Img.oncontextmenu=function(){return(Settings.preventImageTheft)?false:true;}
if( Img.className == "tn" || Img.className == "tnLeft" || Img.className == "tnRight" && Img.parentNode && /a/i.test(Img.parentNode.tagName))Img.title=Msg.Enlarge;if(Img.className=="MoreInfo"){Img.onmouseover=function(){this.src="images/infoOn.gif";}
Img.onmouseout=function(){this.src="images/infoOff.gif";}}
if( /^diTn/.test(Img.className))Img.title=Msg.DavidExtSite;}
var ThumbnailsGUI=gId("ThumbnailsGUI");if(ThumbnailsGUI){window.TN=new ThumbNails();TN.displayThumbnails();var ThumbnailsProgressBar=gId("ThumbnailsProgressBar");if(ThumbnailsProgressBar)TN.updateProgressBar();}
if(fileNameLC=="default.aspx")homeInit();else{var WebAndSoftwareImg=gId("WebAndSoftwareImg");if(WebAndSoftwareImg){setOpacity(WebAndSoftwareImg);WebAndSoftwareImg.src=(oldIE)?"images/WebSoftware.jpg":"images/WebSoftware.png";}}
if(gId("EditContainer")&&window.ContentManager)CM=new ContentManager();var Links=document.links;for(var i=0;i<Links.length;i++){var Link=Links[i];var LinkComponents=Link.href.split("/");var file=LinkComponents[LinkComponents.length-1].replace(/\?|#.*/, "" ).toLowerCase();
if(file==fileNameLC&&fileNameLC!="portfolio.aspx"&&fileNameLC!="inquire.aspx"){if(Link.className=="navTopRd"){Link.className="navTopRdDisabled";Link.onmouseover=function(){this.title="";}}
if(Link.className=="navTopWh"){Link.className="navTopWhDisabled";Link.onmouseover=function(){this.title="";}}
if(Link.className=="navBot"){Link.className="navBotDisabled";Link.onmouseover=function(){this.title="";}}
if(Link.className=="navTop"){Link.className="navTopDisabled";Link.onmouseover=function(){this.title="";}}}
else{var Link=Links[i];var RequestedPath=Link.pathname.split("/");var requestedPage=RequestedPath[RequestedPath.length-1];switch(requestedPage){case "":case "void(0);":if( /phone/i.test(Link.innerHTML)){Link.title=Msg.BusCard;Link.onmouseover=function(){Menu.clearAll();}}
break;case "about-david.aspx":Link.title=Msg.About;Link.onmouseover=function(){Menu.clearAll();}
break;case "default.aspx":Link.title=Msg.Homepage;Link.onmouseover=function(){Menu.clearAll();}
break;case "estimate.aspx":Link.title=Msg.Estimate;Link.onmouseover=function(){Menu.clearAll();}
break;case "faq.aspx":Link.title=Msg.FAQ;Link.onmouseover=function(){Menu.clearAll();}
break;}}
if(Link.className=="definition")Link.title="Read brief definition of "+Link.innerHTML;}
if(window.aspError)DW.createWindow(["Internal Server Error",aspError],[0,800,0],null,null,10,[4,0,0],null,1,1);Menu=new DynamicMenu();if(userWithWritePrivileges){if(window.DB&&DB.Administrators[userWithWritePrivileges]&&!DB.Administrators[userWithWritePrivileges][2])gId("XmlMenuItem").className="off";var AdminTdLinkBot=gId("AdminTdLinkBot");if(AdminTdLinkBot){AdminTdBulletBot.className="navBulletBot";AdminTdLinkBot.className="navLink";}
var LogInLink=gId("LogInLink");if(LogInLink){LogInLink.innerHTML="Logoff";LogInLink.onmouseover=function(){if(window.Menu)Menu.clearAll();this.title=Msg.Logoff;}
LogInLink.onclick=function(){logOff();}}
if(window.DB&&DB.Administrators[userWithWritePrivileges][1]){var AdminBot=gId("AdminBot");if(AdminBot)AdminBot.className="on";}
if(window.CM)CM.initImageEditor();}
if(qStr){switch(qStr.getVal("login_failure")){case "credentials":alert("Login failed due to incorrect credentials and/or insufficient privileges");break;case "cms_disabled":alert("Due to pending site updates, I've temporarily disabled the content-managment-software. You cannot log into the site at this time.\n\n\u2022 Thanks for your patience, David...");break;}}
if(window.calReadonlyLoginFailed)alert("Login failed due to an incorrect password");switch(fileNameLC){case "estimate.aspx":gId("EstimateConsole").innerHTML=Msg.EstimateInstructions;;break;case "inquire.aspx":var Request=getAjaxRequest();if(!Request)showNoAjaxMsg();break;case "calendar.aspx":Cal.createLoginMenus();var CalMaster=gId("CalMaster");var HeaderTable=gId("HeaderTable");HeaderTable.style.width=CalMaster.offsetWidth+"px";if(window.CalAdmin)CalAdmin.scrollDownOnLogin();break;case "slide-show.aspx":SSE.writeSlideShow();if(userWithWritePrivileges)SSE.start(0);break;}
setPageValues();initDynamicIndex();}
function pageLoad(){if(window.TN)TN.initTN();switch(fileNameLC){case "calendar.aspx":var ScreenShot1=new Image();ScreenShot1.src="images/Calendar-Screen-Shot-Add-Booking.gif";var ScreenShot2=new Image();ScreenShot2.src="images/Calendar-Screen-Shot-Edit-Booking.gif";break;case "default.aspx":homeInit();setHomepageLinks();fadeInWebAndSoftware();break;case "estimate.aspx":var estWww=new Image();estWww.src="images/estWww.jpg";var estInternet=new Image();estInternet.src="images/estInternet.jpg";var estSearch=new Image();estSearch.src="images/estSearch.jpg";var estGlobeInternet=new Image();estGlobeInternet.src="images/estGlobeInternet.jpg";var estBeach=new Image();estBeach.src="images/estBeach.jpg";var estSunglasses=new Image();estSunglasses.src="images/estSunglasses.jpg";var estAddToCart=new Image();estAddToCart.src="images/estAddToCart.jpg";var estSoftware=new Image();estSoftware.src="images/estSoftware.jpg";var estCalendar=new Image();estCalendar.src="images/estCalendar.gif";var estThumbnails=new Image();estThumbnails.src="images/estThumbnails.jpg";fadeInWebAndSoftware();break;case "slide-show.aspx":fadeInWebAndSoftware();if(!userWithWritePrivileges)SSE.start(0);break;default:fadeInWebAndSoftware();}
if(qStr&&qStr.getVal("db")&&qStr.getVal("slide-show")=="y"){var nAudio=0;if(qStr.getVal("audio"))nAudio=parseInt(qStr.getVal("audio"));else if(GetCookie("audio"))nAudio=parseInt(GetCookie("audio"));launchSS(null,null,nAudio);}
initAJAX();}
function setPageValues(){var Spans=gTn("span");for(var i=0;i<Spans.length;i++){var Span=Spans[i];if( /^DB\./.test(Span.className))Span.innerHTML=eval(Span.className);}}
function fadeInWebAndSoftware(){var WebAndSoftwareContainer=gId("WebAndSoftwareContainer");if(WebAndSoftwareContainer)WebAndSoftwareContainer.style.visibility="visible";var WebAndSoftwareImg=gId("WebAndSoftwareImg");startFade(WebAndSoftwareImg,0.8,1000);}
function setHomepageLinks(){var LinksHiResTr=gId("LinksHiResTr");var LinksLoResTr=gId("LinksLoResTr");var HomePage=gId("HomePage");if(HomePage.className.indexOf("homeLg")>=0){LinksLoResTr.className="LinksLoResOff";LinksHiResTr.className="LinksHiResOn";}
else{LinksHiResTr.className="LinksHiResOff";LinksLoResTr.className="LinksLoResOn";}
gId("BottomLinks").style.visibility="visible";}
function Popup(){this.winName="davidWin";this.PrinterFriendlyContactInfo=null;this.printerFriendlyCss="";this.Win=null;this.openWin=openWin;this.closeWin=closeWin;this.linkToWin=linkToWin;function openWin(url,wType,wWid,wHgt,wPos,tBar,lBar,sBar,mBar,scBar,reSize){this.closeWin();var article=false;switch(wType){case 1:wWid=600,wHgt=500,wPos=2,tBar=0,lBar=0,sBar=0,mBar=0,scBar=1,reSize=1;break;case 2:wWid=650,wHgt=315,wPos=2,tBar=0,lBar=0,sBar=1,mBar=0,scBar=0,reSize=0;break;case 3:url="popup.aspx?img="+url+"&wid="+wWid+"&hgt="+wHgt;wWid+=140,wHgt=screen.availHeight,wPos=1;if(wWid>screen.availWidth)wWid=screen.availWidth;article=true;break;}
if(typeof wWid=="undefined"||typeof wWid==null)wWid=.8;if(typeof wHgt=="undefined"||typeof wHgt==null)wHgt=.6;if(typeof wPos=="undefined"||typeof wPos==null)wPos=1;if(typeof tBar=="undefined"||typeof tBar==null)tBar=1;if(typeof lBar=="undefined"||typeof lBar==null)lBar=1;if(typeof sBar=="undefined"||typeof sBar==null)sBar=1;if(typeof mBar=="undefined"||typeof mBar==null)mBar=1;if(typeof scBar=="undefined"||typeof scBar==null)scBar=1;if(typeof reSize=="undefined"||typeof reSize==null)reSize=1;var avWid=screen.availWidth-10;var avHgt=screen.availHeight-30;if(!article){if(wWid<1)wWid=wWid*avWid;if(wWid>avWid*0.90||wWid==1)wWid=avWid*0.90;if(wHgt<1)wHgt=wHgt*avHgt;if(wHgt>avHgt*0.70||wHgt==1)wHgt=avHgt*0.70;}
var leftPos=0;var topPos=0;switch(wPos){case 1:leftPos=parseInt((avWid-wWid)/2);break;case 2:leftPos=parseInt((avWid-wWid)/2);topPos=parseInt((avHgt-wHgt)/2);break;}
this.Win=window.open(url,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 closeWin(){try{if(this.Win&&this.Win.open&&!this.Win.closed){this.Win.close();this.Win=null;}}
catch(e){}}
function linkToWin(){if(Popup&&Popup.Win&&Popup.Win.registered){if(Popup.Win.MyOpener!=self)Popup.Win.MyOpener=self;}
else setTimeout("Popup.linkToWin()",250);}} Popup=new Popup();function initDynamicIndex(){DI=new DynamicIndex();DI.writeImageLayout();DI.setEventHandlers();DI.maintainState();DI.initialized=true;}
function DynamicIndex(){this.initialized=false;this.MsgDI=new Array();this.MsgDI.Show="Show content";this.MsgDI.Hide="Hide content";this.editImgTableLayout=editImgTableLayout;this.getImageTableData=getImageTableData;this.getPlusMinus=getPlusMinus;this.onClickMore=onClickMore;this.collapseOthers=collapseOthers;this.switchDisplay=switchDisplay;this.showTip=showTip;this.maintainState=maintainState;this.setEventHandlers=setEventHandlers;this.writeImageLayout=writeImageLayout;this.imgLayoutPage=(window.SettingsDI);function writeImageLayout(){if(this.imgLayoutPage){var nRecords=0;var Htm=new Array();var Divs=gTn("div");for(var i=0;i<Divs.length;i++){var DivRecord=Divs[i];if( /^Record$/.test(DivRecord.className)){Htm[nRecords]=new Array();var Div=DivRecord.firstChild;while(Div){if( Div.tagName && /div/i.test(Div.tagName)){var htm=Div.innerHTML.trim();Htm[nRecords].push(htm);}
Div=Div.nextSibling;}
nRecords++;}}
var Out=new Array();var rowNum=0;var imagesPerRow=SettingsDI.imagesPerRow;for(var i=0;i<nRecords;i++){var newRow=(i%imagesPerRow==0);if(newRow){Out.push("<table align='center'");if(i>0){Out.push(" style='margin-top:");Out.push(SettingsDI.verticalSpacingPx);Out.push("px;'");}
Out.push(">\n");Out.push("\t<tbody>\n");Out.push("\t\t<tr align='center'>\n");for(var j=rowNum;j<rowNum+imagesPerRow;j++){if(j>=nRecords)break;Out.push("\t\t\t<td class='diSpacer'>\n");Out.push("\t\t\t\t");Out.push(Htm[j][0]);Out.push("\n");Out.push("\t\t\t</td>\n");}
Out.push("\t\t</tr>\n");Out.push("\t\t<tr align='center'>\n");for(var j=rowNum;j<rowNum+imagesPerRow;j++){if(j>=nRecords)break;Out.push("\t\t\t<td class='diSpacer'>\n");Out.push("\t\t\t\t<div class='diCaptionOff'>\n");Out.push("\t\t\t\t\t");Out.push(Htm[j][1]);Out.push("\n");Out.push("\t\t\t\t</div>\n");Out.push("\t\t\t</td>\n");}
Out.push("\t\t</tr>\n");if(rowNum%imagesPerRow==0){Out.push("\t</tbody>\n");Out.push("</table>\n\n");Out.push("<table align='center'");Out.push(" style='width:");Out.push(SettingsDI.verbiageWidthPx);Out.push("px;'");Out.push(">\n");Out.push("\t<tbody>\n");Out.push("\t\t<tr>\n");Out.push("\t\t\t<td>\n");for(var j=rowNum;j<rowNum+imagesPerRow;j++){if(j>=nRecords)break;Out.push("\t\t\t\t<div class='diContent diContentBkgOn'>\n");Out.push("\t\t\t\t\t");Out.push(Htm[j][2]);Out.push("\n");Out.push("\t\t\t\t</div>\n");}
Out.push("\t\t\t</td>\n");Out.push("\t\t</tr>\n");Out.push("\t</tbody>\n");Out.push("</table>\n\n");}}
rowNum++;}
var out=Out.join("");out=out.trim();var OutputDI=gId("OutputDI");if(0){var Textarea=gEl("textarea");Textarea.style.width="1200px";Textarea.style.height="600px";Textarea.style.marginTop="20px";Textarea.value=out.replace(/\t/g, "  " );
OutputDI.innerHTML=out;OutputDI.appendChild(Textarea);}
else{out=out.replace(/\t/g, "" );
out=out.replace(/\n/g, "" );
OutputDI.innerHTML=out;}}}
function onClickMore(Link,evt){}
function setEventHandlers(){try{var AllLinks=gTn("a");for(var i=0;i<AllLinks.length;i++){var Link=AllLinks[i];if(AllLinks[i].className=="diHeading"){var PlusMinusLink=Link.previousSibling;while(PlusMinusLink){if( PlusMinusLink.tagName && /a/i.test(PlusMinusLink.tagName))break;PlusMinusLink=PlusMinusLink.previousSibling;}
PlusMinusLink.href="javascript:void(0);";PlusMinusLink.className="diPlusMinus";PlusMinusLink.onclick=function(event){if(window.DI){DI.onClickMore(this.nextSibling,event);DI.switchDisplay(this.nextSibling);}}
PlusMinusLink.onmouseover=function(){if(window.DI)DI.showTip(this.nextSibling);return true;}
Link.href="javascript:void(0);";Link.onmouseover=function(){if(window.DI)DI.showTip(this);return true;}
if(this.imgLayoutPage)Link.onclick=function(event){if(window.DI){DI.editImgTableLayout(this);}}
else
Link.onclick=function(event){if(window.DI){DI.onClickMore(this,event);DI.switchDisplay(this);}}}}
self.status="";}
catch(Err){if(local){var err="";for(member in Err)err+=member+": "+Err[member]+"\n";alert("Exception at DI.setEventHandlers:\n\n"+err);}
else{self.status="Initializing DI.setEventHandlers() method, one moment please...";setTimeout("DI.setEventHandlers();",250);}}}
function maintainState(){try{var diState=GetCookie(fileNameLC);if(diState){var AllLinks=gTn("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{if(this.imgLayoutPage)this.editImgTableLayout(AllLinks[i]);else
this.switchDisplay(AllLinks[i]);}
catch(e){};}}}}
self.status="";}
catch(Err){if(local){var err="";for(member in Err)err+=member+": "+Err[member]+"\n";alert("Exception at DI.maintainState so \u201C"+fileNameLC+"\u201D cookie deleted:\n\n"+err);}
else{self.status="Initializing DI.maintainState() method, one moment please...";setTimeout("DI.maintainState();",250);}
DeleteCookie(fileNameLC);}}
function getPlusMinus(Link){var PlusMinusLink=Link.previousSibling;while(PlusMinusLink){if( PlusMinusLink.tagName && /a/i.test(PlusMinusLink.tagName))break;PlusMinusLink=PlusMinusLink.previousSibling;}
return PlusMinusLink;}
function switchDisplay(Link,Img,Content,Caption){var PlusMinus=getPlusMinus(Link);var expanding=(PlusMinus.innerHTML=="+"),contracting=!expanding;if(Caption)Caption.className=(expanding)?"diCaptionOn":"diCaptionOff";if(Img)Img.className=(expanding)?"diTnOn":"diTnOff";PlusMinus.innerHTML=(expanding)?"-":"+";var AllLinks=gTn("a");var valOld=GetCookie(fileNameLC),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(fileNameLC):SetCookie(fileNameLC,valNew);}
break;}
if(expanding)valNew=valOld+i+"_";}
else if(expanding)valNew="_"+i+"_";if(valNew)SetCookie(fileNameLC,valNew);break;}}
if(!Content){var Content=Link.nextSibling;while(Content){if( Content.tagName && /div/i.test(Content.tagName))break
Content=Content.nextSibling;}}
try{Content.style.display=(contracting)?"none":"block";}
catch(Err){if(local){var err="";for(member in Err)err+=member+": "+Err[member]+"\n";alert("Exception at DI.switchDisplay so \u201C"+fileNameLC+"\u201D cookie deleted:\n\n"+err);}
DeleteCookie(fileNameLC);}
if(this.imgLayoutPage&&this.initialized&&expanding){var ContentTd=Content.parentNode;while(ContentTd){if( ContentTd.tagName && /td/i.test(ContentTd.tagName))break;ContentTd=ContentTd.parentNode;}
var Focuser=gEl("a");Focuser.href="javascript:void(0)";Focuser.innerHTML=".";ContentTd.appendChild(Focuser);Focuser.focus();Link.focus();ContentTd.removeChild(Focuser);}
this.showTip(Link);}
function showTip(Link,msgOn,msgOff){var PlusMinus=getPlusMinus(Link);if(PlusMinus.innerHTML=="+"){Link.title=(msgOn)?msgOn:this.MsgDI.Show;PlusMinus.title=(msgOn)?msgOn:this.MsgDI.Show;}
else{Link.title=(msgOff)?msgOff:this.MsgDI.Hide;PlusMinus.title=(msgOff)?msgOff:this.MsgDI.Hide;}}
function editImgTableLayout(Link){var ImageData=this.getImageTableData(Link);this.collapseOthers(Link,ImageData);var nCellClicked=ImageData[0];var ImgArr=ImageData[2];var Img=ImgArr[nCellClicked];var CaptionArr=ImageData[3];var Caption=CaptionArr[nCellClicked];var DivContentArr=ImageData[4];var Content=DivContentArr[nCellClicked];this.switchDisplay(Link,Img,Content,Caption);}
function collapseOthers(Link,ImageData){var nCellClicked=ImageData[0];var Td=ImageData[1];var ImgArr=ImageData[2];var CaptionArr=ImageData[3];var ContentArr=ImageData[4];var nCell=0;while(Td){if(nCellClicked!=nCell){var DivCaption=Td.firstChild,LinkOther=null;outer:while(DivCaption){if( DivCaption.tagName && /div/i.test(DivCaption.tagName)){LinkOther=DivCaption.lastChild;while(LinkOther){if( LinkOther.tagName && /a/i.test(LinkOther.tagName)){break outer;}
LinkOther=LinkOther.previousSibling;}}
DivCaption=DivCaption.nextSibling;}
if(LinkOther){var PlusMinusLink=this.getPlusMinus(LinkOther);PlusMinusLink.innerHTML="-";this.switchDisplay(LinkOther,ImgArr[nCell],ContentArr[nCell],CaptionArr[nCell]);}
else{DeleteCookie(fileNameLC);if(local){alert("ERROR: DI.collapseOthers unable to locate link so \u201C"+fileNameLC+"\u201D cookie deleted:");return;}}}
var Td=Td.nextSibling;while(Td){if( Td.tagName && /td/i.test(Td.tagName))break;Td=Td.nextSibling;}
nCell++;}}
function getImageTableData(Link){var ImgArr=new Array(),TdFirst=null,CaptionArr=new Array(),ContentArr=new Array(),nCellClicked=-1;var Tr=null;var Parent=Link.parentNode,Table=null;while(Parent){if(Parent.tagName){if( /td/i.test(Parent.tagName))nCellClicked=Parent.cellIndex;if( /tr/i.test(Parent.tagName))Tr=Parent;if( /table/i.test(Parent.tagName)){Table=Parent;break;}}
Parent=Parent.parentNode;}
var Td=Tr.firstChild;while(Td){if( Td.tagName && /td/i.test(Td.tagName)){if(!TdFirst)TdFirst=Td;var DivCaption=Td.firstChild;while(DivCaption){if( /div/i.test(DivCaption.tagName ) && /^diCaption/.test(DivCaption.className))CaptionArr.push(DivCaption);DivCaption=DivCaption.nextSibling;}}
Td=Td.nextSibling;}
var TrImages=Tr.previousSibling;while(TrImages){if( TrImages.tagName && /tr/i.test(TrImages.tagName)){var TdImages=TrImages.firstChild;while(TdImages){if( TdImages.tagName && /td/i.test(TdImages.tagName)){var LinkImages=TdImages.firstChild;while(LinkImages){if( LinkImages.tagName && /a/i.test(LinkImages.tagName)){var Img=LinkImages.firstChild;while(Img){if( Img.tagName && /img/i.test(Img.tagName))ImgArr.push(Img);Img=Img.nextSibling;}}
LinkImages=LinkImages.nextSibling;}}
TdImages=TdImages.nextSibling;}}
TrImages=TrImages.previousSibling;}
var TableContent=Table.nextSibling;while(TableContent){if( TableContent.tagName && /table/i.test(TableContent.tagName)){var TbodyContent=TableContent.firstChild;while(TbodyContent){if( TbodyContent.tagName && /tbody/i.test(TbodyContent.tagName)){var TrContent=TbodyContent.firstChild;while(TrContent){if( TrContent.tagName && /tr/i.test(TrContent.tagName)){var TdContent=TrContent.firstChild;while(TdContent){if( TdContent.tagName && /td/i.test(TdContent.tagName)){var DivContent=TdContent.firstChild;while(DivContent){if( DivContent.tagName && /div/i.test(DivContent.tagName))ContentArr.push(DivContent);DivContent=DivContent.nextSibling;}}
TdContent=TdContent.nextSibling;}}
TrContent=TrContent.nextSibling;}}
TbodyContent=TbodyContent.nextSibling;}}
TableContent=TableContent.nextSibling;}
return[nCellClicked,TdFirst,ImgArr,CaptionArr,ContentArr];}}
function ToolTip(){this.delay=500;this.ActiveTip=null;this.delayTimer=0;this.x=0;this.y=0;this.displayIt=displayIt;this.showIt=showIt;this.removeAll=removeAll;this.setPosition=setPosition;function showIt(tip,evt,delay){this.setPosition(evt);this.tip=tip.replace(/ +<> +/g, "<span class='TooltipBullet'>&#149;</span>" );
delay=(typeof delay=="number")?delay:this.delay;this.delayTimer=setTimeout("if( window.Tip ) Tip.displayIt();",delay);}
function setPosition(evt){if(!evt)evt=window.event;var BodyMetrics=getBodyMetrics();var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];this.x=evt.clientX+scrollX;this.y=evt.clientY+scrollY;}
function displayIt(){this.removeAll();this.ActiveTip=gEl("span");this.ActiveTip.id="ToolTip";this.ActiveTip.className="ToolTip";this.ActiveTip.innerHTML=this.tip;aCh(this.ActiveTip);var BodyMetrics=getBodyMetrics();var bodyWid=BodyMetrics[0];var bodyHgt=BodyMetrics[1];var scrollX=BodyMetrics[2];var scrollY=BodyMetrics[3];this.ActiveTip.style.left=(screen.width*-1)+"px";this.ActiveTip.style.top=(screen.height*-1)+"px";var tipWid=this.ActiveTip.offsetWidth;var hScreenPos=this.x-scrollX;var hSkew=bodyWid-hScreenPos;if(hSkew<tipWid+10)this.x=this.x-tipWid+hSkew-5;var marTop=22;var tipHgt=this.ActiveTip.offsetHeight;var vScreenPos=this.y-scrollY;var vSkew=bodyHgt-vScreenPos;if(vSkew<tipHgt+marTop+5)this.y=this.y-tipHgt-marTop-10;this.ActiveTip.style.left=(this.x)+"px";this.ActiveTip.style.top=(this.y+marTop)+"px";this.ActiveTip.style.visibility="visible";}
function removeAll(){clearTimeout(this.delayTimer);var ToolTipsOld=gId("ToolTip");while(ToolTipsOld){rCh(ToolTipsOld);ToolTipsOld=gId("ToolTip");}}}
var Tip=new ToolTip();function writeDataFile(){var dataFile=(qStr&&qStr.getVal("db"))?qStr.getVal("db"):"";var cacheBuster=(local||userWithWritePrivileges)?"?CacheBuster="+Math.random():"";if(dataFile)document.write("<scr"+"ipt language='javascript1.2' src='"+dataFile+cacheBuster+"'><\/scr"+"ipt>");else
alert("Error at function writeDataFile, dataFile is undefined.");}
function getRequestBody(Form){function encodeNameAndValue(theName,theValue){var output=encodeURIComponent(theName);output+="=";output+=encodeURIComponent(theValue);return output;}
var NameVals=new Array();for(var i=0;i<Form.elements.length;i++){var Field=Form.elements[i];switch(Field.type){case "button":case "submit":case "reset":break;case "checkbox":case "radio":if(!Field.checked)break;case "text":case "hidden":case "password":NameVals.push(encodeNameAndValue(Field.name,Field.value));break;case "textarea":var val=Field.value.replace(/\r/g, "" ).replace(/\n/g, "\r\n" );
NameVals.push(encodeNameAndValue(Field.name,val));break;case "select-one":NameVals.push(encodeNameAndValue(Field.name,Field.options[Field.selectedIndex].value));break;case "select-multiple":break;default:NameVals.push(encodeNameAndValue(Field.name,Field.value));}}
return NameVals.join("&");}
function logIn(Form){var pwChecked=Form.remember_pw.checked;var UserName=Form.user;var userNameCM=UserName.value.trim();UserName.value=userNameCM;var PW=Form.pw;var pwCM=PW.value.trim();PW.value=pwCM;if(userNameCM==""){UserName.focus();return false;}
var pwOut="";if(pwCM==""){PW.focus();return false;}
else if(pwChecked){var pwIn=pwCM;for(var i=0;i<=pwIn.length;i++)pwOut=pwIn.charAt(i)+pwOut;}
if(pwChecked){"Login_CM".recordToCookie("user",userNameCM,expDate12Mon);"Login_CM".recordToCookie("pw",pwOut,expDate12Mon);}
else
DeleteCookie("Login_CM");return true;}
function togglePassword(Link){var TextboxParent=Link.parentNode.nextSibling;var Textbox=TextboxParent.firstChild;var textboxType=Textbox.type;Link.className=(Link.className=="pw")?"pwOn":"pw";var textboxTypeNew = ( /password/i.test(textboxType))?"text":"password";try{Textbox.type=textboxTypeNew;Textbox.focus();}
catch(Err){var TextboxNew=gEl("input");TextboxNew.type=textboxTypeNew;TextboxNew.name=Textbox.name;TextboxNew.id=Textbox.id;TextboxNew.autocomplete=Textbox.autocomplete;TextboxNew.value=Textbox.value;TextboxNew.className=Textbox.className;TextboxNew.title=Textbox.title;TextboxParent.removeChild(Textbox);TextboxParent.appendChild(TextboxNew);setTimeout("gId( 'pw' ).focus();",100);}}
function showPasswordTip(Link){var Textbox=Link.parentNode.nextSibling.firstChild;Link.title = ( /text/i.test(Textbox.type))?"Hide password characters":"Show password characters";}
function getLogInGUI(){var Login_CM=GetCookie("Login_CM"),userNameCM="",pwCM="",pwChecked="",pwOut="";if(Login_CM){userNameCM=Login_CM.getVal("user");pwCM=Login_CM.getVal("pw");for(var i=0;i<=pwCM.length;i++)pwOut=pwCM.charAt(i)+pwOut;pwChecked=" checked";}
var Htm=new Array();if(gId("EditContainer"))Htm.push("<form name='LogIn' style='margin:0px;' method='post' onSubmit='return logIn( this );'>");else{Htm.push("<form name='LogIn' style='margin:0px;' method='get' action='");Htm.push(fileNameLC.replace(/\.aspx$/, ".admin.aspx" ) );
Htm.push("'>");}
Htm.push("<table align='center'>");Htm.push("<tr>");Htm.push("<td>");Htm.push("<table align='center'>");Htm.push("<tr>");Htm.push("<td class='cmField' style='padding-top:6px;'>");Htm.push("User Name");Htm.push("</td>");Htm.push("<td class='cmValue' style='padding-top:6px;' id='tdBookingID'>");Htm.push("<input type='text' name='user' class='cmText' onMouseover='this.title=Msg.User;' value='");Htm.push(userNameCM);Htm.push("' />");Htm.push("</td>");Htm.push("</tr>");Htm.push("<tr>");Htm.push("<td class='cmField' style='padding-top:6px;'>");Htm.push("<a href='javascript:void(0);' onClick='togglePassword( this ); showPasswordTip( this );' onMouseover='showPasswordTip( this );' tabindex='-1' class='pw'>Password</a>");Htm.push("</td>");Htm.push("<td class='cmValue' style='padding-top:6px;' id='tdBookingID'>");Htm.push("<input type='");(live)?Htm.push("password"):Htm.push("text");Htm.push("' name='pw' id='pw' autocomplete='off' value='");Htm.push(pwOut);Htm.push("' class='cmText' onMouseover='this.title=Msg.PW;' />");Htm.push("</td>");Htm.push("</tr>");Htm.push("<tr>");Htm.push("<td align='center' colspan='2' class='cmValue' style='padding-top:6px; white-space:nowrap;'>");Htm.push("<input type='checkbox' id='remember_pw' onMouseover='this.title=Msg.RememberMe;' name='remember_pw' onClick='if( !checked ) DeleteCookie( \"Login_CM\" );'");Htm.push(pwChecked);Htm.push(" /><label for='remember_pw'> Remember Me</label>");Htm.push("</td>");Htm.push("</tr>");Htm.push("<tr>");Htm.push("<td align='center' colspan='2' style='padding:10px 0px 0px 0px; white-space:nowrap;'>");Htm.push("<input type='submit' name='OK' value='OK' class='logInButtons' />");Htm.push("<input type='button' value='Cancel' class='logInButtons' onClick='DW.removeWin();' />");Htm.push("</td>");Htm.push("</tr>");Htm.push("</table>");Htm.push("</td>");Htm.push("</tr>");Htm.push("</table>");Htm.push("</form>");var htm=Htm.join("");DW.createWindow(["Administrator Login",htm],[0,300,0],null,null,6,[4,0,0],null,1);if(Login_CM)setTimeout("document.LogIn.OK.focus();",100);else
setTimeout("document.LogIn.user.focus();",100);}
function logOff(){var url="";if(window.CM){clearTimeout(CM.timer);url=fileNameLC+"?logoff=yes"
if(qStr&&qStr.getVal("db"))url+="&db="+qStr.getVal("db");}
else
url=homePage+"?logoff=yes";document.location.replace(url);}
function ProgressBar(){this.nBarsDefault=10;this.barOffColorDefault="rgb( 204,204,204 )";this.barOnColorDefault="rgb( 204,0,0 )";this.barActiveWidDefault="6px";this.barInactiveWidDefault="4px";this.barFontSizeDefault="12pt";this.nBars;this.barOffColor;this.barOnColor;this.barActiveWid;this.barInactiveWid;this.barFontSize;this.speed=150;this.progressTimer=0;this.ActiveBars=null;this.cellIndexOn=0;this.getProgressBar=getProgressBar;this.initProgressBar=initProgressBar;this.showProgress=showProgress;this.stopProgress=stopProgress;function getProgressBar(nBars,barOffColor,barOnColor,barInactiveWid,barActiveWid,barFontSize){this.nBars=(nBars)?nBars:this.nBarsDefault;this.barOffColor=(barOffColor)?barOffColor:this.barOffColorDefault;this.barOnColor=(barOnColor)?barOnColor:this.barOnColorDefault;this.barInactiveWid=(barInactiveWid)?barInactiveWid:this.barInactiveWidDefault;this.barActiveWid=(barActiveWid)?barActiveWid:this.barActiveWidDefault;this.barFontSize=(barFontSize)?barFontSize:this.barFontSizeDefault;var Htm=new Array();Htm.push("<table style=\"cursor:hand;\" id=\"ProgressBar\">");Htm.push("<tbody>");Htm.push("<tr>");for(var i=0;i<this.nBars*2-1;i++){Htm.push("<td style=\"font-size:");Htm.push(this.barFontSize);Htm.push(";");if(i%2){Htm.push("width:");Htm.push(this.barInactiveWid);Htm.push(";");Htm.push("\"></td>");}
else{Htm.push("width:");Htm.push(this.barActiveWid);Htm.push(";");Htm.push("background-color:");Htm.push(this.barOffColor);Htm.push(";");Htm.push("\">&nbsp;</td>");}}
Htm.push("</tr>");Htm.push("</tbody>");Htm.push("</table>");var htm=Htm.join("");return htm;}
function initProgressBar(){this.ActiveBars=new Array();var ProgressBar=gId("ProgressBar");var Td=ProgressBar.firstChild.firstChild.firstChild;while(Td){this.ActiveBars.push(Td);Td=(Td.nextSibling&&Td.nextSibling.nextSibling)?Td.nextSibling.nextSibling:null;}
this.stopProgress();this.showProgress();}
function showProgress(){if(gId("ProgressBar")){if(this.cellIndexOn==this.ActiveBars.length){for(var i=0;i<this.ActiveBars.length;i++)this.ActiveBars[i].style.backgroundColor=this.barOffColor;this.cellIndexOn=0;}
else{this.ActiveBars[this.cellIndexOn].style.backgroundColor=this.barOnColor;this.cellIndexOn++;}
this.progressTimer=setTimeout("try{ PB.showProgress(); } catch( Err ) {}",this.speed);}}
function stopProgress(){clearTimeout(this.progressTimer);this.cellIndexOn=0;for(var i=0;i<this.ActiveBars.length;i++)this.ActiveBars[i].style.backgroundColor=this.barOffColor;}}
PB=new ProgressBar();if(live&&!GetCookie("theReferrer")){var refPageQstr=(qStr&&qStr.indexOf("ref=")==0)?qStr.split("ref=")[1]:"";if(refPageQstr)SetCookie("theReferrer",refPageQstr,null,"/");else{var refPage="";try{refPage=document.referrer;}
catch(E){refPage="Blocked";}
var refPageLC=refPage.toLowerCase();SetCookie("theReferrer",refPage,null,"/");}}
function showDefinition(Link,evt,key,wid){var Data=eval("window."+key);var dwWid=(wid)?wid:400;(Data)?DW.createWindow(Data,[0,dwWid,0],Link,evt,10):alert("\u201C"+key+"\u201D is undefined");}
function showHelp(TheLink,evt){DW.createWindow("nextSibling",[0,500,0],TheLink,evt,10,[4,0,0],"",1,1);}
function updateDemoConsole(){var TextBox=gId("TextBox");var DemoConsole=gId("DemoConsole");var newText=TextBox.value;newText=newText.replace(/\r/g, "" );newText=newText.replace(/<br\/>/g, "" );
newText=newText.replace(/\n{3,}/g, "\n\n" );
newText=newText.replace(/\n\n/g, "p_a_r_a_g_r_a_p_h" );
newText=newText.replace(/\n/g, "<br/>\n" );
newText=newText.replace(/p_a_r_a_g_r_a_p_h/g, "<br/><br/>\n\n" );
DemoConsole.innerHTML=newText;TextBox.value=newText;}