// Web software by DavidRegier.com
IE=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;}
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");winIE=(winOS&&IE);macOS=(navigator.platform.substring(0,3)=="Mac");macIE=(macOS&&IE);theHost=document.location.hostname;local = ( /^\d+\.\d+\.\d+\.\d+$/.test(theHost)||theHost==""||theHost=="localhost");live=!local;qStr=unescape(document.location.search).substring(1);homePage="default.aspx"
path=document.location.pathname;delimeter=(path.indexOf("\\")>=0)?"\\":"/";if(path.charAt(path.length-1)==delimeter)path+=homePage;Path=path.split(delimeter);fileName=Path[Path.length-1];if(typeof window.DB=="object"){if(typeof window.DB.Administrators=="object"){for(var key in DB.Administrators){eMailOut="";eMailIn=DB.Administrators[key][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;}}
if(typeof window.DB.Contact=="object"){eMailOut="";eMailIn=DB.Contact.SubmitCheckoutFormTo.replace(/\s{2}/g, "." );
eMailIn=eMailIn.replace(/\s{1}/g, "@" );
for(i=0;i<=eMailIn.length;i++)eMailOut=eMailIn.charAt(i)+eMailOut;DB.Contact.SubmitCheckoutFormTo=eMailOut;eMailOut="";eMailIn=DB.Contact.EmailShane.replace(/\s{2}/g, "." );
eMailIn=eMailIn.replace(/\s{1}/g, "@" );
for(i=0;i<=eMailIn.length;i++)eMailOut=eMailIn.charAt(i)+eMailOut;DB.Contact.EmailShane=eMailOut;eMailOut="";eMailIn=DB.Contact.EmailDeidre.replace(/\s{2}/g, "." );
eMailIn=eMailIn.replace(/\s{1}/g, "@" );
for(i=0;i<=eMailIn.length;i++)eMailOut=eMailIn.charAt(i)+eMailOut;DB.Contact.EmailDeidre=eMailOut;}}
pathSecure="https://www.stphotography.com/hawaii/";pathUnsecure="http://www.stphotography.com/hawaii/";testEmail="David"+"@DavidRegier.com";Settings=new Array();Settings.IeTransNum=2;Settings.transDur=.8;Settings.folder="images/";Settings.defaultCaption="Shane Tegarden Photography";Settings.borderWidDW=2;Settings.disableContextImgMenu=1;Settings.SS=new Array();Settings.SS.speed=4.5;Settings.SS.randomStart=0;Settings.SS.Music=[null];if(local)Settings.SS.randomStart=0;Settings.TN=new Array();Settings.TN.ProgressBar=new Array();Settings.TN.ProgressBar.hideOnSuccess=1;Settings.TN.ProgressBar.width=350;Settings.TN.ProgressBar.progressColor="rgb( 153,0,0 )";Settings.TN.ProgressBar.bgColor="rgb( 171,131,66 )";Settings.TN.ProgressBar.fontColor="rgb( 255,255,255 )";Settings.TN.bordColOff="rgb( 221,209,189 )";Settings.TN.bordColOn="rgb( 204,0,0 )";Settings.TN.pageTitle="Demo: Photo Presentation Software";Settings.TN.align="center";Settings.TN.nImagesRow=8;Settings.TN.width=100;Settings.TN.height=100;Msg=new Array();Msg.About="About Shane & Deidre Tegarden";Msg.Aerial="View my Aerial Photography images";Msg.AudioOn="Play mp3 narrative about this image";Msg.AudioOff="Close audio player";Msg.Back="Back to the last page you were on...";Msg.Care="About prints, shipping, turn-around, framing, guarantee...";Msg.Cart="View, edit & submit your completed order";Msg.Contact="Contact Info \u2022 Address, E-Mails, Phones...";Msg.Enlarge="Click to enlarge";Msg.Family="View my Family Portrait Images";Msg.Forthcoming="";Msg.Gallery="Purchase Fine-Art Images"
Msg.Home="Homepage";Msg.Kiiona="Purchase Ki\u2019iona Kahiko Hawaiiana Images"
Msg.Login="Website administrator log-in";Msg.Logoff="Log off as website administrator";Msg.MailSubject="Shane Tegarden Photography Web Site E-Mail";Msg.Map="View Google Map";Msg.Order="View enlargement & purchase image";Msg.SponsorBlurb="Read about this sponsor";Msg.SponsorSite="Visit sponsor web site";Msg.Sponsors="Sponsors \u2022 Newsletter \u2022 Press Releases";;Msg.Upload="Upload images to the server";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;expDate12Mon=new Date();expDate12Mon.setTime(expDate12Mon.getTime()+(24*60*60*365*1000));SaveCartExpDate=new Date();SaveCartExpDate.setTime(SaveCartExpDate.getTime()+(24*60*60*60*1000));userWithWritePrivileges=GetCookie("userWithWritePrivileges");if(userWithWritePrivileges){userWithWritePrivilegesFirstName=userWithWritePrivileges.split("_")[0];userWithWritePrivileges=userWithWritePrivileges.replace(/_/, " " );}
if(userWithWritePrivileges||local)Settings.disableContextImgMenu=0;function writeStyles(){if(userWithWritePrivileges||local)document.write("<style>td.hideFromPublic{ display:table-cell; }</style>");}
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(){if(window.FW&&userWithWritePrivileges)FW.pollAdministrators();else
PL.run();if(qStr&&qStr.getVal("ss")){var dataFile=qStr.getVal("ss");var playMusic=(qStr.getVal("music")=="yes");launchSS(null,dataFile,playMusic);}}
function PreLoader(){this.Files=["images/ContactUs.jpg","shane-cart.js","about.aspx","sponsors.aspx","aerial.aspx","family-portraits.aspx","images-family-portraits.js","kii-o-na-kahiko.aspx","kii-o-na-kahiko-order.aspx","newsletter-archives.aspx","default.aspx","cart.aspx","checkout.aspx","copyright.aspx","customer-care.aspx","gallery.aspx","gallery-order.aspx","kii-o-na-kahiko.aspx","kii-o-na-kahiko-order.aspx","slide-show.js","images/arrowLeftSsTnOff.gif","images/arrowLeftSsTnOn.gif","images/arrowRightSsTnOff.gif","images/arrowRightSsTnOn.gif","images/pauseSsOff.gif","images/pauseSsOn.gif","images/pauseSsPaused.gif",null];this.debug=0;try{if(top.qStr&&top.qStr.indexOf("preloader=show")!=-1)this.debug=1;}
catch(Err){}
if(this.debug)DeleteCookie("nFilesCached");this.Request=null;this.timer=0;this.nFilesCachedCookie=GetCookie("nFilesCached");this.nFilesCached=(this.nFilesCachedCookie)?parseInt(this.nFilesCachedCookie):0;this.run=run;function run(){this.Request=getAjaxRequest();clearTimeout(PL.timer);if(this.Request){if(this.nFilesCached<this.Files.length-1){this.Request.onreadystatechange=function(){try{if(PL.Request.readyState==4){if(PL.Request.status==200||PL.Request.status==304){if(PL.debug)top.document.title=PL.Files[PL.nFilesCached]+" preloaded; #"+((PL.nFilesCached+1)+" of "+(PL.Files.length-1));}
else{if(PL.debug)alert("File preloader encountered an error retrieving: \n "+PL.Files[PL.nFilesCached]+"\n Status: "+PL.Request.status+"\n StatusText: "+PL.Request.statusText+"\n Number "+((PL.nFilesCached+1)+" of "+(PL.Files.length-1)));}
PL.nFilesCached++;SetCookie("nFilesCached",PL.nFilesCached);PL.timer=setTimeout("if( window.PL ) PL.run();",100);}}
catch(Err){var eMsg="Exception at PL.run()\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";try{if(PL.debug)alert(eMsg);} catch(Err){}}}
this.Request.open("GET",this.Files[this.nFilesCached],true);this.Request.send(null);}}
else if(PL.debug)top.document.title="Browser does not support the HttpRequest Request Protocol";}} PL=new PreLoader();function 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;FadeObj=null;transNum=-1;transDur=-1;transDelay=-1;fadeOpacity=0,fadeOpacityTimer=0,fadeStartTime=0;opacityStep=(window.Settings&&window.Settings.SS&&Settings.transDur)?1/(Settings.transDur/.04):.05;function randompick(){return randompick.arguments[Math.floor(Math.random()*randompick.arguments.length)];}
function getTransition(transNum,duration){var trans="";if(winIE){var d=duration;if(parseFloat(navigator.userAgent.split("MSIE")[1])>=5.5){var thisTrans=(transNum==1)?Math.floor(Math.random()*17)+2:transNum;switch(thisTrans){case 2:trans="Fade(duration="+d+",overlap=1)";break;case 3:trans="Blinds(duration="+d+",bands="+randompick(2,4,6,8)+",direction="+randompick('up','down','right','left')+")";break;case 4:trans="CheckerBoard(duration="+d+",squaresX="+randompick(2,4,8,12)+",squaresY="+randompick(2,4,8,12)+",direction="+randompick('up','down','right','left')+")";break;case 5:trans="Barn(duration="+d+",motion="+randompick('in','out')+",orientation=",randompick('horizontal','vertical')+")";break;case 6:trans="GradientWipe(duration="+d+",gradientSize="+randompick(0,0.1,0.3,0.5,0.7,0.9,1)+",wipeStyle="+randompick(0,1)+",motion="+randompick('forward','reverse')+")";break;case 7:trans="Inset(duration="+d+")";break;case 8:trans="Iris(duration="+d+",irisStyle="+randompick('DIAMOND','CIRCLE','CROSS','PLUS','SQUARE','STAR')+",motion="+randompick('in','out')+")";break;case 9:trans="RadialWipe(duration="+d+",wipeStyle="+randompick('CLOCK','WEDGE','RADIAL')+")";break;case 10:trans="RandomBars(duration="+d+",orientation="+randompick('horizontal','vertical')+")";break;case 11:trans="RandomBars(duration="+d+")";break;case 12:trans="Slide(duration="+d+",pushStyle="+randompick('HIDE','PUSH','SWAP')+",bands="+randompick(1,2,3,4,5,6,7)+")";break;case 13:trans="Spiral(duration="+d+",gridSizeX="+randompick(8,16,32,64)+",gridSizeY="+randompick(8,16,32,64)+")";break;case 14:trans="Stretch(duration="+d+",stretchStyle="+randompick('HIDE','PUSH','SPIN')+")";break;case 15:trans="Strips(duration="+d+",motion="+randompick('leftdown','leftup','rightdown','rightup')+")";break;case 16:trans="Wheel(duration="+d+",spokes="+randompick(2,4,10,16,20)+")";break;case 17:trans="Zigzag(duration="+d+",gridSizeX="+randompick(8,16,32,64)+",gridSizeY="+randompick(8,16,32,64)+")";break;case 18:trans="RandomDissolve(duration="+d+")";break;default:alert("SWITCH/CASE ERROR: Case caught by default handler in \"getTransition\"");}
trans="progid:DXImageTransform.Microsoft."+trans;}
else{switch(transNum){case 2:trans="blendTrans(duration="+d+")";break;default:trans="revealTrans(duration="+d+",transition="+Math.floor(Math.random()*23)+")";}}}
return trans;}
function getOpacity(){var opac="";if(winIE)opac="visibility:hidden;";else if(MZ)opac="-moz-opacity:0;"
else if(SF||OP)opac="opacity:0;"
return opac;}
function startFade(FadeObj,transNum,transDur,transDelay){if((winIE||MZ||SF||OP)&&window.FadeObj==null){window.FadeObj=FadeObj;if(winIE){window.transNum=transNum;window.transDur=transDur;window.transDelay=transDelay;setTimeout("fadeInDirectX()",transDelay);}
else{fadeStartTime=new Date().getTime();FadeObj.onload=function(){};(transDelay)?setTimeout("fadeIn()",transDelay):fadeIn();}}
else{if(IE)FadeObj.style.visibility="visible";else if(MZ)FadeObj.style.MozOpacity=0.9999;else FadeObj.style.opacity=0.9999;FadeObj.style.visibility="visible";}}
function fadeIn(){if(MZ)FadeObj.style.MozOpacity=fadeOpacity;else FadeObj.style.opacity=fadeOpacity;fadeOpacity+=opacityStep;if(fadeOpacity<1)fadeOpacityTimer=setTimeout("fadeIn();",40);else{if(MZ)FadeObj.style.MozOpacity=0.9999;else FadeObj.style.opacity=0.9999;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=getTransition(transNum,transDur);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";}}
function initImagesArr(){try{Images.pop();}
catch(Err){alert("Images array cannot be initialized because:\n 1) Data file \""+window.dataFile+"\" is non-existent; OR\n 2) The data it contains is malformed (bad syntax)");}}
fileNameErr=false;function checkImgName(fileName){var rePattern=/\s+/g;if( !fileNameErr && rePattern.test(fileName)){fileNameErr=true;alert("An image file named \""+fileName+"\" contains forbidden white-space characters.");}}
ImgReal=null;checkDimTimer=0;function checkDim(imgRealSrc,widDB,hgtDB){if((userWithWritePrivileges||local)&&widDB>0&&hgtDB>0){if(ImgReal==null){ImgReal=new Image();ImgReal.src=imgRealSrc;}
if(ImgReal.complete){clearTimeout(checkDimTimer);var realWid=ImgReal.width,realHgt=ImgReal.height;if(realWid>1&&realHgt>1&&(realWid!=widDB||realHgt!=hgtDB)){var FileComponents=ImgReal.src.split("/");var fileName=FileComponents[FileComponents.length-1];var eMsg=fileName+" has incorrect dimensions: \n  1) "+widDB+" x "+hgtDB+" are the errant values \n  2) "+realWid+" x "+realHgt+" are the true values\n\n";eMsg+="This is an admin-only message, it will not appear to the public.";if(IE)eMsg+="\n\nWe see you are using Internet Explorer. It suffers from a peculiar bug such that even if you correct the dimensions, it may continue to report this error! If so, then change the file name too, for example:\nbeach.jpg \u2192 beach1.jpg";alert(eMsg);}
ImgReal=null;}
else{clearTimeout(checkDimTimer);eval("checkDimTimer = setTimeout( 'checkDim( \""+imgRealSrc+"\", "+widDB+", "+hgtDB+" )', 250 );");}}}
function largePic(cap,wid,hgt,Link,evt){if(window.DW){DW.createWindow([cap,"imgSrc="+Link.href],[0,wid,hgt],Link,evt,0,[4,0,0]);return false;}
else
return true;}
RequestCode=null,RequestData=null;function launchSS(Link,dataFile,playMusic){if(window.TN)TN.kill();window.playMusic=(playMusic)?true:false;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();SS.slideNum=(Settings.SS.randomStart&&!userWithWritePrivileges)?Math.floor(Math.random()*Images.length):0;SS.nFirstSlide=SS.slideNum;var PhotoInfo=SS.getImgInfoSS(Images[SS.nFirstSlide][3],SS.nFirstSlide,0);if(Link){Link.style.cursor = ( /a/i.test(Link.tagName))?"pointer":"default";Link.title=titleOrig;Link.blur();}
DW.createWindow([PhotoInfo[0],"imgSrc="+Settings.folder+Images[SS.nFirstSlide][0]],[0,Images[SS.nFirstSlide][1],Images[SS.nFirstSlide][2]],null,null,0,[4,0,0],"SS");var TdCount=document.getElementById("dwTitleLeft");TdCount.innerHTML=PhotoInfo[1];}
else
alert("AJAX error retrieving file \""+dataFile+"\" at function launchSS");}}
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){}}}
RequestData.open("GET",dataFile+"?"+Math.random(),true);RequestData.send(null);}
else
alert("AJAX error retrieving file \"slide-show.js\" at function launchSS");}}
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){}}}
if(live)RequestCode.open("GET","slide-show.js",true);else
RequestCode.open("GET","slide-show.js?"+Math.random(),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 businessCard(belowLink){var Pos=(belowLink)?[1,0,14]:[2,0,-14];if(window.DW){DW.createWindow(DW.ContactUs,[0,650,0],null,null,0,[4,0,0],null,null,1);showHawaiiTime();}
return false;}
function DynamicWindow(transNum,transDur){var htm="<table align='center' style='margin-bottom:10px;'><tr><td align='left'><table align='center'>";if(DB.Contact.Address1||DB.Contact.Address2||DB.Contact.Address3)htm+="<tr><td class='ContactUsCol1'>Mail</td><td class='ContactUsCol2'>";htm+=(DB.Contact.Address1)?DB.Contact.Address1+"<br/>":"";htm+=(DB.Contact.Address2)?DB.Contact.Address2+"<br/>":"";htm+=(DB.Contact.Address3)?DB.Contact.Address3+"<br/>":"";htm+="</td></tr>";htm+="<tr><td class='ContactUsCol1'>Hawaii Time</td><td class='ContactUsCol2' id='hawaii_time'></td></tr>";if(DB.Contact.TelTollFree)htm+="<tr><td class='ContactUsCol1'>Toll Free</td><td class='ContactUsCol2'>"+DB.Contact.TelTollFree+"</td></tr>";if(DB.Contact.TelDirect)htm+="<tr><td class='ContactUsCol1'>Direct</td><td class='ContactUsCol2'>"+DB.Contact.TelDirect+"</td></tr>";if(DB.Contact.Fax)htm+="<tr><td class='ContactUsCol1'>Fax</td><td class='ContactUsCol2'>"+DB.Contact.Fax+"</td></tr>";if(DB.Contact.CellShane)htm+="<tr><td class='ContactUsCol1'>Shane Cell</td><td class='ContactUsCol2'>"+DB.Contact.CellShane+"</td></tr>";if(DB.Contact.CellDeidre)htm+="<tr><td class='ContactUsCol1'>Deidre Cell</td><td class='ContactUsCol2'>"+DB.Contact.CellDeidre+"</td></tr>";if(DB.Contact.EmailShane)htm+="<tr><td class='ContactUsCol1'>Shane Email</td><td class='ContactUsCol2'>"+getEmailLink(DB.Contact.EmailShane)+"</td></tr>";if(DB.Contact.EmailDeidre)htm+="<tr><td class='ContactUsCol1'>Deidre Email</td><td class='ContactUsCol2'>"+getEmailLink(DB.Contact.EmailDeidre)+"</td></tr>";htm+="</table></td><td class='ContactUsImg'><img src='images/ContactUs.jpg' onLoad='startFade( this, 2, .8, 500 )' class='ContactUs' title='Deidre & Shane Tegarden' style='"+getOpacity()+"'></td></tr></table>";var adminNotes=(userWithWritePrivileges&&DB.Administrators[userWithWritePrivileges][1]==1)?"<div style='font-variant:normal; font-weight:normal; font-size:9pt;'>"+userWithWritePrivilegesFirstName+": To change photo upload a new one named ContactUs.jpg at 287&times;217 pixels</div>":"";this.ContactUs=["Shane Tegarden Photography"+adminNotes,htm];this.ssTnskewIeX=2;this.ssTnskewIeY=6;this.skewIeX=2;this.skewIeY=2;this.Msg=new Array();this.Msg.enlarge="Click to enlarge";this.alwaysAddOverlay=0;window.gClickPos=null;this.transNum=(transNum)?transNum:2;this.transDur=(transDur)?transDur:0.8;this.dWinOffsetX=0;this.dWinOffsetY=0;this.Window=null;this.overTitleBar=false;this.Photo=null;this.TheBody=null;this.winType;this.addOverlay=addOverlay;this.cancelEvt=cancelEvt;this.reCenter=reCenter;this.createWindow=createWindow;this.showImg=showImg;this.keepInWin=keepInWin;this.getClickPosition=getClickPosition;this.getData=getData;this.loadingImage=loadingImage;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;function otherFunctionalityOnRemoveWin(){}
function createWindow(dataSrc,WinDim,TheLink,theEvent,bodyMargin,RequestedPos,winType,centerContent,addOverlay){this.TheBody=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;if(TheLink)TheLink.blur();if(!bodyMargin)bodyMargin=0;this.winType=(winType)?winType:"";var Data=this.getData(dataSrc,TheLink),title,body;title=Data[0].replace(/\^\^/g, "'" );
title=title.replace(/\^/g, "\"" );
body=Data[1].replace(/\^\^/g, "'" );
body=body.replace(/\^/g, "\"" );
var showImg=(body.indexOf("imgSrc=")==0);var scrollStyle=(WinDim[0])?" overflow:auto;":"";var winWid=WinDim[1];var winHgt=WinDim[2];var clickPos=(RequestedPos)?(RequestedPos[0]==1):true;var aboveClkPos=(RequestedPos)?(RequestedPos[0]==2):false;var topCent=(RequestedPos)?(RequestedPos[0]==3):false;var center=(RequestedPos)?(RequestedPos[0]==4):false;var botCent=(RequestedPos)?(RequestedPos[0]==5):false;var xOffset=(RequestedPos)?RequestedPos[1]:0;var yOffset=(RequestedPos)?RequestedPos[2]:10;if(showImg){var imgSrc=body.split("imgSrc=")[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:TN.nextImage( 0 );' title='Last enlargement' onmousedown='DW.cancelEvt( event );'><img src='images/arrowLeftSsTnOff.gif' class='dwArrowSsTn' onMouseover='src=\"images/arrowLeftSsTnOn.gif\";' onMouseout='src=\"images/arrowLeftSsTnOff.gif\";' /></a></td><td class='dwTitle dwImgTitleSS' id='SsTnTitle'>"+title+"</td><td class='dwNextEnlargementSsTn'><a href='javascript:TN.nextImage( 1 );' title='Next enlargement, or click photo...' onmousedown='DW.cancelEvt( event );' id='SsTnNext'><img src='images/arrowRightSsTnOff.gif' class='dwArrowSsTn' onMouseover='src=\"images/arrowRightSsTnOn.gif\";' onMouseout='src=\"images/arrowRightSsTnOff.gif\";' /></a></td></tr></table>";this.title=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:SS.back();' title='Back' onmousedown='DW.cancelEvt( event );'><img src='images/arrowLeftSsTnOff.gif' class='dwArrowSsTn' onMouseover='src=\"images/arrowLeftSsTnOn.gif\";' onMouseout='src=\"images/arrowLeftSsTnOff.gif\";' /></a></td><td class='dwTitle dwImgTitleSS' id='SsTnTitle'>"+title+"</td><td class='dwNextEnlargementSsTn'><a href='javascript:void(0);' onClick='SS.next( event );' title='Next' onmousedown='DW.cancelEvt( event );' id='SsTnNext'><img src='images/arrowRightSsTnOff.gif' class='dwArrowSsTn' onMouseover='src=\"images/arrowRightSsTnOn.gif\";' onMouseout='src=\"images/arrowRightSsTnOff.gif\";' /></a></td></tr></table>";this.title=titleBarGUI;}
else
this.title=title;var loading="<div class='loadingImg'>Loading Image<span id='dot1' class='dotOff'>.</span><span id='dot2' class='dotOff'>.</span><span id='dot3' class='dotOff'>.</span><span id='dot4' class='dotOff'>.</span></div>";if(title.indexOf("[")!=-1){title=title.replace(/^.*?\[/, loading + "[" );
title=title.replace(/\[/g, "<div class='dwTitleLine2Off'>" );
title=title.replace(/]/g, "</div>" );}
else
title=loading;}
var Window=document.getElementById("dWinID");if(Window)document.body.removeChild(Window);var NewWindow=document.createElement("DIV"),scrollSt,bodyHgtSt;bodyHgtStyle=(winHgt)?" height:"+winHgt+"px;":"";NewWindow.id="dWinID";NewWindow.className="dwWin";document.body.appendChild(NewWindow);NewWindow.style.visibility="hidden"
NewWindow.style.position="absolute";NewWindow.style.width=(IE&&document.compatMode!="CSS1Compat")?(winWid+2*parseInt(NewWindow.currentStyle["borderWidth"]))+"px":winWid+"px";NewWindow.style.top=(screen.height*-1)+"px";NewWindow.style.left=(screen.width*-1)+"px";NewWindow.style.zIndex=10000;var counterCell=(this.winType=="TN"||this.winType=="SS")?"<td class='dwCounterSsTn' id='dwTitleLeft'></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 myWindow="<div class='dwTitleRow' 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'>"+title+"</td><td valign='top' id='dwTitleRight' onmousedown='DW.cancelEvt( event );' style='white-space:nowrap;'>"+pauseBut+"<a href='javascript:DW.removeWin();' title='Close' id='dwX' class='dwX'>&nbsp;&times;&nbsp;</a></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(showImg||this.alwaysAddOverlay||addOverlay)this.addOverlay();NewWindow.style.visibility="visible";if(showImg)this.loadingImage();}
function addOverlay(){if(window.SSE&&SSE.running)SSE.pauseSS(1);window.onscroll=function(){var Overlay=document.getElementById("dwOverlay");if(Overlay){document.body.removeChild(Overlay);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(event){document.body.removeChild(this);}}
document.body.appendChild(Overlay);try{var wid=this.TheBody.clientWidth;var hgt=this.TheBody.clientHeight;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";Overlay.style.width=wid+"px";Overlay.style.height=hgt+"px";}
catch(Err){if(local){var eMsg="Exception caught at DW.addOverlay:\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";alert(eMsg);}
self.status="Exception caught at DW.addOverlay";document.body.removeChild(Overlay);}}
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);if(winHgt>bodyHgt)yPos=scrollY+10;if(winWid>bodyWid)xPos=scrollX+10;DW.style.left=xPos+"px";DW.style.top=yPos+"px";}
function loadingImage(){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){if(Dot1.className=="dotOff")Dot1.className="dwDotOn";else if(Dot2.className=="dotOff")Dot2.className="dwDotOn";else if(Dot3.className=="dotOff")Dot3.className="dwDotOn";else if(Dot4.className=="dotOff")Dot4.className="dwDotOn";else{Dot1.className="dotOff";Dot2.className="dotOff";Dot3.className="dotOff";Dot4.className="dotOff";}
setTimeout("DW.loadingImage()",300);}}
function showImg(Photo){Photo.oncontextmenu=function(event){if(DW.winType=="SS")return SS.rightClick(this,event);else if(Settings.disableContextImgMenu)return false;};if(this.winType=="TN"){Photo.title="Next enlargement";Photo.onclick=function(){TN.nextImage(1);this.title="";}
document.getElementById("dwTitleLeft").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("dwTitleLeft").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";var title=this.title;title=title.replace(/\[/g, "<div class='dwTitleLine2'>" ).replace(/]/g, "</div>" );
document.getElementById("dwTitleCenter").innerHTML=title;startFade(Photo,this.transNum,this.transDur,0);setTimeout("if( window.checkDim ) checkDim( \""+Photo.src+"\", "+Photo.width+", "+Photo.height+" );",(this.transDur*1000+100));if(this.winType=="SS")setTimeout("if( window.SS ) SS.playMusic();",(this.transDur*1000+101));}
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=parseInt(this.Window.currentStyle.borderWidth);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);var Overlay=document.getElementById("dwOverlay");if(Overlay)document.body.removeChild(Overlay);if(window.SSE&&!SSE.running)SSE.pauseSS(0);DW.overTitleBar=false;switch(DW.winType){case "SS":SS.kill();break;case "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=(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){if(window.event&&window.event.cancelBubble!=null)window.event.cancelBubble=true;else
evt.stopPropagation();}}
DW=new DynamicWindow();function DynamicMenu(FormElements){this.homePage=homePage;this.clearAll=clearAll;this.write=write;this.show=show;this.hide=hide;this.keepAlive=keepAlive;this.kill=kill;this.on=on;this.off=off;this.refreshItems=refreshItems;this.resetItems=resetItems;this.setVis=setVis;this.getElement=getElement;this.init=init;this.write();this.resetItems();function init(){}
function clearAll(){kill(["Cart","Admin_Options"]);}
function write(){var menu="<div id='Admin_Options' onMouseOver='Menu.keepAlive([\"Admin_Options\"]);' onMouseOut='Menu.clearAll();' class='menu'><table align='left' class='menuBorder'><tr id='MenuHeader'><td><a href='header.aspx' class='menu'><div onMouseOver='Menu.on(this);' onMouseOut='Menu.off(this);' class='menuItemOff'><div class='menuItem'>Edit Page Header</div></div></a></td></tr><tr id='MenuFooter'><td><a href='footer.aspx' class='menu'><div onMouseOver='Menu.on(this);' onMouseOut='Menu.off(this);' class='menuItemOff'><div class='menuItem'>Edit Page Footer</div></div></a></td></tr><tr><td><a href='kii-o-na-kahiko-intro.aspx' class='menu'><div onMouseOver='Menu.on(this);' onMouseOut='Menu.off(this);' class='menuItemOff'><div class='menuItem'>Ki&rsquo;i O Na Kahiko Intro</div></div></a></td></tr><tr id='MenuXML'><td><a href='xml.aspx' class='menu'><div onMouseOver='Menu.on(this);' onMouseOut='Menu.off(this);' class='menuItemOff'><div class='menuItem'>Edit XML Data</div></div></a></td></tr><tr><td><a href='data.aspx' class='menu'><div onMouseOver='Menu.on(this);' onMouseOut='Menu.off(this);' class='menuItemOff'><div class='menuItem'>E-Commerce Data</div></div></a></td></tr><tr><td><a href='copyright.aspx' class='menu'><div onMouseOver='Menu.on(this);' onMouseOut='Menu.off(this);' class='menuItemOff'><div class='menuItem'>Copyright Language</div></div></a></td></tr><tr id='MenuUpload'><td><a href='javascript:PopUp.openWin( \"uploader.aspx\", 650, 300, 2, 0, 0, 1, 0, 0, 0 );' class='menu'><div onMouseOver='Menu.on(this);' onMouseOut='Menu.off(this);' class='menuItemOff'><div class='menuItem'>Image Uploader</div></div></a></td></tr><tr><td><a href='javascript:FW.logOff();' class='menu'><div onMouseOver='Menu.on(this);' onMouseOut='Menu.off(this);' class='menuItemOff'><div class='menuItem'>Log-Off</div></div></a></td></tr></table></div><div id='Cart' onMouseOver='Menu.keepAlive([\"Cart\"]);' onMouseOut='Menu.clearAll();' class='menu'><table align='left' class='menuBorder'><tr><td><a href='cart.aspx' onClick='return getShipTaxStatus( this, event, \"cart.aspx\", 3 );' class='menu'><div onMouseOver='Menu.on(this);' onMouseOut='Menu.off(this);' class='menuItemOff'><div class='menuItem'>View Cart</div></div></a></td></tr><tr><td><a href='checkout.aspx' onClick='return getShipTaxStatus( this, event, \"checkout.aspx\", 3 );' class='menu'><div onMouseOver='Menu.on(this);' onMouseOut='Menu.off(this);' class='menuItemOff'><div class='menuItem'>Checkout</div></div></a></td></tr></table></div>";document.write(menu);}
function show(Link,menuID,menuPos,evt,xOffset,yOffset,hideMeID){var TheMenu=getElement(menuID);if(typeof menuPos!="number")menuPos=this.subMenuPos;this.setVis(hideMeID,"hidden");this.keepAlive([menuID]);var e=(window.event)?event:evt;var Body=(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;while(ThisLink){if(SF){if(!parPosAbs)parPosAbs=(ThisLink.style.position=="absolute");if(parPosAbs&&ThisLink==Body)break;}
y+=ThisLink.offsetTop;x+=ThisLink.offsetLeft;ThisLink=ThisLink.offsetParent;}}
switch(menuPos){case 0:x+=xOffset;y+=yOffset;break;case 14:x+=xOffset;y-=TheMenu.offsetHeight+yOffset;break;case 21:x+=Link.offsetWidth+xOffset;y+=Link.offsetHeight-TheMenu.offsetHeight-yOffset;break;case 23:x+=Link.offsetWidth+xOffset;y+=yOffset;break;case 34:x+=xOffset;y+=Link.offsetHeight+yOffset;break;case 44:x=x-TheMenu.offsetWidth+xOffset;y=y+yOffset;break;default:alert("Switch/Case Error at Menu.show: menuPos \""+menuPos+"\" is invalid.");}
var bodyHgt=(IE)?Body.clientHeight:window.innerHeight;var bodyWid=(IE)?Body.clientWidth:window.innerWidth;var menuHgt=TheMenu.offsetHeight;var yFromTop=(IE)?Body.scrollTop:window.pageYOffset;var vScreenPos=y-yFromTop;var vSkew=bodyHgt-vScreenPos;if(vSkew<menuHgt+10)y-=menuHgt-vSkew+10;else if(vScreenPos<10)y=10+yFromTop;var menuWid=TheMenu.offsetWidth;var xFromLeft=(IE)?Body.scrollLeft:window.pageXOffset;var hScreenPos=x-xFromLeft;var hSkew=bodyWid-hScreenPos;if(hSkew<menuWid+10)x-=menuWid-hSkew+10;else if(hScreenPos<10)x=10+xFromLeft;with(TheMenu.style){left=x+"px";top=y+"px";visibility="visible";}}
function hide(Settings){for(var i=0;i<Settings.length;i++){var menuID=Settings[i][0],delay=Settings[i][1],hideMeID=Settings[i][2];if(getElement(menuID)){if(typeof delay=="undefined")delay=1000;if(window.Menu&&eval("Menu.timer"+menuID+" == 0")){eval("Menu.timer"+menuID+" = setTimeout( \"Menu.timer"+menuID+" = 0; document.getElementById( '"+menuID+"' ).style.display = 'none'; Menu.setVis( '"+hideMeID+"', 'visible' );\", "+delay+" )");}}}}
function keepAlive(MenuID){for(var i in MenuID){if(getElement(MenuID[i])){clearTimeout(eval("Menu.timer"+MenuID[i]));eval("Menu.timer"+MenuID[i]+" = 0;");}}}
function kill(MenuID){for(var i in MenuID){if(getElement(MenuID[i])){keepAlive([MenuID[i]]);hide([[MenuID[i],0]]);}}}
function on(Elem){if(typeof Elem=="string")Elem=document.getElementById(Elem);if(Elem.className=="menuItemOff")Elem.className="menuItemOn";else if(Elem.className=="menuItemNoClickOff")Elem.className="menuItemNoClickOn";}
function off(Elem){if(typeof Elem=="string")Elem=document.getElementById(Elem);if(Elem.className=="menuItemOn")Elem.className="menuItemOff";else if(Elem.className=="menuItemNoClickOn")Elem.className="menuItemNoClickOff";}
function refreshItems(Div){this.targetPage=Div.parentNode.href;this.resetItems();}
function resetItems(){var Links=document.links;for(var i=0;i<Links.length;i++){if(Links[i].className=="menu"){var target=Links[i].target;var targetLC=target.toLowerCase();if(target.charAt(0)!="_"||target=="_top"||target=="_parent"||targetLC=="_self"){var frame=(target&&target.charAt(0)!="_")?"parent."+target+".":"";if(frame&&parent==self)frame="";var targetPage=(this.targetPage)?this.targetPage:eval(frame+"document.location.href");if(targetPage.charAt(targetPage.length-1)=="/")targetPage+=this.homePage;var Div=(Links[i].firstChild.tagName)?Links[i].firstChild:Links[i].firstChild.nextSibling;if(Links[i].href==targetPage){if(Div.innerHTML.indexOf("menuArrow")==-1)Div.className="menuItemDisable";}
else if(Div.className=="menuItemDisable")Div.className="menuItemOff";}}}}
function setVis(hideMeID,vis){if(hideMeID&&winIE&&document.getElementById(hideMeID))document.getElementById(hideMeID).style.visibility=vis;}
function getElement(menuID){var Elem=null;if(document.getElementById(menuID))Elem=document.getElementById(menuID);else{var callFun=getElement.caller.toString().replace(/\n/g, "" );
callFun=callFun.split("(")[0];alert("ERROR: Menu.getElement unable to getElementById( \""+menuID+"\" )\n\nCALLER: "+callFun);}
return Elem;}}
function PopUp(){this.winName="davidWin";this.PrinterFriendlyContactInfo=null;this.printerFriendlyCss="";this.Win=null;this.openWin=openWin;this.printerFriendly=printerFriendly;this.closeWin=closeWin;this.linkToWin=linkToWin;function openWin(url,wWid,wHgt,wPos,tBar,lBar,sBar,mBar,scBar,reSize){this.closeWin();if(typeof wWid=="undefined")wWid=.8;if(typeof wHgt=="undefined")wHgt=.6;if(typeof wPos=="undefined")wPos=1;if(typeof tBar=="undefined")tBar=1;if(typeof lBar=="undefined")lBar=1;if(typeof sBar=="undefined")sBar=1;if(typeof mBar=="undefined")mBar=1;if(typeof scBar=="undefined")scBar=1;if(typeof reSize=="undefined")reSize=1;var avWid=screen.availWidth-10;var avHgt=screen.availHeight-30;if(wWid<1)wWid=wWid*avWid;if(wHgt<1)wHgt=wHgt*avHgt;if(wWid>avWid*0.90||wWid==1)wWid=avWid*0.90;if(wHgt>avHgt*0.70||wHgt==1)wHgt=avHgt*0.70;var leftPos=0;var topPos=0;switch(wPos){case 1:leftPos=parseInt((avWid-wWid)/2);break;case 2:leftPos=parseInt((avWid-wWid)/2);topPos=parseInt((avHgt-wHgt)/2);break;}
this.Win=window.open(url,PopUp.winName,"toolbar="+tBar+",location="+lBar+",directories=0,status="+sBar+",menubar="+mBar+",scrollbars="+scBar+",resizable="+reSize+",width="+wWid+",height="+wHgt+",top="+topPos+",left="+leftPos);}
function printerFriendly(removeImages,ExcludedPfContentSections){if(ExcludedPfContentSections){for(var i=0;i<ExcludedPfContentSections.length;i++){if(document.getElementById(ExcludedPfContentSections[i]))document.getElementById(ExcludedPfContentSections[i]).className="pfHide";}}
var nTitle=1;var pageTitle="";while(document.getElementById("pfTitle"+nTitle)){pageTitle+=document.getElementById("pfTitle"+nTitle).innerHTML+" ";pageTitle=pageTitle.replace(/<a\s.*?>/gi , "" );
pageTitle=pageTitle.replace(/<\/a.*?>/gi , "" );
nTitle++;}
var pfPageTitle=(pageTitle)?pageTitle:document.title;var htm="<html><head><title>"+document.title+"</title><link rel='stylesheet' href='"+this.printerFriendlyCss+"' type='text\/css'></head>";htm+=(live)?"<body onLoad='if( window.print ) window.print();'>":"<body>";htm+="<div class='pfTitle'>"+pfPageTitle+"</div><div class='pfOtherData'>"+theHost;if(this.PrinterFriendlyContactInfo){for(var i=0;i<this.PrinterFriendlyContactInfo.length;i++){htm+=this.PrinterFriendlyContactInfo[i][0]+eval(this.PrinterFriendlyContactInfo[i][1])+this.PrinterFriendlyContactInfo[i][2];}}
htm+="</div>";var nContent=1;outer:while(document.getElementById("pfContent"+nContent)){var content=document.getElementById("pfContent"+nContent).innerHTML;content=content.replace(/<a\s.*?>/gi , "" );
content=content.replace(/<\/a.*?>/gi , "" );
if(removeImages)content=content.replace(/<img\s.*?>/gi , "" );
content=content.replace(/<script[\d\D]*?<\/script>/gi , "" );
htm+=content;nContent++;}
if(document.getElementById("pfFooter"))htm+="<p class='pfFooter'>"+document.getElementById("pfFooter").innerHTML+"</p>";htm+="</body></html>";if(nContent>1){this.closeWin();this.openWin("",1);this.Win.document.write(htm);this.Win.document.close();}
else
alert("Error at PopUp.printerFriendly. No printer friendly sections (pfContent*) found...");if(ExcludedPfContentSections){for(var i=0;i<ExcludedPfContentSections.length;i++){if(document.getElementById(ExcludedPfContentSections[i]))document.getElementById(ExcludedPfContentSections[i]).className="pfShow";}}}
function closeWin(){try{if(this.Win&&this.Win.open&&!this.Win.closed){this.Win.close();this.Win=null;}}
catch(e){}}
function linkToWin(){if(PopUp&&PopUp.Win&&PopUp.Win.registered){if(PopUp.Win.MyOpener!=self)PopUp.Win.MyOpener=self;}
else setTimeout("PopUp.linkToWin()",250);}} PopUp=new PopUp();function FileWriter(){this.HtmNotes="";var ssImg="";this.HtmButtons="<button onClick='PopUp.openWin( \"uploader.aspx\", 650, 300, 2, 0, 0, 1, 0, 0, 0 ); return false;' onMouseover='this.title=Msg.Upload;' class='htmlTags'>Upload</button><button onClick='FW.insertTags( \"<br/>\", \"\", \"EditedHTML\" ); return false;' title='Insert line-break tag at cursor position' class='htmlTags'>&lt;br/&gt;</button><button onClick='FW.insertTags( \"<br/><br/>\", \"\", \"EditedHTML\" ); return false;' title='Insert 2 line-breaks at cursor position' class='htmlTags'>&lt;br/&gt;&lt;br/&gt;</button><button onClick='FW.insertTags( \"<b>\", \"</b>\", \"EditedHTML\" ); return false;' title='Insert bold tags around highlighted text' class='htmlTags'><b>B</b></button><button onClick='FW.insertTags( \"<i>\", \"</i>\", \"EditedHTML\" ); return false;' title='Insert italic tags around highlighted text' class='htmlTags'><i>I</i></button><button onClick='FW.insertTags( \"{#149}\", \"\", \"EditedHTML\" ); return false;' title='Insert bullet &#149; character entity at cursor position' class='htmlTags'>&#149;</button><button onClick='FW.insertTags( \"{#256}\", \"\", \"EditedHTML\" ); return false;' title='Insert capital A-macron at cursor position' class='htmlTags'>&#256;</button><button onClick='FW.insertTags( \"{#257}\", \"\", \"EditedHTML\" ); return false;' title='Insert lowercase a-macron at cursor position' class='htmlTags'>&#257;</button><button onClick='FW.insertTags( \"{#274}\", \"\", \"EditedHTML\" ); return false;' title='Insert capital E-macron at cursor position' class='htmlTags'>&#274;</button><button onClick='FW.insertTags( \"{#275}\", \"\", \"EditedHTML\" ); return false;' title='Insert lowercase e-macron at cursor position' class='htmlTags'>&#275;</button><button onClick='FW.insertTags( \"{#298}\", \"\", \"EditedHTML\" ); return false;' title='Insert capital I-macron at cursor position' class='htmlTags'>&#298;</button><button onClick='FW.insertTags( \"{#299}\", \"\", \"EditedHTML\" ); return false;' title='Insert lowercase i-macron at cursor position' class='htmlTags'>&#299;</button><button onClick='FW.insertTags( \"{#332}\", \"\", \"EditedHTML\" ); return false;' title='Insert capital O-macron at cursor position' class='htmlTags'>&#332;</button><button onClick='FW.insertTags( \"{#333}\", \"\", \"EditedHTML\" ); return false;' title='Insert lowercase o-macron at cursor position' class='htmlTags'>&#333;</button><button onClick='FW.insertTags( \"{#362}\", \"\", \"EditedHTML\" ); return false;' title='Insert capital U-macron at cursor position' class='htmlTags'>&#362;</button><button onClick='FW.insertTags( \"{#363}\", \"\", \"EditedHTML\" ); return false;' title='Insert lowercase u-macron at cursor position' class='htmlTags'>&#363;</button><button onClick='FW.insertTags( \"{lsquo}\", \"\", \"EditedHTML\" ); return false;' title='Insert left-side slanted sinqle quote at cursor position' class='htmlTags'>&lsquo;quote</button><button onClick='FW.insertTags( \"{rsquo}\", \"\", \"EditedHTML\" ); return false;' title='Insert right-side slanted sinqle quote at cursor position' class='htmlTags'>quote&rsquo;</button><button onClick='FW.insertTags( \"{ldquo}\", \"{rdquo}\", \"EditedHTML\" ); return false;' title='Insert &ldquo;double-quotes&rdquo; around highlighted text' class='htmlTags'>&ldquo;quotes&rdquo;</button><button onClick='FW.insertTags( \"{lsquo}\", \"{rsquo}\", \"EditedHTML\" ); return false;' title='Insert &lsquo;single-quotes&rsquo; around highlighted text' class='htmlTags'>&lsquo;quotes&rsquo;</button>";this.JsNotes="";this.JsButtons="<button onClick='FW.insertTags( \"{#256}\", \"\", \"EditedJS\" ); return false;' title='Insert capital A-macron at cursor position' class='htmlTags'>&#256;</button><button onClick='FW.insertTags( \"{#257}\", \"\", \"EditedJS\" ); return false;' title='Insert lowercase a-macron at cursor position' class='htmlTags'>&#257;</button><button onClick='FW.insertTags( \"{#274}\", \"\", \"EditedJS\" ); return false;' title='Insert capital E-macron at cursor position' class='htmlTags'>&#274;</button><button onClick='FW.insertTags( \"{#275}\", \"\", \"EditedJS\" ); return false;' title='Insert lowercase e-macron at cursor position' class='htmlTags'>&#275;</button><button onClick='FW.insertTags( \"{#298}\", \"\", \"EditedJS\" ); return false;' title='Insert capital I-macron at cursor position' class='htmlTags'>&#298;</button><button onClick='FW.insertTags( \"{#299}\", \"\", \"EditedJS\" ); return false;' title='Insert lowercase i-macron at cursor position' class='htmlTags'>&#299;</button><button onClick='FW.insertTags( \"{#332}\", \"\", \"EditedJS\" ); return false;' title='Insert capital O-macron at cursor position' class='htmlTags'>&#332;</button><button onClick='FW.insertTags( \"{#333}\", \"\", \"EditedJS\" ); return false;' title='Insert lowercase o-macron at cursor position' class='htmlTags'>&#333;</button><button onClick='FW.insertTags( \"{#362}\", \"\", \"EditedJS\" ); return false;' title='Insert capital U-macron at cursor position' class='htmlTags'>&#362;</button><button onClick='FW.insertTags( \"{#363}\", \"\", \"EditedJS\" ); return false;' title='Insert lowercase u-macron at cursor position' class='htmlTags'>&#363;</button><button onClick='FW.insertTags( \"{lsquo}\", \"\", \"EditedJS\" ); return false;' title='Insert left-side slanted sinqle quote at cursor position' class='htmlTags'>&lsquo;quote</button><button onClick='FW.insertTags( \"{rsquo}\", \"\", \"EditedJS\" ); return false;' title='Insert right-side slanted sinqle quote at cursor position' class='htmlTags'>quote&rsquo;</button>";switch(fileName){case "default.aspx":this.JsNotes="The Images Array below controls the photos that show on the slide-show and they must be sized to exactly 950 &times; 317 pixels. This dimension matches the 3 to 1 aspect ratio of a panoramic camera. Need help? Here's <a href='javascript:PopUp.openWin( \"http://www.davidregier.com/webdesign/other/images.html?ss=ss\" );' class='fw' title='Preparing images for the Slide-Show'>instructions</a> on preparing images for your slide-show. Keep your file sizes under &plusmn;300 KB and they should never exceed 500 KB (&frac12; megabyte)<ol><li>To add a new photo you will first prepare & <a href='javascript:PopUp.openWin( \"uploader.aspx\", 650, 300, 2, 0, 0, 1, 0, 0, 0 );' onMouseover='this.title=Msg.Upload;' class='fw'>upload</a> the image at the dimensions noted above.</li><li>Click slide-show image to skip, and right-click (ctrl+click on mac) to pause and get image properties (file name, size, number) & run at hi-speed.</li></ol>";break;case "family-portraits.aspx":this.JsButtons+="<button onClick='FW.insertTags( \"[\\\"\", \"\\\",???,???,\\\"\\\"],\", \"EditedJS\" ); return false;' title='Insert new blank image at cursor position' class='htmlTags'>New Image</button><button onClick='FW.insertTags( \"{#149}\", \"\", \"EditedJS\" ); return false;' title='Insert bullet &#149; character entity at cursor position' class='htmlTags'>&#149;</button><button onClick='FW.insertTags( \"{ldquo}\", \"{rdquo}\", \"EditedJS\" ); return false;' title='Insert &ldquo;double-quotes&rdquo; around highlighted text' class='htmlTags'>&ldquo;Quotes&rdquo;</button>";this.JsNotes="The Images Array below controls the photos that show in the <a href='javascript:void(0);' onClick='return launchSS( this, \"images-family-portraits.js\" );' class='fw' title='Run Slide-Show'>Slide-Show</a>. Resize them so the longest edge is 750 px. For example, a typical horizontal would be 750&times;500 while a vertical would be 500&times;750. Need help? Here's <a href='javascript:PopUp.openWin( \"http://www.davidregier.com/webdesign/other/images.html?ss=ss\" );' class='fw' title='Preparing images for the Slide-Show'>instructions</a> on preparing images for your slide-show. Keep your file sizes under &plusmn;300 KB and they should never exceed 500 KB (&frac12; megabyte)<ol><li>To add a new photo you will first prepare & <a href='javascript:PopUp.openWin( \"uploader.aspx\", 650, 300, 2, 0, 0, 1, 0, 0, 0 );' onMouseover='this.title=Msg.Upload;' class='fw'>upload</a> the image at the dimensions noted above.</li><li>Right-click (ctrl+click on macs) any slide-show image to pause and get image properties (file name, size, number)</li><li>Upon successful upload you then need to add the data for this image, there are two ways:<ol type='a'><li>Automated Method (recommended): You will auto-insert your new image data from within the uploader. After your upload, you will click the link provided in the uploader. Doing so auto-appends the data for this new image as the last image in the data array, type in your photo caption & publish.</li><li>Manual Method: With your cursor at the beginning of the new line, click the \"New Image\" button. A blank data structure is auto-inserted. The dimensions are auto-filled for you at ???&times;???. Overtype ??? with the true width & height.</li></ol></li><li>Photo data from left to right is: (1) Photo Filename, within double quotes. (2) Photo width in pixels. (3) Photo height in pixels. (4) Caption, if none, leave blank (empty double quotes). For lengthy captions that wrap, you should [Place the 2nd line in brackets like this][Even the 3rd (or more) lines work!]</li><li>On rare occasions, you may need to use double quotes w/i the Caption (4th field). If so, you must use special quotes. Here's how: Highlight the text you would like quoted then click &ldquo;Quotes&rdquo;</li></ol>";break;}
this.XmlNotes="";if(DB.Administrators[userWithWritePrivileges])this.AdminLinks="<a href='javascript:void(0);' class='AdminLinkTopLeft' onMouseOver='if( window.Menu ) { Menu.clearAll(); Menu.show( this, \"Admin_Options\", 34, event, 0, 4 ); }' onMouseOut='if( window.Menu ) Menu.hide([[\"Admin_Options\"]]);'>Admin</a>";this.NotesBot="Just published but don&rsquo;t see your changes? Press Reload &nbsp;&#149;&nbsp; Completely ruined a page? Go to Help &rArr; Restore";this.getLogInGUI=getLogInGUI;this.logIn=logIn;this.recordPW=recordPW;this.pollAdministrators=pollAdministrators;if(!userWithWritePrivileges){var loginFailed=(qStr&&qStr.getVal("login_failure"))?qStr.getVal("login_failure"):"";if(loginFailed){if(loginFailed=="pw")alert("Incorrect Password");else
alert("User \u201C"+qStr.getVal("bad_name")+"\u201D not found");}
return;}
this.dataUnmodified=dataUnmodified;this.help=help;this.showHelp=showHelp;this.restore=restore;this.insertTags=insertTags;this.init=init;this.checkContent=checkContent;this.resetUI=resetUI;this.reLoad=reLoad;this.logOff=logOff;this.cursorReadyHtm=false;this.cursorReadyJS=false;this.init();function showHelp(Link){var PlsMin=Link.previousSibling;var Content=Link.nextSibling;if(Content.className=="fw1"){Content.className="fw0";PlsMin.innerHTML="+";}
else{Content.className="fw1";PlsMin.innerHTML="-";}}
function help(nType,Link,evt){function getHelpTxt(helpType){var Now=new Date();var todayOut=Now.getDayName()+" "+Now.getMonthName()+" "+Now.getDate()+", "+Now.getFullYear()+".";var htm="<div class='fwHelpSect'><a href='javascript:void(0)' onClick='FW.showHelp(this.nextSibling);' class='fwPlusMinus'>+</a><a href='javascript:void(0);' onClick='FW.showHelp(this);' class='dwLink'>Reload & Cache</a><div class='fw0'><u>Cache Defined</u>: All browsers seamlessly store all recent pages that you have visited on your hard drive. This process is called \"caching\" and it greatly speeds up your web browsing because your browser is able to later retrieve these web pages off your hard drive much quicker than downloading them again from the server.<br/><br/><u>Caching will cause problems for you</u> because after you press Publish, and the page reloads, you may be looking at a past cached version of that page rather than the most recent version which you just published and are naturally expecting to see.<br/><br/><u>Remember this mantra</u> & you will eliminate cache frustrations forever!<br/>&nbsp;&nbsp;\"Just Published but don't see your changes? Then press Reload\"</div></div><div class='fwHelpSect'><a href='javascript:void(0)' onClick='FW.showHelp(this.nextSibling);' class='fwPlusMinus'>+</a><a href='javascript:void(0);' onClick='FW.showHelp(this);' class='dwLink'>Publish "+helpType+"</a><div class='fw0'>Press Publish-"+helpType+" after you have made your edits. Your changes will be permanently written to file and the page will be reloaded. After the page reloads, verify your changes. If you don't see them press Reload.";if(helpType=="XML")htm+=" Changes made to XML data update across entire site immediately";htm+="</div></div><div class='fwHelpSect'><a href='javascript:void(0)' onClick='FW.showHelp(this.nextSibling);' class='fwPlusMinus'>+</a><a href='javascript:void(0);' onClick='FW.showHelp(this);' class='dwLink'>Reset</a><div class='fw0'>Press Reset if you made edits but then changed your mind or you just want to start over. The content in the text-box will revert back to original start-up values since you last published, or if you haven't published, since you logged in. If you need to go back to an earlier date or time, try Restore...</div></div><div class='fwHelpSect'><a href='javascript:void(0)' onClick='FW.showHelp(this.nextSibling);' class='fwPlusMinus'>+</a><a href='javascript:void(0);' onClick='FW.showHelp(this);' class='dwLink'>Restore</a><div class='fw0'>Restore is the ultimate &ldquo;safety net&rdquo; and more powerful that reset because it let's you go back to an earlier date & time. If you made a mistake, which you only realized after publishing, then try restore. Today is "+todayOut+"<div align='center' style='margin:4px 0px 0px 0px;'><form>";if(helpType=="HTML"){var BackUpHTM=document.AspForm.BackUpHTM;htm+="<input type='button' value='Restore To:' onClick='return FW.restore( \"RestoreHTM\" );' title='Restore this file to a prior selected time' />&nbsp;&nbsp;";htm+="<select id='BackUpHTM_PopUp' title='Select a prior restore point'>";if(BackUpHTM.length>1){for(var i=0;i<BackUpHTM.length;i++){if(i==0)htm+="<option value='"+BackUpHTM[i].value+"'>Undo Restore</option>";else
htm+="<option value='"+BackUpHTM[i].value+"'"+((i==1)?" selected='selected'":"")+">"+i+". "+(new Date(parseInt(BackUpHTM[i].text))).toLocaleString()+"</option>";}}
else
htm+="<option value=''>"+BackUpHTM[0].text+"</option>";htm+="</select>";}
else if(helpType=="JavaScript"){var BackUpJS=document.AspForm.BackUpJS;htm+="<input type='button' value='Restore To:' onClick='return FW.restore( \"RestoreJS\" );' title='Restore this file to a prior selected time' />&nbsp;&nbsp;";htm+="<select id='BackUpJS_PopUp' title='Select a prior restore point'>";if(BackUpJS.length>1){for(var i=0;i<BackUpJS.length;i++){if(i==0)htm+="<option value='"+BackUpJS[i].value+"'>Undo Restore</option>";else
htm+="<option value='"+BackUpJS[i].value+"'"+((i==1)?" selected='selected'":"")+">"+i+". "+(new Date(parseInt(BackUpJS[i].text))).toLocaleString()+"</option>";}}
else
htm+="<option value=''>"+BackUpJS[0].text+"</option>";htm+="</select>";}
else{var BackUpXML=document.AspForm.BackUpXML;htm+="<input type='button' value='Restore To:' onClick='return FW.restore( \"RestoreXML\" );' title='Restore this file to a prior selected time' />&nbsp;&nbsp;";htm+="<select id='BackUpXML_PopUp' title='Select a prior restore point'>";if(BackUpXML.length>1){for(var i=0;i<BackUpXML.length;i++){if(i==0)htm+="<option value='"+BackUpXML[i].value+"'>Undo Restore</option>";else
htm+="<option value='"+BackUpXML[i].value+"'"+((i==1)?" selected='selected'":"")+">"+i+". "+(new Date(parseInt(BackUpXML[i].text))).toLocaleString()+"</option>";}}
else
htm+="<option value=''>"+BackUpXML[0].text+"</option>";htm+="</select>";}
htm+="</form></div><ol style='margin-top:4px; margin-bottom:4px;'><li style='margin-left:-10px;'>Select a restore date. They will be listed & numbered with the most recent at the top.</li><li style='margin-left:-10px;'>If you don't know which date to select, try the immediate prior backup. It will be #1 and selected for you by default. \"Restore To\" the selected date & time. If that doesn't help try #2, #3 and so on...</li><li style='margin-left:-10px;'>After restoring, if it appears the problem is not resolved, first press reload before doing another restore.</li><li style='margin-left:-10px;'>The restore process itself is completely reversible and you can go back in time, then come forward again. After performing restore(s), you can even come right back to where you began by restoring to &ldquo;Undo Restore&rdquo; from the top of the list.</li></ol></div></div><div class='fwHelpSect'><a href='javascript:void(0)' onClick='FW.showHelp(this.nextSibling);' class='fwPlusMinus'>+</a><a href='javascript:void(0);' onClick='FW.showHelp(this);' class='dwLink'>About "+helpType+"</a><div class='fw0'>";if(helpType=="HTML")htm+="<ol style='margin-top:4px; margin-bottom:4px;'><li style='margin-left:-10px;'>HTML (<b>H</b>yper <b>T</b>ext <b>M</b>arkup <b>L</b>anguage) is a web formating language: <a href='javascript:PopUp.openWin( \"http://en.wikipedia.org/wiki/Html\" );' class='dwLink'>Learn more</a></li><li style='margin-left:-10px;'>Need help with your HTML skills? Try <a href='javascript:PopUp.openWin( \"http://www.w3schools.com/html/html_primary.asp\" );' class='dwLink'>W3schools.com</a></li></ol>";else if(helpType=="JavaScript")htm+="JavaScript is a popular web programming language: <a href='javascript:PopUp.openWin( \"http://en.wikipedia.org/wiki/JavaScript\" );' class='dwLink'>Learn more</a>";else
htm+="XML (e<b>X</b>tensible <b>M</b>arkup <b>L</b>anguage) is a web data-base language: <a href='javascript:PopUp.openWin( \"http://en.wikipedia.org/wiki/Xml\" );' class='dwLink'>Learn more</a>";htm+="</div></div>";return htm;}
var DataSrc;switch(nType){case 1:DataSrc=["Publishing HTML",getHelpTxt("HTML")];break;case 2:DataSrc=["Publishing JavaScript",getHelpTxt("JavaScript")];break;case 3:DataSrc=["Publishing XML",getHelpTxt("XML")];break;}
if(window.DW)DW.createWindow(DataSrc,[1,600,300],Link,evt,6,[2,0,-15]);}
function restore(aspJob){var Form=document.AspForm;if(aspJob=="RestoreHTM"&&Form.BackUpHTM&&Form.BackUpHTM[Form.BackUpHTM.selectedIndex].value==""||aspJob=="RestoreJS"&&Form.BackUpJS&&Form.BackUpJS[Form.BackUpJS.selectedIndex].value==""||aspJob=="RestoreXML"&&Form.BackUpXML&&Form.BackUpXML[Form.BackUpXML.selectedIndex].value==""){alert("No action taken: There are no restore dates...");return false;}
switch(aspJob){case "RestoreHTM":Form.BackUpHTM.selectedIndex=document.getElementById("BackUpHTM_PopUp").selectedIndex;break;case "RestoreJS":Form.BackUpJS.selectedIndex=document.getElementById("BackUpJS_PopUp").selectedIndex;break;case "RestoreXML":Form.BackUpXML.selectedIndex=document.getElementById("BackUpXML_PopUp").selectedIndex;break;default:alert("Switch/Case Error at FW.restore");}
Form.ASP_Job.value=aspJob;Form.submit();}
function insertTags(tagOpen,tagClose,TextBoxID){tagOpen=tagOpen.replace(/\{/g, "&" ).replace(/\}/g, ";" );
tagClose=tagClose.replace(/\{/g, "&" ).replace(/\}/g, ";" );
var editHTML=(TextBoxID=="EditedHTML");var editDATA=!editHTML;if(this.cursorReadyHtm&&editHTML||this.cursorReadyJS&&editDATA){var TextArea=document.getElementById(TextBoxID);if(IE){var theSelection=document.selection.createRange().text;TextArea.focus();if(theSelection.charAt(theSelection.length-1)==" "){theSelection=theSelection.substring(0,theSelection.length-1);document.selection.createRange().text=tagOpen+theSelection+tagClose+" ";}
else
document.selection.createRange().text=tagOpen+theSelection+tagClose;}
else{var replaced=false;var startPos=TextArea.selectionStart;var endPos=TextArea.selectionEnd;if(endPos-startPos)replaced=true;var scrollTop=TextArea.scrollTop;var myText=(TextArea.value).substring(startPos,endPos);if(myText.charAt(myText.length-1)==" ")subst=tagOpen+myText.substring(0,(myText.length-1))+tagClose+" ";else
subst=tagOpen+myText+tagClose;TextArea.value=TextArea.value.substring(0,startPos)+subst+TextArea.value.substring(endPos,TextArea.value.length);TextArea.focus();if(replaced){var cPos=startPos+(tagOpen.length+myText.length+tagClose.length);TextArea.selectionStart=cPos;TextArea.selectionEnd=cPos;}
else{TextArea.selectionStart=startPos+tagOpen.length;TextArea.selectionEnd=startPos+tagOpen.length+myText.length;}
TextArea.scrollTop=scrollTop;}
if(TextArea.createTextRange)TextArea.caretPos=document.selection.createRange().duplicate();if(editHTML)document.getElementById("PublishHTM").className="publishOn";else
document.getElementById("PublishJS").className="publishOn";}
else
alert("To auto-insert you must either:\n1) Place your cursor at the location where you are inserting into, or...\n2) If you are applying an HTML formatting tag (like bold), highlight the text you would like formatted.");}
function init(){var help="About Caching, Reload, Publish, Reset & Restore";var justPub="Refresh page to override cached (old) version";try{var TheBody=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;var textBoxWid=TheBody.clientWidth-140;textBoxWid=(textBoxWid>1200)?1200:textBoxWid;var EditContainerHTM=document.getElementById("EditContainerHTM");var table1="<table align='center'><tr><td>",table2="</td></tr></table>";if(EditContainerHTM&&EditContainerHTM.className=="on"){var HtmTitle=document.getElementById("HtmTitle");if(HtmTitle.innerHTML=="")HtmTitle.innerHTML="HTML CONTENT FOR THIS PAGE";var HtmNotes=document.getElementById("HtmNotes");if(HtmNotes.innerHTML=="")HtmNotes.innerHTML=table1+this.HtmNotes+table2;HtmNotes.style.width=textBoxWid+"px";var HtmButtons=document.getElementById("HtmButtons");if(HtmButtons.innerHTML=="")HtmButtons.innerHTML=this.HtmButtons;var EditedHTML=document.getElementById("EditedHTML");EditedHTML.onfocus=function(){this.title="Edit text then press \"Publish HTML\"";FW.cursorReadyHtm=true;}
EditedHTML.onkeyup=function(){document.getElementById("PublishHTM").className=(this.value==this.defaultValue)?"publishOff":"publishOn";}
EditedHTML.style.width=textBoxWid+"px";var HtmNotesBot=document.getElementById("HtmNotesBot");HtmNotesBot.innerHTML=this.NotesBot;var HelpHTM=document.getElementById("HelpHTM");HelpHTM.onmouseover=function(){this.title=help;}
var ReloadHTM=document.getElementById("ReloadHTM");ReloadHTM.onmouseover=function(){this.title=justPub;}
ReloadHTM.onclick=function(){FW.reLoad("EditedHTML");}
var PublishHTM=document.getElementById("PublishHTM");PublishHTM.style.width=(PublishHTM.offsetWidth+10)+"px";PublishHTM.onmouseover=function(){this.title="Save HTML to the web";}
PublishHTM.onclick=function(){return FW.checkContent(1);}
var ResetHTM=document.getElementById("ResetHTM");ResetHTM.onmouseover=function(){this.title="Revert HTML back to original values since you last published";}
ResetHTM.onclick=function(){FW.resetUI("EditedHTML");}}
var EditContainerJS=document.getElementById("EditContainerJS");if(EditContainerJS&&EditContainerJS.className=="on"){var JsTitle=document.getElementById("JsTitle");if(JsTitle.innerHTML=="")JsTitle.innerHTML="JAVASCRIPT DATA";var JsNotes=document.getElementById("JsNotes");if(JsNotes.innerHTML=="")JsNotes.innerHTML=table1+this.JsNotes+table2;JsNotes.style.width=textBoxWid+"px";var JsButtons=document.getElementById("JsButtons");if(JsButtons.innerHTML=="")JsButtons.innerHTML=this.JsButtons;var EditedJS=document.getElementById("EditedJS");EditedJS.onfocus=function(){this.title="Edit data then press \"Publish JavaScript\"";FW.cursorReadyJS=true;}
EditedJS.onkeyup=function(){document.getElementById("PublishJS").className=(this.value==this.defaultValue)?"publishOff":"publishOn";}
EditedJS.style.width=textBoxWid+"px";var JsNotesBot=document.getElementById("JsNotesBot");JsNotesBot.innerHTML=this.NotesBot;var HelpJS=document.getElementById("HelpJS");HelpJS.onmouseover=function(){this.title=help;}
var ReloadJS=document.getElementById("ReloadJS");ReloadJS.onmouseover=function(){this.title=justPub;}
ReloadJS.onclick=function(){FW.reLoad("EditedJS");}
var PublishJS=document.getElementById("PublishJS");PublishJS.style.width=(PublishJS.offsetWidth+10)+"px";PublishJS.onmouseover=function(){this.title="Save JavaScript to the web";}
PublishJS.onclick=function(){return FW.checkContent(2);}
var ResetJS=document.getElementById("ResetJS");ResetJS.onmouseover=function(){this.title="Revert JavaScript back to original values since you last published";}
ResetJS.onclick=function(){FW.resetUI("EditedJS");}}
var EditContainerXML=document.getElementById("EditContainerXML");if(EditContainerXML&&EditContainerXML.className=="on"){var XmlTitle=document.getElementById("XmlTitle");if(XmlTitle.innerHTML=="")XmlTitle.innerHTML="GLOBAL XML DATA";var XmlNotes=document.getElementById("XmlNotes");if(XmlNotes.innerHTML=="")XmlNotes.innerHTML=table1+this.XmlNotes+table2;XmlNotes.style.width=textBoxWid+"px";var EditedXML=document.getElementById("EditedXML");EditedXML.onfocus=function(){this.title="Edit data then press \"Publish XML\"";}
EditedXML.onkeyup=function(){document.getElementById("PublishXML").className=(this.value==this.defaultValue)?"publishOff":"publishOn";}
EditedXML.style.width=textBoxWid+"px";var XmlNotesBot=document.getElementById("XmlNotesBot");XmlNotesBot.innerHTML=this.NotesBot;var HelpXML=document.getElementById("HelpXML");HelpXML.onmouseover=function(){this.title=help;}
var ReloadXML=document.getElementById("ReloadXML");ReloadXML.onmouseover=function(){this.title=justPub;}
ReloadXML.onclick=function(){FW.reLoad("EditedXML");}
var PublishXML=document.getElementById("PublishXML");PublishXML.style.width=(PublishXML.offsetWidth+10)+"px";PublishXML.onmouseover=function(){this.title="Save XML to the web";}
PublishXML.onclick=function(){return FW.checkContent(3);}
var ResetXML=document.getElementById("ResetXML");ResetXML.onmouseover=function(){this.title="Revert XML back to original values since you last published";}
ResetXML.onclick=function(){FW.resetUI("EditedXML");}}
var htm="<div class='otherFunctions'><a href='javascript:FW.logOff();' title='Log off as administrator' class='fw'>Log Off</a>";htm+=this.AdminLinks;htm+="</div>";var FwBottomRow=document.getElementById("fwBottomRow");if(FwBottomRow)FwBottomRow.innerHTML=htm;self.status="";}
catch(Err){if(local){var err="";for(member in Err)err+=member+": "+Err[member]+"\n";alert("Exception at method FW.init:\n\n"+err);}
else{setTimeout("FW.init();",250);self.status="Initializing File Writer: FW.init()...";}}}
function checkContent(dataType){function subDisableTextBoxes(htm,js,xml){if(htm&&document.getElementById("EditedHTML"))document.getElementById("EditedHTML").disabled=true;if(js&&document.getElementById("EditedJS"))document.getElementById("EditedJS").disabled=true;if(xml&&document.getElementById("EditedXML"))document.getElementById("EditedXML").disabled=true;}
var Form=document.AspForm;var EditedHTML=Form.EditedHTML;var EditedJS=Form.EditedJS;var EditedXML=Form.EditedXML;if(dataType==1){if(this.dataUnmodified(dataType)){alert("Edit the text then press Publish HTML...");EditedHTML.focus();FW.cursorReadyHtm=false;return false;}
else{var htm=EditedHTML.value.trim();htm=htm.replace(/largePic\( *'/g, "largePic( '" );
var LargePic=htm.split("largePic( '");for(var i=1;i<LargePic.length;i++){var LargePicArgs=LargePic[i].split(");");var otherArgs=LargePicArgs[0].substring(LargePicArgs[0].lastIndexOf("'"));LargePicArgs[0]=LargePicArgs[0].substring(0,LargePicArgs[0].lastIndexOf("'"));LargePicArgs[0]=LargePicArgs[0].replace(/"/g, "&#34;" ).replace(/'/g, "\\&#39;" ) + otherArgs;
LargePicArgs=LargePicArgs.join(");");LargePic[i]=LargePicArgs;}
htm=LargePic.join("largePic( '");EditedHTML.value=htm;document.getElementById("PublishHTM").disabled=true;Form.Which_Button.value="html";subDisableTextBoxes(0,1,1);}}
else if(dataType==2){if(this.dataUnmodified(dataType)){alert("Edit the data then press Publish JavaScript...");EditedJS.focus();FW.cursorReadyJS=false;return false;}
else{try{eval(EditedJS.value);}
catch(Err){var err="";for(member in Err)err+=member+": "+Err[member]+"\n";alert("Sorry, you have mistakenly broken JavaScript's rigid syntax. As a result, the file cannot be saved to disk. Fix the error & try again or click \"Reset\"...\n\n"+err);return false;}
EditedJS.value=EditedJS.value.trim();document.getElementById("PublishJS").disabled=true;Form.Which_Button.value="js";subDisableTextBoxes(1,0,1);}}
else{if(this.dataUnmodified(dataType)){alert("Edit the text then press Publish XML...");EditedXML.focus();return false;}
else{var textOrig=EditedXML.defaultValue;var textNew=EditedXML.value.trim();var xmlOrig=textOrig.replace(/>[^<>]*</g, "><" );
var nLinesOrig=textOrig.split("\n").length;var xmlNew=textNew.replace(/>[^<>]*</g, "><" );
var nLinesNew=textNew.split("\n").length;if(xmlOrig==xmlNew&&nLinesOrig==nLinesNew){var xml=EditedXML.value;xml=xml.replace(/&amp;/g, "a_m_p_e_r_s_a_n_d" );
xml=xml.replace(/\\\"/g, "q_u_o_t_e" );
xml=xml.replace(/&/g, "&amp;" );
xml=xml.replace(/\"/g, "\\\"" );
xml=xml.replace(/q_u_o_t_e/g, "\\\"" );
xml=xml.replace(/a_m_p_e_r_s_a_n_d/g, "&amp;" );
EditedXML.value=xml;document.getElementById("PublishXML").disabled=true;Form.Which_Button.value="xml";subDisableTextBoxes(1,1,0);}
else{var err=", as a result, the file cannot be saved to disk. Please edit the data only then press Publish XML.\n\n==> Fix the error & try again or click \"Reset\"";if(nLinesOrig!=nLinesNew)alert("ERROR: You have added or removed lines"+err);else
alert("ERROR: You have edited XML tag(s)"+err);EditedXML.focus();return false;}}
var xml=EditedXML.value.trim();var XML=xml.split(">");for(var i=0;i<XML.length;i++)XML[i]=XML[i].replace(/^ +/g, "" );
xml=XML.join(">");var XML=xml.split("</");for(var i=0;i<XML.length;i++)if(XML[i].indexOf("<")>=0)XML[i]=XML[i].replace(/ +$/g, "" );
xml=XML.join("</");EditedXML.value=xml;}
Form.ASP_Job.value="File_Writer";Form.submit();return true;}
function dataUnmodified(dataType){var Form=document.AspForm;dateUnedited="",dateEdited="";switch(dataType){case 1:dateUnedited=Form.EditedHTML.value;dateEdited=Form.EditedHTML.defaultValue;break;case 2:dateUnedited=Form.EditedJS.value;dateEdited=Form.EditedJS.defaultValue;break;case 3:dateUnedited=Form.EditedXML.value;dateEdited=Form.EditedXML.defaultValue;break;default:alert("Switch/Case Error at FW.dataUnmodified; Bad dataType: "+dataType);}
return(dateUnedited==dateEdited);}
function resetUI(TextBox){if(TextBox=="EditedHTML"){this.cursorReadyHtm=false;document.getElementById("PublishHTM").className="publishOff";}
else if(TextBox=="EditedJS"){this.cursorReadyJS=false;document.getElementById("PublishJS").className="publishOff";}
else
document.getElementById("PublishXML").className="publishOff";eval("document.AspForm."+TextBox+".value = document.AspForm."+TextBox+".defaultValue;");}
function reLoad(TextBox){if(eval("document.AspForm."+TextBox+".value")==eval("document.AspForm."+TextBox+".defaultValue"))document.location.reload(true);else if(confirm("You have made edits but have not saved (published) them. Your unpublished edits will be lost upon reloading this page. Do you still want to reload?\n\n1) Click OK to reload, unpublished edits will be lost.\n2) Click Cancel to stop the page from reloading."))document.location.reload(true);}
function logOff(){var url=fileName+"?logoff=yes"
if(qStr&&qStr.getVal("db"))url+="&db="+qStr.getVal("db");document.location.replace(url);}
function logIn(Form){var UserName=Form.user;var userNameFW=UserName.value.trim();UserName.value=userNameFW;var PW=Form.pw;var pwFW=PW.value.trim();PW.value=pwFW;if(userNameFW==""){alert("Please enter your user name");UserName.focus();return false;}
else if(pwFW==""){alert("Please enter your password");PW.focus();return false;}
else{if(Form.remember_pw.checked){var pwOut="";var pwIn=Form.pw.value;for(var i=0;i<=pwIn.length;i++)pwOut=pwIn.charAt(i)+pwOut;SetCookie("pwFW",pwOut,expDate12Mon);}
else
DeleteCookie("pwFW");}
if(userNameFW)SetCookie("userNameFW",userNameFW,expDate12Mon);return true;}
function recordPW(CheckBox){if(CheckBox.checked){var pw=document.LogIn.pw.value;if(pw){var pwOut="";for(var i=0;i<=pw.length;i++)pwOut=pw.charAt(i)+pwOut;SetCookie("pwFW",pwOut,expDate12Mon);}}
else
DeleteCookie("pwFW");}
function getLogInGUI(evt,RequestedPos){if(!evt)evt=window.event;var userNameFW=(GetCookie("userNameFW"))?GetCookie("userNameFW"):"";var pwFW=(GetCookie("pwFW"))?GetCookie("pwFW"):"";var pwOut="";if(pwFW)for(var i=0;i<=pwFW.length;i++)pwOut=pwFW.charAt(i)+pwOut;var pwChecked=(pwFW)?" checked":"";var gui="<form name='LogIn' method='post' onSubmit='return FW.logIn( this );' style='margin:0px;'><table align='center'><tr><td><table align='center'><tr><td class='fwField' style='padding-top:6px;'>User Name</td><td class='fwValue' style='padding-top:6px;' id='tdBookingID'><input type='text' name='user' class='fwText' title='Case sensitive user-name' value='"+userNameFW+"' /></td></tr><tr><td class='fwField' style='padding-top:6px;'>Password</td><td class='fwValue' style='padding-top:6px;' id='tdBookingID'><input type='"+((local)?"text":"password")+"' name='pw' autocomplete='off' value='"+pwOut+"' class='fwText' title='Case sensitive password' /></td></tr><tr><td align='center' colspan='2' class='fwValue' style='padding-top:6px; white-space:nowrap;'><input type='checkbox' id='remember_pw' name='remember_pw' onClick='FW.recordPW( this );'"+pwChecked+" /><label for='remember_pw'> Remember Me</label></td></tr><tr><td align='center' colspan='2' style='padding:10px 0px 0px 0px; white-space:nowrap;'><input type='submit' name='OK' value='OK' class='logInButtons' /><input type='button' value='Cancel' class='logInButtons' onClick='DW.removeWin();' /></td></tr></table></td></tr></table></form>";RequestedPos=(RequestedPos)?RequestedPos:null;DW.createWindow(["Administrator Log-In",gui],[0,300,0],null,evt,6,RequestedPos);if(userNameFW&&pwFW)setTimeout("document.LogIn.OK.focus();",100);else if(userNameFW)setTimeout("document.LogIn.pw.focus();",100);else
setTimeout("document.LogIn.user.focus();",100);}
function pollAdministrators(){if(userWithWritePrivileges){var EditContainer=document.getElementById("EditContainer");if(EditContainer&&EditContainer.className!="offScreen"||fileName=="calendar.aspx"){if(window.XMLHttpRequest){try{this.Request=new XMLHttpRequest();}
catch(Err){this.Request=null;}}
else if(window.ActiveXObject){try{this.Request=new ActiveXObject("Msxml2.XMLHTTP");}
catch(Err){try{this.Request=new ActiveXObject("Microsoft.XMLHTTP");}
catch(Err){this.Request=null;}}}
if(this.Request){this.Request.onreadystatechange=function(){if(FW.Request.readyState==4){if(FW.Request.status==200||FW.Request.status==304){var XmlDoc=FW.Request.responseXML;var User=XmlDoc.getElementsByTagName("user");var thisUserMS=0;var OtherUsers=new Array();var db=qStr.getVal("db")?"?db="+qStr.getVal("db"):"";for(var i=0;i<User.length;i++){var UserNode=(User[i].firstChild.nodeType==1)?User[i].firstChild:User[i].firstChild.nextSibling;var userXML=UserNode.childNodes[0].nodeValue.replace(/_/, " " );
var PageNode=(UserNode.nextSibling.nodeType==1)?UserNode.nextSibling:UserNode.nextSibling.nextSibling;var pageXML=PageNode.childNodes[0].nodeValue;var forcedOutBy=PageNode.getAttribute("forced-out-by").replace(/_/, " " );
var TimeNode=(PageNode.nextSibling.nodeType==1)?PageNode.nextSibling:PageNode.nextSibling.nextSibling;var timeXML=parseInt(TimeNode.childNodes[0].nodeValue);if(pageXML==fileName+db){if(userWithWritePrivileges==userXML){thisUserMS=timeXML;if(forcedOutBy&&EditContainer.className!="off"){alert("Sorry, but "+forcedOutBy+" has just forced a log-in to this page, as a result, your editing privileges are suspended. Note however, you haven't been logged off and may continue editing other pages.");EditContainer.className="off";if(fileName=="calendar.aspx"){document.getElementById("CalGreeting").className="off";document.getElementById("calButtonsTop").className="off";document.getElementById("calButtonsBot").className="off";}
break;}}
else
OtherUsers.push([userXML,pageXML,forcedOutBy,timeXML]);}}
if(OtherUsers.length){var otherUsers="";for(var i=0;i<OtherUsers.length;i++){if(thisUserMS>OtherUsers[i][3]&&OtherUsers[i][2]==""){var Now=new Date();var nowMS=Now.getTime();var timeDiffSec=(nowMS-OtherUsers[i][3])/1000;var timeDiffMin=timeDiffSec/60;var timeDiffOut="";if(timeDiffMin<2)timeDiffOut=Math.round(timeDiffSec)+" seconds";else if(timeDiffMin>=2&&timeDiffMin<=120)timeDiffOut=Math.round(timeDiffMin)+" minutes";else if(timeDiffMin>120&&timeDiffMin<=(2*1440))timeDiffOut=Math.round(timeDiffMin/60)+" hours";else{var UserLoginDate=new Date(OtherUsers[i][3]);var UserLoginMidNite=new Date(UserLoginDate.getFullYear(),UserLoginDate.getMonth(),UserLoginDate.getDate());var NowMidNite=new Date(Now.getFullYear(),Now.getMonth(),Now.getDate());var userLoginMidNite=UserLoginMidNite.getTime();var nowMidNite=NowMidNite.getTime();var timeDiffMS=nowMidNite-userLoginMidNite;var timeDiffDays=timeDiffMS/86400000;timeDiffOut=Math.floor(timeDiffDays)+" days";}
otherUsers+=OtherUsers[i][0]+" logged into this page "+timeDiffOut+" ago.\n";}}
if(otherUsers){if(confirm("Concurrent Administrators Detected. To protect the integrity of our data, two or more users editing the same page at the same time is prohibited. The following users are logged into this page, or may have forgotten to log-off:\n\n"+otherUsers+"\n1. Click OK to force log-in which immediately suspends privileges for other users.\n2. Click Cancel & you'll remain logged with suspended privileges on this page.")){SetCookie("forcedLogin","yes");document.location.reload();}
else{SetCookie("cancelForceLogin","yes");document.location.replace(fileName+"?cancelForceLogin=yes"+db.replace(/^\?/, "&" ) );}}}}
FW.timer=setTimeout("FW.pollAdministrators();",5000);}}
this.Request.open("GET","users.xml?"+Math.random());this.Request.send(null);}}}}}
function refreshCookies(){var saveCart=GetCookie("saveCart");var showWelcome=GetCookie("showWelcome");if(saveCart){SetCookie("saveCart","yes",SaveCartExpDate);var cartData=GetCookie("cartData");if(cartData)SetCookie("cartData",cartData,SaveCartExpDate);if(!showWelcome&&cartData){SetCookie("showWelcome","no");var htm="<b>W</b>elcome & Aloha! Per your request, we saved your shopping cart from your previous visit. Would you like to review your shopping cart now?<div align='center' style='margin:15px 0px 0px 0px;'><input type='button' value='Yes' class='DwOkCancel' onClick='document.location.href=\"cart.aspx\";' title='Go to view-cart page' /> &nbsp; <input type='button' value='No' class='DwOkCancel' onClick='DW.removeWin();' title='Stay on current page' /></div>";DW.createWindow(["Shane Tegarden Photography",htm],[0,400,0],null,null,10,[4,0,0],null,1,1);}}}
function initPage(){try{FW=new FileWriter();var Links=document.links;for(var i=0;i<Links.length;i++){var LinkComponents=Links[i].href.split("/");var file=LinkComponents[LinkComponents.length-1].replace(/\?.*/, "" ).toLowerCase();
if(file==fileName.toLowerCase()){if(Links[i].className=="navBot")Links[i].className="navBotDisabled";if(Links[i].className=="navTop")Links[i].className="navTopDisabled";}
if(Links[i].className=="sponsor"){Links[i].onclick=function(event){showSponsor(this,event);this.title=Msg.SponsorBlurb;}}}
for(var i=0;i<Links.length;i++){var linkCls=Links[i].className;var linkProtocol=Links[i].protocol;var httpLink = ( /^http/i.test(linkProtocol));if(httpLink&&(linkCls=="navTop"||linkCls=="navTopDisabled"||linkCls=="navBot"||linkCls=="navBotDisabled")){var Link=Links[i];var RequestedPath=Link.pathname.split("/");var requestedPage=RequestedPath[RequestedPath.length-1];if(requestedPage=="checkout.aspx"||requestedPage=="cart.aspx")Links[i].onclick=function(event){return getShipTaxStatus(this,event,requestedPage,3);}
else
Links[i].onclick=function(){return setURL(this);}
Links[i].oncontextmenu=function(event){return reviewData(this,event);}}}
var publicUser=!userWithWritePrivileges;var Images=document.images;for(var i=0;i<Images.length;i++){if(live&&publicUser)Images[i].oncontextmenu=function(){return false;}
switch(Images[i].className){case "LeftSm":case "RightSm":case "sm":case "panormaic":Images[i].title=Msg.Enlarge;break;case "sponsor":Images[i].title=Msg.SponsorSite;break;case "kahiko":case "gallery":Images[i].title=Msg.Order;Images[i].onclick=function(){SC.loadPhotoOrderPage(this);}
break;}}
if(window.aspError)DW.createWindow(["Internal Server Error",aspError],[0,800,0],null,null,10,[4,0,0],null,1,1);else if(window.FileWriterLocked)DW.createWindow([FileWriterLocked[0],FileWriterLocked[1]],[0,500,0],null,null,10,[4,0,0],null,1,1);if(fileName!="cart.aspx"&&fileName!="checkout.aspx"){if(window.FW&&userWithWritePrivileges){var AdminLinkBot=document.getElementById("AdminLinkBot");if(AdminLinkBot){AdminLinkBot.className="pfHide on";document.getElementById("AdminLinkBot1").className="on";}
if(DB.Administrators[userWithWritePrivileges][1]==0){document.getElementById("MenuHeader").className="off";document.getElementById("MenuFooter").className="off";}
if(DB.Administrators[userWithWritePrivileges][1]==0&&DB.Administrators[userWithWritePrivileges][2]==0)document.getElementById("MenuUpload").className="off";if(DB.Administrators[userWithWritePrivileges][3]==0)document.getElementById("MenuXML").className="off";var LogInLink=document.getElementById("LogInLink");if(LogInLink&&fileName!="cart.aspx"&&fileName!="checkout.aspx"){LogInLink.innerHTML="Log-Off";LogInLink.className="navBot";LogInLink.onmouseover=function(){this.title=Msg.Logoff;}
LogInLink.onclick=function(){FW.logOff();}}}}
else
document.getElementById("AdminLinkBot").className="off";if(fileName=="kii-o-na-kahiko-order.aspx"){var BackLink=document.getElementById("BackLink");if(document.referrer&&document.referrer.indexOf("kii-o-na-kahiko.aspx")>=0)BackLink.innerHTML="<a href='javascript:history.back();' onMouseOver='this.title=Msg.Kiiona;' class='control'>&lArr; Back</a>";else
BackLink.innerHTML="<a href='kii-o-na-kahiko.aspx' onMouseOver='this.title=Msg.Kiiona;' class='control'>&lArr; Back</a>";document.getElementById("PlayAudio").title=Msg.AudioOn;}
if(fileName=="gallery-order.aspx"){var BackLink=document.getElementById("BackLink");if(document.referrer&&document.referrer.indexOf("gallery.aspx")>=0)BackLink.innerHTML="<a href='javascript:history.back();' onMouseOver='this.title=Msg.Gallery;' class='control'>&lArr; Back</a>";else
BackLink.innerHTML="<a href='gallery.aspx' onMouseOver='this.title=Msg.Gallery;' class='control'>&lArr; Back</a>";}
if(fileName!="cart.aspx"&&fileName!="checkout.aspx")refreshCookies();Menu=new DynamicMenu();DI=new DynamicIndex(1);DI.maintainState();self.status="";}
catch(Err){if(local){var eMsg="Exception at initPage function:\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";alert(eMsg);}
else setTimeout("initPage()",250);self.status="Executing initPage function, one moment please...";}}
function showHawaiiTime(){var gmtOffset=10;var now=new Date();var difhrs=now.getTimezoneOffset()/60;var lochrs=now.getHours();GMThours=lochrs+difhrs;now.setHours(GMThours-gmtOffset);var am_pm="AM";var hours=now.getHours();if(hours>=12)am_pm="PM";if(hours>=13)hours-=12;if(hours==0)hours="12";var minutes=now.getMinutes();if(minutes<10)minutes="0"+minutes;var seconds=now.getSeconds();if(seconds<10)seconds="0"+seconds;try{document.getElementById("hawaii_time").innerHTML=hours+":"+minutes+":"+seconds+" "+am_pm;}
catch(Err){}
finally{setTimeout("showHawaiiTime()",1000);}}
function getEmailLink(emailAddress){return "<a href='mailto:"+emailAddress+"?subject="+encodeURIComponent(Msg.MailSubject)+"' title='Send an e-mail' class='dwLink'>"+emailAddress+"</a>";}
function SlideShowEmbedded(){try{ImagesSSE.pop();}
catch(Err){alert("Embedded Slide-Show Images array cannot be initialized because:\n 1) Data file is non-existent; OR\n 2) The data it contains is malformed (bad syntax)");}
this.slideNum=(SettingsSSE.randomStart&&!userWithWritePrivileges)?Math.floor(Math.random()*ImagesSSE.length):0;this.nFirstSlide=this.slideNum;this.speedActual=SettingsSSE.speed*1000;this.SPEED_FAST=500;this.preLoadTimer=0;this.NextImage=null;this.slideDelay=0;this.running=true;this.buttons=false;this.dissolve=true;this.maxDissolveMZ=1000*1000;this.init=init;this.start=start;this.showSlide=showSlide;this.skipErrantSlide=skipErrantSlide;this.preLoadNext=preLoadNext;this.mouseOverImg=mouseOverImg;this.getCoordinates=getCoordinates;this.next=next;this.repositionElements=repositionElements;this.pauseSS=pauseSS;window.onresize=this.repositionElements;this.setFileSize=setFileSize;this.setFirstImg=setFirstImg;this.reportImgName=reportImgName;this.switchSpeed=switchSpeed;this.writeSlideShow=writeSlideShow;this.Msg=new Array();this.Msg.ClickImg=(userWithWritePrivileges)?"Click to skip \u2022 Right-click "+((macOS)?"(ctrl+click) ":"")+"to pause":"Skip to next image";function writeSlideShow(){var htm="<div id='slideShowContainer' class='ssContainer' style='"+getOpacity()+"'><img id='slideShow' class='ssImage' onClick='SSE.next( event );' oncontextmenu='return SSE.reportImgName( this, event );' src='images/"+ImagesSSE[SSE.nFirstSlide][0]+"' onMouseover='SSE.mouseOverImg( this );'></div>";document.write(htm);}
function setFirstImg(){startFade(document.getElementById("slideShowContainer"),2,0.8,0,1,1);SSE.start();}
function mouseOverImg(Img){Img.title=this.Msg.ClickImg;if(userWithWritePrivileges){Img.style.cursor="pointer";}}
function start(){this.repositionElements();this.preLoadNext();}
function getCoordinates(TheImage){var x=0;var y=0;TheElement=TheImage;var parPosAbs=false;while(TheElement){if(SF){if(!parPosAbs)parPosAbs=(TheElement.style.position=="absolute");if(parPosAbs&&TheElement==document.body)break;}
y+=TheElement.offsetTop;x+=TheElement.offsetLeft;TheElement=TheElement.offsetParent;}
var skewX=0,skewY=0;if(SF){skewX=SettingsSSE.Skew.SF[0];skewY=SettingsSSE.Skew.SF[1];}
else if(MZ&&macOS){skewX=SettingsSSE.Skew.MacFF[0];skewY=SettingsSSE.Skew.MacFF[1];}
x+=skewX;y+=skewY;return[x,y];}
function repositionElements(){if(SSE.ImgOverlay){var OverlayPos=SSE.getCoordinates(document.getElementById("slideShow").parentNode);SSE.ImgOverlay.style.left=OverlayPos[0]+"px";SSE.ImgOverlay.style.top=OverlayPos[1]+"px";}}
function showSlide(){if(this.NextImage){var TheImage=document.getElementById("slideShow");var widNew=ImagesSSE[this.slideNum][1];var hgtNew=ImagesSSE[this.slideNum][2];var imgArea=widNew*hgtNew;checkDim(this.NextImage.src,widNew,hgtNew);if(this.dissolve&&(winIE||MZ||SF||OP)&&SettingsSSE.transNum>=1&&this.speedActual>this.SPEED_FAST){var nNewImg=(ImagesSSE.length==this.slideNum)?0:this.slideNum;var nOldImg=(nNewImg==0)?ImagesSSE.length-1:nNewImg-1;TheImage.width=ImagesSSE[nOldImg][1];TheImage.height=ImagesSSE[nOldImg][2];TheImage.src=SettingsSSE.folder+ImagesSSE[nOldImg][0];if(SettingsSSE.borderWid)TheImage.style.borderColor="rgb( "+SettingsSSE.borderCol+" )";var imgStyle=(SettingsSSE.borderWid)?" style='border:"+SettingsSSE.borderWid+"px solid rgb("+SettingsSSE.borderCol+");'":"";var newImg="<img name='slideShowNew' src='"+SettingsSSE.folder+ImagesSSE[nNewImg][0]+"' title='"+TheImage.title+"'"+imgStyle+" onClick='SSE.next( event );' oncontextmenu='return SSE.reportImgName( this, event );' onMouseover='SSE.mouseOverImg( this );' class='ssImage'>";if(!SSE.ImgOverlay){SSE.ImgOverlay=document.createElement("DIV");SSE.ImgOverlay.style.top=(screen.height*-1)+"px";SSE.ImgOverlay.style.left=(screen.width*-1)+"px";SSE.ImgOverlay.style.zIndex=1000;SSE.ImgOverlay.style.position="absolute";document.body.appendChild(SSE.ImgOverlay);}
SSE.ImgOverlay.style.width=(SettingsSSE.Dimension[0]+2*SettingsSSE.borderWid)+"px";SSE.ImgOverlay.style.height=(SettingsSSE.Dimension[1]+2*SettingsSSE.borderWid)+"px";if(winIE)SSE.ImgOverlay.style.visibility="hidden";if(MZ)SSE.ImgOverlay.style.MozOpacity=0;else SSE.ImgOverlay.style.opacity=0;var OverlayPos=SSE.getCoordinates(TheImage.parentNode);SSE.ImgOverlay.style.left=OverlayPos[0]+"px";SSE.ImgOverlay.style.top=OverlayPos[1]+"px";SSE.ImgOverlay.innerHTML=newImg;startFade(SSE.ImgOverlay,SettingsSSE.transNum,SettingsSSE.transDur,0);}
else{if(this.ImgOverlay){document.body.removeChild(this.ImgOverlay);this.ImgOverlay=null;}
TheImage.style.visibility="hidden";TheImage.width=widNew;TheImage.height=hgtNew;if(SettingsSSE.borderWid)TheImage.style.borderColor="rgb( "+SettingsSSE.borderCol+" )";TheImage.src=this.NextImage.src;TheImage.style.visibility="visible";}
this.dissolve=true;}}
function skipErrantSlide(){if(local||userWithWritePrivileges||SSE.speedActual==SSE.SPEED_FAST){if(!SSE.errReported){alert("Slide #"+(SSE.slideNum+1)+"; "+SSE.NextImage.src+" failed to load");SSE.errReported=true;}}
SSE.NextImage=null;}
function preLoadNext(){var recursionTimer=100;this.slideDelay+=recursionTimer;if(!this.NextImage){if(this.SPEED_FAST!=this.speedActual)this.speedActual=ImagesSSE[this.slideNum][3]*1000;this.slideNum++;if(this.slideNum==ImagesSSE.length)this.slideNum=0;this.NextImage=new Image();this.NextImage.onerror=this.skipErrantSlide;this.NextImage.src=SettingsSSE.folder+ImagesSSE[this.slideNum][0];}
if(this.NextImage&&this.NextImage.complete&&this.slideDelay>this.speedActual){this.slideDelay=0;this.showSlide();this.NextImage=null;clearTimeout(this.preLoadTimer);this.preLoadNext();}
else
this.preLoadTimer=setTimeout("SSE.preLoadNext()",recursionTimer);}
function next(evt){if(!evt)evt=window.event;if(evt.ctrlKey)return;clearTimeout(this.preLoadTimer);this.dissolve=(userWithWritePrivileges)?false:true;this.pauseSS(false);}
function pauseSS(pause){if(pause){clearTimeout(this.preLoadTimer);this.running=false;}
else{this.slideDelay=SettingsSSE.speed*1000+1;this.preLoadNext();this.running=true;}}
function init(){var maxWid=-1,maxHgt=-1,bordWid=SettingsSSE.borderWid*2;for(var i=0;i<ImagesSSE.length;i++){ImagesSSE[i][1]=SettingsSSE.Dimension[0];ImagesSSE[i][2]=SettingsSSE.Dimension[1];ImagesSSE[i][3]=SettingsSSE.speed;checkImgName(ImagesSSE[i][0]);}}
function switchSpeed(hiSpeed){this.speedActual=(hiSpeed)?this.SPEED_FAST:SettingsSSE.speed*1000;}
function reportImgName(Link,evt){if(userWithWritePrivileges){this.pauseSS(1);var imageNum=this.slideNum-1;if(imageNum==-1)imageNum=ImagesSSE.length-1;if(window.ImagesSSE==null)window.ImagesSSE=this.ImagesOriginal;var Img=ImagesSSE[imageNum];var wid=Img[1],hgt=Img[2];var shape=(wid>hgt)?"horizontal":((wid<hgt)?"vertical":"square");var tnHgt=150;var tnWid=parseInt(wid*tnHgt/hgt);var speedHTM=(this.speedActual!=this.SPEED_FAST)?"<a href='javascript:SSE.switchSpeed(1); DW.removeWin();' class='dwLink' title='Run at hi-speed'>Fast</a><span class='ssSpeed'> &#149; Normal</span>":"<span class='ssSpeed'>Fast &#149; </span><a href='javascript:SSE.switchSpeed(0); DW.removeWin();' class='dwLink' title='Revert to normal speed'>Normal</a>";var htm="<table align='left'><tr><td align=center valign=top><img src='"+SettingsSSE.folder+Img[0]+"' width='"+tnWid+"' height='"+tnHgt+"'></td><td align=center valign=middle style='padding:4px;'><table align='center' class='dwText'><tr><td align=right>Name:&nbsp;</td><td align=left>"+Img[0]+"</td></tr><tr><td align=right>Number:&nbsp;</td><td align=left>"+(imageNum+1)+" of "+ImagesSSE.length+"</td></tr><tr><td align=right>Dimensions:&nbsp;</td><td align=left>"+wid+" &times; "+hgt+" px; "+shape+"</td></tr><tr><td align=right>File Size:&nbsp;</td><td id='fileSizeSSE' align=left></td></tr><tr><td align=right>Speed:&nbsp;</td><td align=left>"+speedHTM+"</td></tr><tr><td align=right>Paused:&nbsp;</td><td align=left><a href='javascript:SSE.dissolve=false; DW.removeWin();' class='dwLink' title='Slide-show is paused \u2022 Resume to play'>Resume</a></td></tr></table></td></table>";if(window.DW){DW.createWindow(["Image Properties",htm],[0,tnWid+400,0],Link,evt);this.setFileSize(imageNum);}
return false;}
return(SettingsSSE.disableContextImgMenu&&live)?false:true;}
function setFileSize(imageNum){this.Request=getAjaxRequest();if(this.Request){this.Request.onreadystatechange=function(){try{if(SSE.Request.readyState==4){if(SSE.Request.status==200||SSE.Request.status==304){var fileSize=parseInt(SSE.Request.getResponseHeader("Content-Length"))/1024;var FileSizeSSE=document.getElementById("fileSizeSSE");if(FileSizeSSE)FileSizeSSE.innerHTML=Math.round(fileSize)+" KB";}
else
alert("Error retrieving photo at method SSE.setFileSize");}}
catch(Err){var eMsg="Exception at method SSE.setFileSize\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";try{alert(eMsg);} catch(Err){}}}
this.Request.open("GET",Settings.folder+ImagesSSE[imageNum][0],true);this.Request.send(null);}}}
function DynamicIndex(setEvtHandlers){this.Msg=new Array();this.Msg.show="Show content";this.Msg.hide="Hide content";this.getPlusMinus=getPlusMinus;this.onClickMore=onClickMore;this.reset=reset;this.switchDisplay=switchDisplay;this.showTip=showTip;this.maintainState=maintainState;this.setEventHandlers=setEventHandlers;if(setEvtHandlers)this.setEventHandlers();function onClickMore(Link,evt){}
function setEventHandlers(){try{var AllLinks=document.getElementsByTagName("a");for(var i=0;i<AllLinks.length;i++){if(AllLinks[i].className=="diHeading"){AllLinks[i].onclick=function(event){if(window.DI){DI.onClickMore(this,event);DI.switchDisplay(this);}}
AllLinks[i].onmouseover=function(){if(window.DI)DI.showTip(this);return true;}}
if(AllLinks[i].className=="diPlusMinus"){AllLinks[i].onclick=function(event){if(window.DI){DI.onClickMore(this.nextSibling,event);DI.switchDisplay(this.nextSibling);}}
AllLinks[i].onmouseover=function(){if(window.DI)DI.showTip(this.nextSibling);return true;}}}
self.status="";}
catch(Err){self.status="Initializing DI.setEventHandlers() method, one moment please...";setTimeout("DI.setEventHandlers();",250);}}
function maintainState(){try{var path=document.location.pathname;var delimeter=(path.indexOf("\\")>=0)?"\\":"/";this.cookieName=fileName.split(".")[0];var diState=GetCookie(this.cookieName);if(diState){var AllLinks=document.getElementsByTagName("a");var DiState=diState.split("_");for(var i=0;i<AllLinks.length;i++){for(var k in DiState){if(DiState[k]&&parseInt(DiState[k])==i){try{DI.switchDisplay(AllLinks[i],AllLinks[i].id)} catch(e){};}}}}
self.status="";}
catch(Err){self.status="Initializing DI.maintainState() method, one moment please...";setTimeout("DI.maintainState();",250);}}
function getPlusMinus(Link){return Link.previousSibling;}
function reset(OtherID){for(var i=0;i<OtherID.length;i++){var PlusMinus=document.getElementById("plusMinus_"+OtherID[i]);if(PlusMinus){PlusMinus.innerHTML="-";this.switchDisplay(null,OtherID[i]);}
else{alert("ERROR: DI.reset unable to initialize PlusMinus as an Object.\nPROBLEM: \"plusMinus_"+OtherID[i]+"\" cannot be found.");return;}}}
function switchDisplay(Link,contentID,focuserID){if(!Link)Link=document.getElementById(contentID);var PlusMinus=getPlusMinus(Link);var expanding=(PlusMinus.innerHTML=="+"),contracting=!expanding;var Caption=document.getElementById("caption_"+Link.id);if(Caption)Caption.className=(expanding)?"diCaptionOn":"diCaptionOff";var Img=document.getElementById("img_"+Link.id);if(Img)Img.className=(expanding)?"diTnOn":"diTn";PlusMinus.innerHTML=(expanding)?"-":"+";var AllLinks=document.getElementsByTagName("a");var valOld=GetCookie(this.cookieName),valNew="";for(var i=0;i<AllLinks.length;i++){if(AllLinks[i]==Link){if(valOld){var key="_"+i+"_";if(valOld.indexOf(key)>=0){if(contracting){var ValOld=valOld.split(key);valNew=((ValOld[0])?ValOld[0]:"")+"_"+((ValOld[1])?ValOld[1]:"");(valNew=="_")?DeleteCookie(this.cookieName):SetCookie(this.cookieName,valNew);}
break;}
if(expanding)valNew=valOld+i+"_";}
else if(expanding)valNew="_"+i+"_";if(valNew)SetCookie(this.cookieName,valNew);break;}}
if(contentID)var Content=document.getElementById("content_"+contentID);else
var Content=(Link.parentNode.nextSibling.style)?Link.parentNode.nextSibling:Link.parentNode.nextSibling.nextSibling;try{Content.style.display=(contracting)?"none":"block";}
catch(Err){var problem=(contentID)?"\nPROBLEM: \"content_"+contentID+"\" cannot be found.":"";alert("ERROR: DI.switchDisplay unable to initialize Content as an Object."+problem);}
if(focuserID&&expanding){var FocusCont=document.getElementById(focuserID);FocusCont.innerHTML="<a href='javascript:void(0);'>.</a>";var FocusLink=FocusCont.firstChild;FocusLink.focus();Link.focus();FocusCont.innerHTML="";}
showTip(Link);}
function showTip(Link,msgOn,msgOff){var PlusMinus=getPlusMinus(Link);if(PlusMinus.innerHTML=="+"){Link.title=(msgOn)?msgOn:DI.Msg.show;PlusMinus.title=(msgOn)?msgOn:DI.Msg.show;}
else{Link.title=(msgOff)?msgOff:DI.Msg.hide;PlusMinus.title=(msgOff)?msgOff:DI.Msg.hide;}}}
function showSponsor(TheLink,evt){if(!evt)evt=window.event;DW.createWindow("nextSibling",[0,500,0],TheLink,evt,6,null,null,1,1);}
var gAudioLinkText="";function setAudioPlayer(Link,on){var AudioConsole=document.getElementById("AudioConsole");if(on){if(winIE)var audioPlayer="<object id='MediaPlayer' classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' type='application/x-oleobject' style='width:320px; height:44px;'><param name='filename' value='music/"+SC.imageID+".mp3' /><param name='autoplay' value='true' /><param name='loop' value='false' /><param name='showcontrols' value='true'></object>";else
var audioPlayer="<embed id='MediaPlayer' src='music/"+SC.imageID+".mp3' loop='false' style='width:320px; height:16px;'></embed>";AudioConsole.innerHTML=audioPlayer;Link.onclick=function(){setAudioPlayer(Link,0);}
if(!gAudioLinkText)gAudioLinkText=Link.innerHTML;Link.innerHTML="Stop Audio";Link.title=Msg.AudioOff;}
else{AudioConsole.innerHTML="";Link.onclick=function(){setAudioPlayer(Link,1);}
Link.innerHTML=gAudioLinkText;Link.title=Msg.AudioOn;}}
function setURL(Link){var RequestedPath=Link.pathname.split("/");var requestedPage=RequestedPath[RequestedPath.length-1];var requestedPageQstr=Link.search.substring(1);if(requestedPageQstr)requestedPageQstr="?"+requestedPageQstr;var enteringSSL=(requestedPage=="checkout.aspx");var leavingSSL=(fileName=="checkout.aspx");if(live&&(enteringSSL||leavingSSL)){requestedPage+=requestedPageQstr;var theURL=(enteringSSL)?pathSecure+requestedPage:pathUnsecure+requestedPage;Link.href=theURL;}
return true;}
function getShipTaxStatus(Link,evt,requestedPage,placement){if(!evt)evt=window.event;if(window.SC)clearTimeout(SC.addToCartTimer);var cartData=GetCookie("cartData");var cartShipTax=GetCookie("cartShipTax");var shipTaxUnknown=(cartShipTax)?false:true;var userReviewing=!requestedPage;if(cartData&&(shipTaxUnknown||userReviewing)){var RequestedPos=new Array();if(window.gPlacementDW)placement=gPlacementDW;switch(placement){case 1:RequestedPos=[2,0,-15];break;case 2:RequestedPos=[1,0,20];break;case 3:RequestedPos=[4,0,0];break;default:alert("Switch/Case Error at getShipTaxStatus. Bad case: "+placement);}
var shipTaxGUI="<form name='shipTaxForm' style='margin:6px 0px 0px 6px; text-align:left;' onSubmit='setShipTaxStatus( this ); return false;'><table align='center'><tr><td align='left'><div style='margin:10px 0px 0px 0px;' id='SendOrderTo'>Please Send My Order To:</div><input type='radio' name='LocationShip' id='LocationShip0' style='margin:3px 0px 0px 18px;'><label for='LocationShip0'> The United States, Alaska or Hawaii</label><br/><input type='radio' name='LocationShip' id='LocationShip1' style='margin:0px 0px 0px 18px;'><label for='LocationShip1'> Canada</label><br/><input type='radio' name='LocationShip' id='LocationShip2' style='margin:0px 0px 0px 18px;'><label for='LocationShip2'> A Foreign Country</label><br/><div style='margin:10px 0px 0px 0px;' id='OrderingFrom'>I'm Placing This Order From:</div><input type='radio' name='LocationTax' id='LocationTax0' style='margin:3px 0px 0px 18px;'><label for='LocationTax0'> Outside of Hawaii, state tax is waived</label><br/><input type='radio' name='LocationTax' id='LocationTax1' style='margin:0px 0px 0px 18px;'><label for='LocationTax1'> Within Hawaii, state tax is added</label><br/></td></tr><tr><td nowrap align='center'><input type='submit' value='&nbsp;OK&nbsp;' style='margin:10px 0px 0px 0px;' title='Click to set your shipping & tax status'></td></tr></table><input type='hidden' length='10' name='destination'></form>";var ShipTax=["Shipping & Taxes<div class='fSize9' style='font-weight:normal; font-variant:normal;'><span class=on id='shipTaxTipID'>This info must be provided to view your cart or checkout</span></div>",shipTaxGUI];if(placement==3)DW.createWindow(ShipTax,[0,360,0],Link,evt,6,RequestedPos,null,null,1);else
DW.createWindow(ShipTax,[0,360,0],Link,evt,6,RequestedPos);if(live&&requestedPage=="checkout.aspx")requestedPage=pathSecure+requestedPage;document.shipTaxForm.destination.value=requestedPage;if(userReviewing)document.getElementById("shipTaxTipID").className="off";if(cartShipTax&&userReviewing){var ShipTax=cartShipTax.split(".");var loc=parseInt(ShipTax[0]);var tax=parseInt(ShipTax[1]);var Form=document.shipTaxForm;Form.LocationShip[loc].checked=true;Form.LocationTax[tax].checked=true;}
return false;}
else{DW.removeWin();return setURL(Link);}}
function setShipTaxStatus(Form){var SendOrderTo=document.getElementById("SendOrderTo");var OrderingFrom=document.getElementById("OrderingFrom");SendOrderTo.className="";OrderingFrom.className="";var locShip=true,loc=-1;for(var i=0;i<Form.LocationShip.length;i++)if(Form.LocationShip[i].checked){loc=i;locShip=false;}
var locTax=true,tax=-1;for(var i=0;i<Form.LocationTax.length;i++)if(Form.LocationTax[i].checked){tax=i;locTax=false;}
if(locShip){SendOrderTo.className="alertOn";Form.LocationShip[0].focus();}
else if(locTax){OrderingFrom.className="alertOn";Form.LocationTax[0].focus();}
else{SetCookie("cartShipTax",loc+"."+tax,expDate12Mon);if(Form.destination.value)document.location.href=Form.destination.value;else
document.getElementById("shopping_cart").innerHTML=SC.getCart();DW.removeWin();}}
function reviewData(Link,evt,key){if(userWithWritePrivileges||local){if(!evt)evt=window.event;if(window.SC)clearTimeout(SC.addToCartTimer);var htm="<table align='center' cellspacing='5' class='fSize12' style='border-collapse:separate;'>";if(key){htm+="<tr><td nowrap valign='top' align='right'>Lookup Key:&nbsp;&nbsp;</td><td>Item."+key+"</td></tr><tr><td nowrap valign='top' align='right'>Price:&nbsp;&nbsp;</td><td>"+Item[key][0]+"</td></tr><tr><td nowrap valign='top' align='right'>Name:&nbsp;&nbsp;</td><td>"+Item[key][1]+"</td></tr><tr><td nowrap valign='top' align='right'>Description:&nbsp;&nbsp;</td><td>"+Item[key][2]+"</td></tr>";}
htm+="<tr><td nowrap valign='top' align='right'>cartData:&nbsp;&nbsp;</td><td><input type='text' id='CartDataAdmin' value='"+GetCookie("cartData")+"' style='width:300px;' /></td></tr><tr><td nowrap valign='top' align='right'>cartShipTax:&nbsp;&nbsp;</td><td><input type='text' id='CartShipTaxAdmin' value='"+GetCookie("cartShipTax")+"' style='width:300px;' /></td></tr><tr><td nowrap valign='top' align='right'>saveCart:&nbsp;&nbsp;</td><td><input type='text' id='CartSaveCart' value='"+GetCookie("saveCart")+"' style='width:300px;' /></td></tr><tr><td nowrap valign='top' align='right'>showWelcome:&nbsp;&nbsp;</td><td><input type='text' id='CartShowWelcome' value='"+GetCookie("showWelcome")+"' style='width:300px;' /></td></tr><tr><td nowrap valign='top' align='right'>Delete Cookies:&nbsp;&nbsp;</td><td><button onClick='DeleteCookie( \"cartData\" ); document.getElementById( \"CartDataAdmin\" ).value = \"null\";' title='Delete \u201CcartData\u201D Cookie'>Data</button> <button onClick='DeleteCookie( \"cartShipTax\" ); document.getElementById( \"CartShipTaxAdmin\" ).value = \"null\";' title='Delete \u201CcartShipTax\u201D Cookie'>Ship/Tax</button> <button onClick='DeleteCookie( \"saveCart\" ); document.getElementById( \"CartSaveCart\" ).value = \"null\";' title='Delete \u201CsaveCart\u201D Cookie'>Save Cart</button> <button onClick='DeleteCookie( \"showWelcome\" ); document.getElementById( \"CartShowWelcome\" ).value = \"null\";' title='Delete \u201CshowWelcome\u201D Cookie'>Welcome</button></td></tr><tr><td nowrap valign='top' align='right'>Links:&nbsp;&nbsp;</td><td class='fColorGray102'><a href='cart.aspx' class='dwLink'>View Cart</a> &nbsp;&#149;&nbsp; <a href='checkout.aspx' onClick='return setURL( this );' class='dwLink'>Checkout</a></td></tr></table>";DW.createWindow(["Diagnostics & Troubleshooting",htm],[1,500,0],Link,evt,6,[2,0,-15]);return false;}}
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("&");}