// Web software by DavidRegier.com
testEmail="David"+"@DavidRegier.com";IE=false,oldIE=false,AOL=false,SF=false,MZ=false,OP=false;if(navigator.appName=="Microsoft Internet Explorer"){IE=true;if(navigator.userAgent.indexOf("AOL")>=0)AOL=true;if(parseFloat(navigator.userAgent.split("MSIE")[1])<=6)oldIE=true;}
else if(navigator.userAgent.indexOf("Safari")>=0)SF=true;else if(navigator.appName=="Netscape")MZ=true;else if(navigator.appName=="Opera")OP=true;winOS=(navigator.platform.substring(0,3)=="Win");macOS=(navigator.platform.substring(0,3)=="Mac");theHost=document.location.hostname;local = ( /^\d+\.\d+\.\d+\.\d+$/.test(theHost)||theHost==""||theHost=="localhost");live=!local;emailRE=/^[\w\.-]*[^\.-]@[\w\.-]+\.[a-zA-Z]{2,}$/;qStr=unescape(document.location.search).substring(1);homePage="start.html"
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];fileNameLC=fileName.toLowerCase();Settings=new Array();Settings.transDur=.8;Settings.folder="images/";Settings.defaultCaption="Farewell From Creative Touch Photography";Settings.borderWidDW=1;Settings.disableContextImgMenu=0;Settings.SS=new Array();Settings.SS.speed=4.5;Settings.SS.randomStart=0;Settings.SS.audio=1;Settings.SS.audioFolder="http://www.mauiart.info/webdesign/audio/";if(local)Settings.SS.randomStart=0;Settings.TN=new Array();Settings.TN.ProgressBar=new Array();Settings.TN.ProgressBar.hideOnSuccess=1;Settings.TN.ProgressBar.width=300;Settings.TN.ProgressBar.progressColor="rgb( 178,0,0 )";Settings.TN.ProgressBar.bgColor="rgb( 153,102,51 )";Settings.TN.ProgressBar.fontColor="rgb( 255,255,255 )";Settings.TN.bordColOff="rgb( 0,0,0 )";Settings.TN.bordColOn="rgb( 204,204,204 )";Settings.TN.pageTitle="";Settings.TN.align="center";Settings.TN.nImagesRow=4;Settings.TN.width=150;Settings.TN.height=150;Images=new Array(["FredericoTheFrog.jpg","Frederico The Frog","FredericoTheFrogTNB.jpg"],["CoconutChristmas16x20_4356.jpg","Coconut Christmas <> 2009","CoconutChristmas16x20_4356SM.JPG"],["Plumeria.jpg","Prafulla","PlumeriaSM.jpg"],["Orchid.jpg","Juanita&rsquo;s Passion"],["Lily.jpg","&ldquo;Here&rsquo;s Looking at You Kid&rdquo;","LilyTNB.jpg"],["Stanley.jpg","Stanley <> In Loving Memory Of Stan Lynch","StanleyTNB.jpg"],["Little-Miss-Sunshine.jpg","Little Miss Sunshine","LittleMissSunshineTNB.jpg"],["Summer-of-08.jpg","Summer of 08","Watermelon_3312TNB.jpg"],null);var Audio=new Array(["KaulanaWailuaAoMolokai.mp3","Kaulana Waialua a&acute;o Molokai <> Amy Gilliom"],["03Maunaleo.mp3","Maunaleo <> Jamie Lawrence"],["09TheRestOfYourLife.mp3","Rest Of Your Life <> Jamie Lawrence"],["10WhenYouSayNothingAtAll.mp3","You Say Nothing <> Jamie Lawrence"],["13KaWaiLehuaAalaKaHonua.mp3","Ka Wai Lehua <> Jamie Lawrence"],["19CrossMyHeart.mp3","Cross My Heart <> Jamie Lawrence"],["AllOrNothing.mp3","All Or Nothing <> Jamie Lawrence"],["TheRoadThatNeverEnds.mp3","Road Never Ends <> Jamie Lawrence"],["Unforgettable.mp3","Unforgettable <> Jamie Lawrence"],["GentlePersuasion.mp3","Gentle Persuasion"],["GentleHarp.mp3","A Harp Song"],["LoversTheme.mp3","Mellow Jazz"],null);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()+(24*60*60*365*1000));userWithWritePrivileges=GetCookie("userWithWritePrivileges");if(userWithWritePrivileges)userWithWritePrivileges=userWithWritePrivileges.replace(/_/, " " );
if(userWithWritePrivileges||local)Settings.disableContextImgMenu=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 PreLoader(){var Files=new Array();Files.push("images/ssHomeRedRosesCollage.jpg");Files.push("images/pauseSsOff.gif");Files.push("images/pauseSsOn.gif");Files.push("images/pauseSsPaused.gif");Files.push("images/FredericoTheFrog.jpg");Files.push("images/CoconutChristmas16x20_4356.jpg");Files.push("images/KitsBoots01.jpg");Files.push("images/In-The-Raw.jpg");Files.push("images/Orchid.jpg");Files.push("images/Lily.jpg");Files.push("images/Stanley.jpg");Files.push("images/Summer-of-08.jpg");Files.push("images/Little-Miss-Sunshine.jpg");this.Files=Files;this.debug=0;try{if(top.qStr&&top.qStr.indexOf("preloader=show")!=-1)this.debug=1;}
catch(Err){}
if(this.debug)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.run=run;this.nFileErrors=0;function run(){this.Request=getAjaxRequest();clearTimeout(PL.timer);if(this.Request){if(PL.debug&&!document.getElementById("PreloaderWin")){DW.createWindow(["<div id=\"ProgressBarContainer\" align=\"center\" style=\"margin:5px 0px 5px 0px;\">"+PB.getProgressBar()+"</div>","<div id='PreloaderWin' style='margin:15px 20px 15px 20px;'></div>"],[1,700,350],null,null,0,[4,0,0],null,0);PB.initProgressBar();}
if(this.nFilesCached<this.Files.length){this.Request.onreadystatechange=function(){try{if(PL.Request.readyState==4){if(PL.debug){var PreloaderWin=document.getElementById("PreloaderWin");if(PreloaderWin){var endRequestTime=new Date().getTime();var elapsedTimeSec=(endRequestTime-PL.begRequestTime)/1000;elapsedTimeSec=elapsedTimeSec.toFixed(3);var fileSize=Math.round(PL.Request.getResponseHeader("Content-Length")/1024);if(fileSize==0)fileSize=1;if(PL.Request.status==200||PL.Request.status==304)PreloaderWin.innerHTML+=": "+fileSize+" KB cached in "+elapsedTimeSec+" seconds<br/>";else if(PL.Request.status){PreloaderWin.innerHTML+=": <span style='color:red;'>Error #"+PL.Request.status+" ("+PL.Request.statusText+") in "+elapsedTimeSec+" seconds</span><br/>";PL.nFileErrors++;}
if(PL.nFilesCached==PL.Files.length-1){var totalElapsedTimeSec=(endRequestTime-PL.firstRequestTime)/1000;var plural=(PL.nFileErrors==1)?"":"s";document.getElementById("ProgressBarContainer").innerHTML=(PL.Files.length-PL.nFileErrors)+" Files Cached in "+totalElapsedTimeSec.toFixed(1)+" Seconds &nbsp;&#149;&nbsp; "+PL.nFileErrors+" Error"+plural;}}}
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.debug)alert(eMsg);} catch(Err){}}}
this.Request.open("GET",this.Files[this.nFilesCached],true);this.Request.send(null);if(PL.debug){this.begRequestTime=new Date().getTime();if(PL.nFilesCached==0)this.firstRequestTime=this.begRequestTime;var PreloaderWin=document.getElementById("PreloaderWin");if(PreloaderWin)PreloaderWin.innerHTML+=(PL.nFilesCached+1)+". "+PL.Files[PL.nFilesCached];}}}
else if(PL.debug)alert("Error at PL.run: Browser unable to make an AJAX request");}} PL=new PreLoader();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){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();return str.replace(/^\s*|\s*$/g, "" );}
String.prototype.trim=trim;Msg=new Array();Msg.SsAudio="Play a song";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(){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(){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);}
FadeObj.style.visibility="visible";}}
fileNameErr=false;function checkImgName(imgFileName){var rePattern=/\s+/g;if( !fileNameErr && rePattern.test(imgFileName)){fileNameErr=true;alert("An image file named \""+imgFileName+"\" contains forbidden white-space characters.");}}
function getPhotoCaption(captionIn,imgFileName){if(!captionIn)captionIn="";var captionOut=captionIn.trim();if(captionOut){captionOut=captionOut.replace(/\[/g, "<div class=dwTitleLine2>" ).replace(/]/g, "</div>" );
captionOut=captionOut.replace(/<>/g, "<span class=dwBullet>&#149;</span>" );
captionOut=captionOut.replace(/'/g, "&#39;" );
if(window.Settings&&Settings.defaultCaption&&captionOut=="*")captionOut=Settings.defaultCaption;else if(imgFileName&&captionOut=="_")captionOut=imgFileName;}
return captionOut;}
function initImagesArr(){try{Images.pop();for(var i=0;i<Images.length;i++)checkImgName(Images[i][0]);}
catch(Err){alert("Images array cannot be initialized because the data it contains is malformed (bad syntax)");}}
function showImgInfo(ThePhoto,evt,wid,hgt){if(userWithWritePrivileges){var Photo=getAjaxRequest();if(Photo){var Img=null;Img=[ThePhoto.src.replace(/.*\//, "" ),
ThePhoto.style.width.replace(/\D/g, "" ),
ThePhoto.style.height.replace(/\D/g, "" ),
DW.title];Photo.onreadystatechange=function(){try{if(Photo.readyState==4){if(Photo.status==200||Photo.status==304){this.ImgOffscreen=document.getElementById("ImgOffscreenLg");if(this.ImgOffscreen)document.body.removeChild(this.ImgOffscreen);this.ImgOffscreen=document.createElement("IMG");this.ImgOffscreen.id="ImgOffscreen";this.ImgOffscreen.style.position="absolute";this.ImgOffscreen.style.top="-1000000px";this.ImgOffscreen.style.left="-1000000px";document.body.appendChild(this.ImgOffscreen);this.ImgOffscreen.onload=function(){var wid=this.width,hgt=this.height;var shape=(wid>hgt)?"horizontal":((wid<hgt)?"vertical":"square");var fileSize=Math.round(parseInt(Photo.getResponseHeader("Content-Length"))/1024)+" KB";var TxtAlert=new Array();TxtAlert.push("Name: ");TxtAlert.push(Img[0]);TxtAlert.push("\n");TxtAlert.push("Dimensions: ");TxtAlert.push(wid);TxtAlert.push(" \u00D7 ");TxtAlert.push(hgt);TxtAlert.push(" px; ");TxtAlert.push(shape);TxtAlert.push("\n");TxtAlert.push("File Size: ");TxtAlert.push(fileSize);TxtAlert.push("\n");if(Img[3]){TxtAlert.push("Caption: ");TxtAlert.push(Img[3]);TxtAlert.push("\n");}
alert(TxtAlert.join(""));}
this.ImgOffscreen.src=Settings.folder+Img[0];}
else if(Photo.status)alert("AJAX request error occurred at function showImgInfo\n\nStatus expected: 200 or 304\nStatus returned: "+Photo.status);}}
catch(Err){var eMsg="Exception at function showImgInfo\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";try{alert(eMsg);} catch(Err){}}}
Photo.open("GET",Settings.folder+Img[0]);Photo.send(null);}
return false;}
else
return(Settings.disableContextImgMenu)?false:true;}
RequestCode=null,RequestData=null;function launchSS(Link,dataFile){if(window.TN)TN.kill();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("",Link.href);return false;}
function DynamicWindow(transDur){var htm="<div style='text-align:justify;'>As I begin to close down my office and transition to new endeavors the thought arises, how do I begin to thank all of the special couples who have graced my life for the past 15 years? I appreciate each and every one of you and thank you so much for the honor and privilege of sharing your wedding day with you. Thank you for entrusting me with capturing the memories of your special day on film and for showering me with gratitude, love and laughter. You have made my career in wedding photography so fulfilling and such a joy! Many of you have kept in touch with pictures of new babies, family Christmas cards, and news of changes in your lives. I am grateful for your friendship and hope you will continue to let me know how you are doing.<br><br>On a practical note, I will no longer be able to keep negatives in long-term storage and would like to make them available to you at this time.  If I photographed your wedding between 1998 and 2006 and you are interested in having your negatives please <a href='javascript:sendMail( 1 );' class='dwLink'>send me an e-mail</a>.<br><br>My very best to you and your family for a Lifetime of Happiness!<div style='margin:10px 0px 0px 480px;'>Aloha<div class='signature'>Kathryn</div></div></div>";this.Gratitude=["A Note Of Gratitude",htm];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.TheBody=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.setBody=setBody;this.mouseUp=mouseUp;document.onmousedown=this.mouseDown;document.onmousemove=this.mouseMove;document.onmouseup=this.mouseUp;var Preloader=new Image();Preloader.src="images/preloader.gif";function otherFunctionalityOnRemoveWin(){}
function cancelPreloader(){var Overlay=document.getElementById("dwOverlay");if(Overlay)document.body.removeChild(Overlay);this.overlayExists=false;this.ImgOffscreen=document.getElementById("ImgOffscreen");if(this.ImgOffscreen){this.ImgOffscreen.onload=function(){};document.body.removeChild(this.ImgOffscreen);}}
function createEnlargement(winType,imgSrc){DW.addOverlay(1,winType);this.ImgOffscreen=document.getElementById("ImgOffscreen");if(this.ImgOffscreen)document.body.removeChild(this.ImgOffscreen);this.ImgOffscreen=document.createElement("IMG");this.ImgOffscreen.id="ImgOffscreen";this.ImgOffscreen.style.position="absolute";this.ImgOffscreen.style.top="-1000000px";this.ImgOffscreen.style.left="-1000000px";document.body.appendChild(this.ImgOffscreen);this.ImgOffscreen.onload=function(){var CancelPreload=document.getElementById("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){var TdCount=document.getElementById("SsTnCount");TdCount.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){this.setBody();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);winWid=WinDim[0];winHgt=WinDim[1];var body="<img src='"+imgSrc+"' border='0' hspace='0' vspace='0' galleryimg='no' style='"+getOpacity()+" width:"+winWid+"px; height:"+winHgt+"px;' onload='DW.showImg( this );' onAbort='this.src=this.src;' id='ImageDW'>";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=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";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")?"<td id='dwTitleLeft' class='dwCounterSsTn'><span id='SsTnCount'></span><span>"+music+"</td>":"";var pauseBut=(this.winType=="SS")?"&nbsp;<a href='javascript:SS.pause( ( SS.running ) ? 1 : 0 );' title='Pause'><img src='images/pauseSsOff.gif' id='PauseSs' class='dwPauseSs' onMouseover='SS.highlightPause( this, 1 );' onMouseout='SS.highlightPause( this, 0 );'></a>&nbsp;":"";var winClass=(DW.overlayExists||addOverlay)?"dwTitleRowOverlay":"dwTitleRow";var dwX=(noX)?"":"<a href='javascript:DW.removeWin();' title='Close' id='dwX' class='dwX'>&nbsp;&times;&nbsp;</a>";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;if(clickPos||aboveClkPos){if(theEvent)var ClickPos=this.getClickPosition(theEvent);else if(window.gClickPos)var ClickPos=gClickPos;window.gClickPos=ClickPos;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.TheBody.scrollLeft;scrollY=this.TheBody.scrollTop;bodyWid=this.TheBody.clientWidth;bodyHgt=this.TheBody.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=(window.ComponentDW)?window.ComponentDW:document.getElementById(RequestedPos[3]);if(SF){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 bodyWid,bodyHgt;if(IE){bodyWid=this.TheBody.clientWidth;bodyHgt=this.TheBody.clientHeight;}
else{bodyWid=window.innerWidth;bodyHgt=window.innerHeight;}
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;this.setBody();var Overlay=document.getElementById("dwOverlay");if(!Overlay){if(window.SSE&&SSE.running)SSE.pauseSS(1);window.onscroll=function(){var Overlay=document.getElementById("dwOverlay");if(Overlay){document.body.removeChild(Overlay);DW.overlayExists=false;if(window.SSE&&!SSE.running)SSE.pauseSS(0);}}
var Overlay=document.createElement("DIV");Overlay.id="dwOverlay";Overlay.className="dwOverlay";if(this.winType=="TN"||this.winType=="SS"){var TopImage=document.getElementById("TopImage");if(TopImage){document.body.removeChild(TopImage);(this.winType=="SS")?SS.TopImage=null:TN.TopImage=null;}}
else{Overlay.onclick=function(){var CancelPreloadImg=document.getElementById("CancelPreloadImg");if(!CancelPreloadImg){document.body.removeChild(this);DW.overlayExists=false;}}}
document.body.appendChild(Overlay);var xPos=(IE)?this.TheBody.scrollLeft:window.pageXOffset;var yPos=(IE)?this.TheBody.scrollTop:window.pageYOffset;Overlay.style.left=xPos+"px";Overlay.style.top=yPos+"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;if(IE){scrollX=this.TheBody.scrollLeft;scrollY=this.TheBody.scrollTop;bodyWid=this.TheBody.clientWidth;bodyHgt=this.TheBody.clientHeight;}
else{scrollX=window.pageXOffset;scrollY=window.pageYOffset;bodyWid=window.innerWidth;bodyHgt=window.innerHeight;}
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){Photo.oncontextmenu=function(event){return window.showImgInfo(this,event,this.width,this.height);};if(this.winType=="TN"){Photo.title="Next enlargement";Photo.onclick=function(event){TN.nextImage(1,event);this.title="";}
document.getElementById("SsTnCount").onmouseover=function(){var Numbers=this.innerHTML.split("/");this.title="Photo #"+Numbers[0]+" of "+Numbers[1];}
TN.preloadNext();}
else if(this.winType=="SS"){Photo.title="Next";Photo.onclick=function(event){SS.next(event);this.title="";}
document.getElementById("SsTnCount").onmouseover=function(){var Numbers=this.innerHTML.split("/");this.title="Photo #"+Numbers[0]+" of "+Numbers[1];}
SS.preLoadNext();}
else{Photo.onclick=DW.removeWin;Photo.title="Click to close";}
Photo.style.cursor="pointer";startFade(Photo,this.transDur,0);}
function keepInWin(NewWindow,leftEdge,topEdge){var bodyHgt=(IE)?this.TheBody.clientHeight:window.innerHeight;var bodyWid=(IE)?this.TheBody.clientWidth:window.innerWidth;var winHgt=NewWindow.offsetHeight;var yOffset=(IE)?this.TheBody.scrollTop:window.pageYOffset;var vScreenPos=topEdge-yOffset;var vSkew=bodyHgt-vScreenPos;if(vScreenPos<10)topEdge=10+yOffset;else if(vSkew<winHgt+10)topEdge-=winHgt-vSkew+10;var winWid=NewWindow.offsetWidth;var xOffset=(IE)?this.TheBody.scrollLeft:window.pageXOffset;var hScreenPos=leftEdge-xOffset;var hSkew=bodyWid-hScreenPos;if(hScreenPos<10)leftEdge=10+xOffset;else if(hSkew<winWid+10){leftEdge-=winWid-hSkew+10;if(!IE&&this.TheBody.scrollHeight>bodyHgt)leftEdge-=15;}
if(leftEdge<11)leftEdge=10;if(topEdge<11)topEdge=10;return[leftEdge,topEdge];}
function getClickPosition(theEvent){try{if(IE){var x=event.clientX+this.TheBody.scrollLeft;var y=event.clientY+this.TheBody.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){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+=document.getElementById("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+=document.getElementById("dwTitleLeft").scrollWidth+document.getElementById("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;}}}
function mouseMove(e){if(this.Window&&!OP){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.TheBody.scrollLeft)+"px";this.Window.style.top=(event.clientY-this.dWinOffsetY+DW.TheBody.scrollTop)+"px";DW.moveTopImage();return false;}
else{this.Window.style.top=(e.pageY-this.dWinOffsetY)+"px";this.Window.style.left=(e.pageX-this.dWinOffsetX)+"px";DW.moveTopImage();}}}
function removeWin(){var EvalOnClose=document.getElementById("EvalOnClose");if(EvalOnClose)eval(EvalOnClose.value);var Window=document.getElementById("dWinID");if(Window)document.body.removeChild(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=document.getElementById("TopImage");if(TopImage){var BotImage=document.getElementById("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 setBody(){if(!this.TheBody)this.TheBody=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;}
function cancelEvt(evt){if(window.event&&window.event.cancelBubble!=null)window.event.cancelBubble=true;else
evt.stopPropagation();}}
DW=new DynamicWindow();function sendMail(msgType){var eMail="Kathryn@KathrynRegier.com";if(msgType)document.location.href="mailto:"+eMail+"?subject=Wedding Negatives&body=%0D%0APlease provide the following information:%0D%0A1. Groom's Name: %0D%0A2. Bride's Maiden Name: %0D%0A3. Wedding Date: ";else
document.location.href="mailto:"+eMail;}
function ThumbNails(){initImagesArr();this.init=init;this.init();this.initTN=initTN;this.checkTnDim=checkTnDim;this.displayThumbnails=displayThumbnails;this.dissolve=true;this.showDownloadProgress=showDownloadProgress;this.getCount=getCount;this.getNewIndex=getNewIndex;this.nextImage=nextImage;this.preloadNext=preloadNext;this.enlarge=enlarge;this.imgBorder=imgBorder;this.kill=kill;this.showNumImages=showNumImages;this.writeConsole=writeConsole;this.updateProgressBar=updateProgressBar;this.reportImgName=reportImgName;this.getThumbnails=getThumbnails;this.setEnlargementProperties=setEnlargementProperties;this.NextLgImage=null;this.OldImage=null;this.nextImgTimer=0;this.progressBarTimer=0;this.curIndex=-1;this.tnRemainingTN=0;this.TheBody=null;this.TopImage=null;function displayThumbnails(){document.getElementById("ThumbnailsGUI").innerHTML=TN.getThumbnails();}
function init(){this.nImages=Images.length;this.maxIndex=this.nImages-1;this.ImagesOriginal=Images;this.folderOriginal=Settings.folder;this.defaultCaption=Settings.defaultCaption;}
function initTN(){this.showNumImages();this.checkTnDim();}
function getNewIndex(movingForward){if(movingForward)return(this.curIndex<this.maxIndex)?this.curIndex+1:0;else
return(this.curIndex>0)?this.curIndex-1:this.maxIndex;}
function preloadNext(){var newIndex=this.getNewIndex(1);var PreLoadImage=new Image();PreLoadImage.src=Settings.folder+Images[newIndex][0];var nOldImg=(newIndex==0)?Images.length-1:newIndex-1;this.OldImage=new Image();this.OldImage.src=Settings.folder+Images[nOldImg][0];}
function imgBorder(Img,color){if(Img.complete)Img.style.borderColor=color;}
function showNumImages(){if(this.nImages>-1){if(Settings.TN.ProgressBar.hideOnSuccess)document.getElementById("consoleTN").style.visibility="hidden";}}
function writeConsole(){document.write("<div id='consoleTN' style='line-height:14px;' align='"+Settings.TN.align+"'><div>&nbsp; </div><br/></div>");}
function updateProgressBar(){var Console=document.getElementById("consoleTN");try{if(this.tnRemainingTN>=0){var dBarWid=(this.nImages-this.tnRemainingTN)*(Settings.TN.ProgressBar.width/this.nImages);var percentLoaded=parseInt(((this.nImages-this.tnRemainingTN)/this.nImages)*100);if(!Settings.TN.ProgressBar.hideOnSuccess){dBarWid=this.nImages/2*(Settings.TN.ProgressBar.width/this.nImages);percentLoaded=50;}
var Pbar=new Array(21);Pbar.push("<div style='width:");Pbar.push(Settings.TN.ProgressBar.width);Pbar.push("px; background-color:");Pbar.push(Settings.TN.ProgressBar.bgColor);Pbar.push("; text-align:left; z-index:0;'>");Pbar.push("<div style='width:");Pbar.push(dBarWid);Pbar.push("px; background-color:");Pbar.push(Settings.TN.ProgressBar.progressColor);Pbar.push(";'>");Pbar.push("&nbsp;");Pbar.push("</div>");Pbar.push("</div>");Pbar.push("<div style='position:relative; top:-14px; left:0px; width:");Pbar.push(Settings.TN.ProgressBar.width);Pbar.push("px; text-align:center; z-index:1; font-family:arial,helvetica; font-size:8pt; color:");Pbar.push(Settings.TN.ProgressBar.fontColor);Pbar.push("; font-weight:bold;'>");Pbar.push(percentLoaded);Pbar.push("%");Pbar.push("</div>");Console.innerHTML=Pbar.join("");if(!Settings.TN.ProgressBar.hideOnSuccess)clearTimeout(TN.progressBarTimer);else if(this.tnRemainingTN>0)TN.progressBarTimer=setTimeout("TN.updateProgressBar()",200);else if(Settings.TN.ProgressBar.hideOnSuccess)Console.style.visibility="hidden";}}
catch(Err){TN.progressBarTimer=setTimeout("TN.updateProgressBar()",250);}}
function getCount(newIndex){return(newIndex+1)+"/"+(this.maxIndex+1);}
function kill(){this.NextLgImage=null;clearInterval(this.nextImgTimer);this.nextImgTimer=0;if(this.TopImage){document.body.removeChild(this.TopImage);this.TopImage=null;}}
function nextImage(movingForward,evt){var ImageDW=document.getElementById("ImageDW");if(ImageDW){var newIndex=this.getNewIndex(movingForward);if(!this.NextLgImage){this.NextLgImage=new Image();this.NextLgImage.src=Settings.folder+Images[newIndex][0];}
if(this.NextLgImage.complete&&this.OldImage.complete){if(!evt)evt=window.event;if(userWithWritePrivileges||(evt&&evt.shiftKey))this.dissolve=false;if(!document.getElementById("dwOverlay"))DW.addOverlay(0,"TN");ImageDW.onload=null;var imgWidNew=this.NextLgImage.width;var imgHgtNew=this.NextLgImage.height;var WinDim=DW.getScaledSize(imgWidNew,imgHgtNew,Images[newIndex][1]);imgWidNew=WinDim[0];imgHgtNew=WinDim[1];if(!TN.TopImage){TN.TopImage=document.createElement("IMG");TN.TopImage.id="TopImage";TN.TopImage.style.top=(imgHgtNew*-2)+"px";TN.TopImage.style.left=(imgWidNew*-2)+"px";TN.TopImage.style.zIndex=10001;TN.TopImage.style.position="absolute";TN.TopImage.style.cursor="pointer";TN.TopImage.oncontextmenu=function(event){return window.showImgInfo(this,event,this.width,this.height);}
TN.TopImage.onclick=function(event){TN.nextImage(1,event);this.title="Next enlargement";document.getElementById("ImageDW").title="";}
document.body.appendChild(TN.TopImage);}
TN.TopImage.title="Next enlargement";(IE)?TN.TopImage.style.visibility="hidden":TN.TopImage.style.opacity=0;TN.TopImage.src=this.NextLgImage.src;TN.TopImage.style.height=imgHgtNew+"px";TN.TopImage.style.width=imgWidNew+"px";var Win=document.getElementById("dWinID");document.getElementById("SsTnCount").innerHTML=this.getCount(newIndex);document.getElementById("SsTnTitle").innerHTML=getPhotoCaption(Images[newIndex][1],Images[newIndex][0]);var imgWidOld=this.OldImage.width;var imgHgtOld=this.OldImage.height;var marLeft=Math.round((imgWidNew-imgWidOld)/2);var marTop=Math.round((imgHgtNew-imgHgtOld)/2);ImageDW.parentNode.style.marginLeft=marLeft+"px";ImageDW.parentNode.style.marginTop=marTop+"px";ImageDW.parentNode.parentNode.style.overflow="hidden";ImageDW.src=this.OldImage.src;ImageDW.style.width=imgWidOld+"px";ImageDW.style.height=imgHgtOld+"px";ImageDW.parentNode.parentNode.style.height=imgHgtNew+"px";Win.style.width=imgWidNew+"px";DW.reCenter(Win);DW.moveTopImage();this.NextLgImage=null;clearInterval(this.nextImgTimer);this.nextImgTimer=0;this.curIndex=(movingForward)?this.curIndex+1:this.curIndex-1;if(this.curIndex>this.maxIndex)this.curIndex=0;else if(this.curIndex<0)this.curIndex=this.maxIndex;this.preloadNext();if(this.dissolve)startFade(TN.TopImage,Settings.transDur,0);else{(IE)?TN.TopImage.style.visibility="visible":TN.TopImage.style.opacity=1;TN.TopImage.style.visibility="visible";}
this.dissolve=true;}
else{if(this.nextImgTimer==0){eval("this.nextImgTimer = setInterval( 'TN.nextImage( "+movingForward+" )', 250 );");document.getElementById("SsTnTitle").innerHTML="Downloading Image<span id='dot1'>.</span><span id='dot2'>.</span><span id='dot3'>.</span><span id='dot4'>.</span>";this.showDownloadProgress();}}}
else
this.kill();}
var nDotsVisible=4;function showDownloadProgress(){var Dot1=document.getElementById("dot1");var Dot2=document.getElementById("dot2");var Dot3=document.getElementById("dot3");var Dot4=document.getElementById("dot4");if(Dot1&&Dot2&&Dot3&&Dot4){for(var i=1;i<=4;i++)document.getElementById("dot"+i).style.visibility=(i<=nDotsVisible)?"visible":"hidden";nDotsVisible++;if(nDotsVisible==5)nDotsVisible=0;setTimeout("TN.showDownloadProgress();",500);}}
function enlarge(cap,imageNum){if(window.SS)SS.kill();this.TheBody=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;if(window.Images==null){window.Images=this.ImagesOriginal;Settings.folder=this.folderOriginal;Settings.defaultCaption=this.defaultCaption;}
DW.photoCaption=Images[imageNum][1];DW.photoCount=TN.getCount(imageNum);DW.createEnlargement("TN",Settings.folder+Images[imageNum][0]);return false;}
function getThumbnails(){this.tnRemainingTN=this.nImages;var Htm=new Array();var tnNum=0;thePageTitle=Settings.TN.pageTitle;thePageTitle=thePageTitle.replace(/\^\^/g, "&#39;" );
thePageTitle=thePageTitle.replace(/\^/g, "&#34;" );
if(thePageTitle){Htm.push("<div class='tnTitle' align='center'>");Htm.push(thePageTitle);Htm.push("</div>");}
Htm.push("<table align='center'>");var nRows=Math.floor(this.nImages/Settings.TN.nImagesRow)+1;for(var row=0;row<nRows;row++){Htm.push("<tr align='");Htm.push(Settings.TN.align);Htm.push("' valign='middle'><td align='center' style='white-space:nowrap;'>");Htm.push("<table align='center'>");Htm.push("<tr>");for(var i=0;i<Settings.TN.nImagesRow;i++){var thisTnImgData='';var writeTN=(tnNum<this.nImages)?true:false;if(writeTN){var lgImageName=Images[tnNum][0],tnImageName="";lastDotPos=lgImageName.lastIndexOf(".");var fileExt="TN"+lgImageName.substring(lastDotPos,lgImageName.length);tnImageName=(Images[tnNum][2])?Images[tnNum][2]:lgImageName.split(".")[0]+fileExt;var imgTitle=Images[tnNum][1];imgTitle=imgTitle.replace(/'/g, "&#39;" );
imgTitle=imgTitle.replace(/"/g, "\\\"" );
var toolTip=imgTitle.replace(/<>/g, " &#149; " );
toolTip=toolTip.replace(/<.*?>/g, " " );
toolTip=toolTip.replace(/\[/g, ", " ).replace(/\]/g, "" ).replace(/ {2,}/g, " " );
var tn=Settings.folder+tnImageName;tnNum++;}
var imageNum=row*Settings.TN.nImagesRow+i+1;if(writeTN){var lgImgName=Images[tnNum-1][0];var toolTipColon=(toolTip)?": ":"";toolTip=imageNum+"/"+this.nImages+toolTipColon+toolTip;Htm.push("<td class='");var cls=(fileNameLC=="thumbnails.aspx")?"tn":"tnPage";Htm.push(cls);Htm.push("'>");Htm.push("<a href='javascript:void(0);' title=\"");Htm.push(toolTip);Htm.push("\" onClick='if( window.DW ) { TN.curIndex = ");Htm.push(imageNum-1);Htm.push("; this.blur(); return TN.enlarge( \"");Htm.push(imgTitle);Htm.push("\", ");Htm.push(imageNum-1);Htm.push(" ); }' onContextMenu='return TN.reportImgName( this, ");Htm.push(imageNum);Htm.push(", event );'>");Htm.push("<img src='");Htm.push(tn);Htm.push("'");Htm.push(" title=\"");Htm.push(toolTip);Htm.push("\" ");Htm.push("style='");Htm.push("border:1px solid ");Htm.push(Settings.TN.bordColOff);Htm.push(";");Htm.push(" width:");Htm.push(Settings.TN.width);Htm.push("px;");Htm.push(" height:");Htm.push(Settings.TN.height);Htm.push("px;");Htm.push("'");Htm.push(" onMouseover='if( window.TN ) TN.imgBorder(this,Settings.TN.bordColOn);' onMouseout='if( window.TN ) TN.imgBorder(this,Settings.TN.bordColOff);' onAbort='this.src=this.src;' onLoad='TN.tnRemainingTN--;' onContextMenu='");Htm.push(((Settings.disableContextImgMenu)?"return false;":"return true;"));Htm.push("' id='TN_");Htm.push(imageNum);Htm.push("'>");Htm.push("</a>");Htm.push("</td>");}}
Htm.push("</tr>");Htm.push("</table>");Htm.push("</td></tr>");}
Htm.push("</table>");var htm=Htm.join("");return htm;}
function reportImgName(Link,imageNum,evt){if(userWithWritePrivileges){if(window.Images==null)window.Images=this.ImagesOriginal;var Img=Images[imageNum-1];var ImgTN=Link.firstChild;var Htm=new Array();Htm.push("<table align='left'>");Htm.push("<tr>");Htm.push("<td align=center valign=top>");Htm.push("<img src='");Htm.push(ImgTN.src);Htm.push("' width='");Htm.push(ImgTN.width);Htm.push("' height='");Htm.push(ImgTN.height);Htm.push("'>");Htm.push("</td>");Htm.push("<td align=center valign=top style='padding:4px;'>");Htm.push("<table align='center' class='dwText'>");Htm.push("<tr><td align=right>Name:&nbsp;</td><td align=left>");Htm.push(Img[0]);Htm.push("</td></tr>");Htm.push("<tr><td align=right>Number:&nbsp;</td><td align=left>");Htm.push(imageNum);Htm.push(" of ");Htm.push(TN.nImages);Htm.push("</td></tr>");Htm.push("<tr><td align=right>Dimensions:&nbsp;</td><td align=left id='DimTN'> <br/></td></tr>");Htm.push("<tr><td align=right>File Size:&nbsp;</td><td align=left id='fileSizeTN'> <br/></td></tr>");Htm.push("<tr><td align=right valign=top>Caption:&nbsp;</td><td align=left>");Htm.push(Img[1]);Htm.push("</td></tr>");Htm.push("</table>");Htm.push("</td>");Htm.push("</table>");if(window.DW){DW.createWindow(["Enlargement Properties",Htm.join("")],[0,500,0],Link,evt);this.setEnlargementProperties(imageNum);}
return false;}}
function setEnlargementProperties(imageNum){this.Request=getAjaxRequest();if(this.Request){this.Request.onreadystatechange=function(){try{if(TN.Request.readyState==4){if(TN.Request.status==200||TN.Request.status==304){var fileSize=parseInt(TN.Request.getResponseHeader("Content-Length"))/1024;var FileSizeTN=document.getElementById("fileSizeTN");if(FileSizeTN){FileSizeTN.innerHTML=Math.round(fileSize)+" KB";this.ImgOffscreen=document.getElementById("ImgOffscreenLg");if(this.ImgOffscreen)document.body.removeChild(this.ImgOffscreen);this.ImgOffscreen=document.createElement("IMG");this.ImgOffscreen.id="ImgOffscreen";this.ImgOffscreen.style.position="absolute";this.ImgOffscreen.style.top="-1000000px";this.ImgOffscreen.style.left="-1000000px";document.body.appendChild(this.ImgOffscreen);this.ImgOffscreen.onload=function(){var DimTN=document.getElementById("DimTN");var wid=this.width,hgt=this.height;var shape=(wid>hgt)?"horizontal":((wid<hgt)?"vertical":"square");DimTN.innerHTML=wid+" &times; "+hgt+" px; "+shape;}
this.ImgOffscreen.src=Settings.folder+Images[imageNum-1][0];}}
else if(TN.Request.status)alert("AJAX request error occurred at TN.setEnlargementProperties\n\nStatus expected: 200 or 304\nStatus returned: "+TN.Request.status);}}
catch(Err){var eMsg="Exception at method TN.setEnlargementProperties\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";try{alert(eMsg);} catch(Err){}}}
this.Request.open("GET",Settings.folder+Images[imageNum-1][0],true);this.Request.send(null);}}
this.checkTN=1;this.checkTnTimer=0;this.TnReal=null;this.TnSizeErr="";function checkTnDim(){if(userWithWritePrivileges||local){if(this.TnReal==null){var TN=document.getElementById("TN_"+this.checkTN);if(TN){TnReal=new Image();TnReal.src=TN.src;}
else{TnReal=null;clearTimeout(this.checkTnTimer);if(this.TnSizeErr){var msgOut=this.TnSizeErr;if(IE)msgOut+="<br/><br/>We see you are using Internet Explorer. It suffers from a peculiar bug such that even if you correct the dimensions, it may continue to report this error! If so, then change the file name too, for example:<br/>1. beachTN.jpg &rArr; beach1TN.jpg<br/>2. beach.jpg &rArr; beach1.jpg";DW.createWindow(["Thumbnail Dimension Error","<div style='margin:0px 0px 4px 0px;' class='dwText'>Thumbnails must be "+Settings.TN.width+" x "+Settings.TN.height+" pixels, and:</div>"+msgOut],[1,450,300],null,null,6,[4,0,0]);}}}
if(TnReal&&TnReal.complete){var realWid=TnReal.width,realHgt=TnReal.height;if(realWid>1&&realHgt>1&&(realWid!=Settings.TN.width||realHgt!=Settings.TN.height)){var FileComponents=TnReal.src.split("/");var imgFileName=FileComponents[FileComponents.length-1];this.TnSizeErr+="<div style='margin:0px 0px 0px 8px;'>#"+this.checkTN+" "+imgFileName+" is "+realWid+" x "+realHgt+"</div>";}
this.checkTN++;this.checkTnTimer=setTimeout("TN.checkTnDim();",100);}}}}
function DynamicMenu(FormElements){this.homePage=homePage;this.clearAll=clearAll;this.write=write;this.show=show;this.hide=hide;this.keepAlive=keepAlive;this.kill=kill;this.refreshItems=refreshItems;this.resetItems=resetItems;this.getElement=getElement;this.write();this.resetItems();function write(){;}
function clearAll(){var Menus=new Array();var Tables=document.getElementsByTagName("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){this.clearAll();var TheMenu=getElement(menuID);if(typeof menuPos!="number")menuPos=this.subMenuPos;this.keepAlive([menuID]);var e=(window.event)?event:evt;var Body=(IE&&document.compatMode=="CSS1Compat")?document.documentElement:document.body;with(TheMenu.style){position="absolute";left=(screen.width*-1)+"px";top=(screen.height*-1)+"px";visibility="hidden";display="block";}
var x=0,y=0;if(menuPos==0){x=(IE)?e.clientX+Body.scrollLeft:e.pageX;y=(IE)?e.clientY+Body.scrollTop:e.pageY;}
else{var ThisLink=Link;var parPosAbs=false;if(SF){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 bodyHgt=(IE)?Body.clientHeight:window.innerHeight;var bodyWid=(IE)?Body.clientWidth:window.innerWidth;var menuHgt=TheMenu.offsetHeight;var yFromTop=(IE)?Body.scrollTop:window.pageYOffset;var vScreenPos=y-yFromTop;var vSkew=bodyHgt-vScreenPos;if(vSkew<menuHgt+10)y-=menuHgt-vSkew+10;else if(vScreenPos<10)y=10+yFromTop;var menuWid=TheMenu.offsetWidth;var xFromLeft=(IE)?Body.scrollLeft:window.pageXOffset;var hScreenPos=x-xFromLeft;var hSkew=bodyWid-hScreenPos;if(hSkew<menuWid+10)x-=menuWid-hSkew+10;else if(hScreenPos<10)x=10+xFromLeft;with(TheMenu.style){left=x+"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")){eval("Menu.timer"+menuID+" = setTimeout( \"Menu.timer"+menuID+" = 0; document.getElementById( '"+menuID+"' ).style.display = 'none';\", "+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.innerHTML.indexOf("menuArrow")==-1)Link.className="menuDisabled";}}}}}
function getElement(menuID){var Elem=null;if(document.getElementById(menuID))Elem=document.getElementById(menuID);else{var callFun=getElement.caller.toString().replace(/\n/g, "" );
callFun=callFun.split("(")[0];alert("ERROR: Menu.getElement unable to getElementById( \""+menuID+"\" )\n\nCALLER: "+callFun);}
return Elem;}
function refreshItems(Link){this.targetPage=Link.href;this.resetItems();}}
function ProgressBar(){this.nBarsDefault=10;this.barOffColorDefault="rgb( 136,149,120 )";this.barOnColorDefault="rgb( 255,102,0 )";this.barActiveWidDefault="6px";this.barInactiveWidDefault="5px";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(";");}
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=document.getElementById("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(document.getElementById("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();