// Web software by DavidRegier.com
function gId(str){return document.getElementById(str);}
function gTn(str){return document.getElementsByTagName(str);}
function gEl(str){return document.createElement(str);}
function aCh(Obj){document.body.appendChild(Obj);}
function rCh(Obj){document.body.removeChild(Obj);}
var IE=false,oldIE=false,AOL=false,SF=false,MZ=false,OP=false;var navAppName=navigator.appName,navUserAgent=navigator.userAgent;switch(navAppName.toLowerCase()){case "microsoft internet explorer":IE=true;if( /AOL/.test(navUserAgent))AOL=true;if(parseFloat(navUserAgent.split("MSIE")[1])<=6)oldIE=true;break;case "netscape":if( /Chrome/i.test(navUserAgent))MZ=true;else if( /Safari/i.test(navUserAgent))SF=true;else MZ=true;break;case "opera":OP=true;break;}
var winOS=(navigator.platform.substring(0,3)=="Win");var macOS=(navigator.platform.substring(0,3)=="Mac");var theHost=document.location.hostname;var local = ( /^\d+\.\d+\.\d+\.\d+$/.test(theHost)||theHost==""||theHost=="localhost");var live=!local;var emailRE=/^[\w\.-]*[^\.-]@[\w\.-]+\.[a-zA-Z]{2,}$/;var qStr=unescape(document.location.search).substring(1);var homePage="default.aspx"
var path=document.location.pathname;var delimeter=(path.indexOf("\\")>=0)?"\\":"/";if(path.charAt(path.length-1)==delimeter)path+=homePage;var Path=path.split(delimeter);var fileName=Path[Path.length-1];var fileNameLC=fileName.toLowerCase();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.Email.replace(/\s{2}/g, "." );
eMailIn=eMailIn.replace(/\s{1}/g, "@" );
for(i=0;i<=eMailIn.length;i++)eMailOut=eMailIn.charAt(i)+eMailOut;DB.Contact.Email=eMailOut;}}
Settings=new Array();Settings.transDur=.8;Settings.folder="images/";Settings.borderWidDW=1;Settings.preventImageTheft=1;Settings.defaultCaption="Images & Art";Settings.SS=new Array();Settings.SS.speed=4.5;Settings.SS.randomStart=1;Settings.SS.audio=1;Settings.SS.audioFolder="audio/";Settings.TN=new Array();Settings.TN.ProgressBar=new Array();Settings.TN.ProgressBar.hideOnSuccess=1;Settings.TN.ProgressBar.width=300;Settings.TN.ProgressBar.progressColor="rgb( 178,0,0 )";Settings.TN.ProgressBar.bgColor="rgb( 153,102,51 )";Settings.TN.ProgressBar.fontColor="rgb( 255,255,255 )";Settings.TN.borderColorOff="rgb( 255,255,255 )";Settings.TN.borderColorOn="rgb( 204,0,0 )";Settings.TN.pageTitle="";Settings.TN.align="center";Settings.TN.nImagesRow=8;Settings.TN.width=100;Settings.TN.height=100;Settings.TN.AppendSlideShowLink=0;function getCookieDomain(){var cookieDomain=null;if(live&&theHost){var Host=theHost.split("."),hLen=Host.length;if(hLen>=2)cookieDomain="."+Host[hLen-2]+"."+Host[hLen-1];}
return cookieDomain;}
function getCookieVal(offset){var endstr=document.cookie.indexOf(";",offset);if(endstr==-1)endstr=document.cookie.length;return unescape(document.cookie.substring(offset,endstr));}
function GetCookie(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen){var j=i+alen;if(document.cookie.substring(i,j)==arg)return getCookieVal(j);i=document.cookie.indexOf(" ",i)+1;if(i==0)break;}
  return null;}
function SetCookie(name,value,expires){var path="/",domain=getCookieDomain(),secure=null;document.cookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");}
function DeleteCookie(name){var path="/",domain=getCookieDomain();if(GetCookie(name)){document.cookie=name+"="+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}
function recordToCookie(key,value,CookieExpDate){var cookieName=this.toString();var data=GetCookie(cookieName);if(!data)data="";value=value.toString();value=value.replace(/&/g, "and" ).replace(/=/g, "is" );
var KeyVals=data.split("&");var existingKey=0;for(var i=0;i<KeyVals.length;i++){var ThisPair=KeyVals[i].split("=");if(key==ThisPair[0]){if(value)KeyVals[i]=key+"="+value;else
KeyVals.splice(i,1);data=KeyVals.join("&");existingKey=1;break;}}
if(value&&!existingKey)data+=((data)?"&":"")+key+"="+value;if(data)SetCookie(cookieName,data,((CookieExpDate)?CookieExpDate:null));else
DeleteCookie(cookieName);}
String.prototype.recordToCookie=recordToCookie;var expDate12Mon=new Date();expDate12Mon.setTime(expDate12Mon.getTime()+(24*60*60*365*1000));userWithWritePrivileges=GetCookie("userWithWritePrivileges");if(userWithWritePrivileges){userWithWritePrivilegesFirstName=userWithWritePrivileges.split("_")[0];userWithWritePrivileges=userWithWritePrivileges.replace(/_/, " " );}
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();}
function PreLoader(){this.Files=["images/jungleQueen.jpg","musicians.aspx","board.aspx","concerts.aspx","director.aspx","news.aspx","donate.aspx","contact.aspx","MauiPopsContact.js","default.aspx",null];this.debug=0;try{if(top.qStr&&top.qStr.indexOf("preloader=y")!=-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 getVal(key){var value=null;var strToSearch=this.toString();var KeyVals=strToSearch.split("&");for(member in KeyVals){var ThisPair=KeyVals[member].split("=");if(key==ThisPair[0]){value=ThisPair[1];break;}}
if(typeof value=="undefined")value="";return value;}
String.prototype.getVal=getVal;function trim(){var str=this.toString();return str.replace(/^\s*|\s*$/g, "" );}
String.prototype.trim=trim;Msg=new Array();Msg.About="About the conductor, musicians & board members";Msg.Castle="Castle Theater at the MACC";Msg.Contact="Contact Us";Msg.Donate="Support Us \u2022 Make a Financial Donation";Msg.Director="Meet James Durham \u2022 Our Music Director";Msg.Enlarge="View Enlargement";Msg.Events="Check our Concert Schedule & Purchase Tickets";Msg.Home="To our Homepage";Msg.Login="Website administrator log-in";Msg.Logoff="Log off as website administrator";Msg.News="Past Concerts \u2022 Reviews & Press Releases";Msg.Tickets="Purchase tickets at the MACC";FadeObj=null;transDur=-1;transDelay=-1;fadeOpacity=0,fadeOpacityTimer=0,fadeStartTime=0;opacityStep=(window.Settings&&window.Settings.SS&&Settings.transDur)?1/(Settings.transDur/.04):.05;function getOpacity(){return(IE)?"visibility:hidden;":"opacity:0;";}
function setOpacity(Obj){(IE)?Obj.style.visibility="hidden":Obj.style.opacity=0;}
function startFade(FadeObj,transDur,transDelay){if(window.FadeObj==null){window.FadeObj=FadeObj;if(IE){window.transDur=transDur;window.transDelay=transDelay;setTimeout("fadeInDirectX()",transDelay);}
else{fadeStartTime=new Date().getTime();FadeObj.onload=function(){};(transDelay)?setTimeout("fadeIn()",transDelay):fadeIn();}}
else{(IE)?FadeObj.style.visibility="visible":FadeObj.style.opacity=1;FadeObj.style.visibility="visible";}}
function fadeIn(){FadeObj.style.opacity=fadeOpacity;fadeOpacity+=opacityStep;if(fadeOpacity<1)fadeOpacityTimer=setTimeout("fadeIn();",40);else{FadeObj.style.opacity=1;clearTimeout(fadeOpacityTimer);fadeOpacity=0;var fadeEndTime=new Date().getTime();var fadeDuration=fadeEndTime-fadeStartTime;fadeStartTime=0;if(fadeDuration>1500)opacityStep+=.03;FadeObj=null;}}
function fadeInDirectX(){try{FadeObj.style.filter="progid:DXImageTransform.Microsoft.Fade(duration="+transDur+",overlap=1)";FadeObj.filters(0).apply();FadeObj.style.visibility="visible";FadeObj.filters(0).play();FadeObj.onfilterchange=function(){FadeObj=null;}}
catch(Err){if(local){var eMsg="Exception Caught in fadeInDirectX function:\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";alert(eMsg);}
FadeObj.style.visibility="visible";}}
function getPhotoCaption(captionIn){if(!captionIn)captionIn="";var captionOut=captionIn.trim();if(captionOut){captionOut=captionOut.replace(/\[/g, "<div class=\"dwTitleLine2\">" ).replace(/]/g, "</div>" );
captionOut=captionOut.replace(/<>/g, "<span class=\"dwBullet\">&nbsp;&#149;&nbsp;</span>" );
captionOut=captionOut.replace(/'/g, "&#39;" );
captionOut=captionOut.replace(/%20/g, " " );
captionOut=captionOut.replace(/\*/g, Settings.defaultCaption );}
return captionOut;}
function initImagesArr(){try{if(Images[Images.length-1]==null)Images.pop();}
catch(Err){alert("Images array cannot be initialized because the data it contains is malformed (bad syntax)");}}
function showImgProperties(ThePhoto){if(userWithWritePrivileges){var Photo=getAjaxRequest();if(Photo){Photo.onreadystatechange=function(){try{if(Photo.readyState==4){if(Photo.status==200||Photo.status==304){this.ImgOffscreen=gId("ImgOffscreenLg");if(this.ImgOffscreen)rCh(this.ImgOffscreen);this.ImgOffscreen=gEl("IMG");this.ImgOffscreen.id="ImgOffscreen";this.ImgOffscreen.style.position="absolute";this.ImgOffscreen.style.top="-1000000px";this.ImgOffscreen.style.left="-1000000px";aCh(this.ImgOffscreen);this.ImgOffscreen.onload=function(){var fileSize=Math.round(parseInt(Photo.getResponseHeader("Content-Length"))/1024)+" K";var ImageProperties=gId("ImageProperties");ImageProperties.innerHTML=ThePhoto.src.replace(/^.*\//, "" ).replace(/%20/g, " " ) + "&nbsp; <span class='dwBullet'>&#149;</span> &nbsp;" + this.width + " &times; " + this.height + "&nbsp; <span class='dwBullet'>&#149;</span> &nbsp;" + fileSize;}
this.ImgOffscreen.src=ThePhoto.src;}
else if(Photo.status)alert("AJAX request error occurred at function showImgProperties\n\nStatus expected: 200 or 304\nStatus returned: "+Photo.status);}}
catch(Err){var eMsg="Exception at function showImgProperties\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";try{alert(eMsg);} catch(Err){}}}
Photo.open("GET",ThePhoto.src);Photo.send(null);}}}
function enlargement(photoCaption,Link){DW.photoCaption=photoCaption;DW.createEnlargement("",Link.href);return false;}
function DynamicWindow(transDur){this.ssTnskewIeX=2;this.ssTnskewIeY=6;this.skewIeX=2;this.skewIeY=2;window.gClickPos=null;this.transDur=(transDur)?transDur:0.8;this.dWinOffsetX=0;this.dWinOffsetY=0;this.ImgOffscreen=null;this.overlayExists=false;this.overTitleBar=false;this.Photo=null;this.TheBody=null;this.Window=null;this.winType;this.addOverlay=addOverlay;this.cancelEvt=cancelEvt;this.cancelPreloader=cancelPreloader;this.createEnlargement=createEnlargement;this.getScaledSize=getScaledSize;this.reCenter=reCenter;this.createWindow=createWindow;this.showImg=showImg;this.keepInWin=keepInWin;this.getClickPosition=getClickPosition;this.getData=getData;this.mouseDown=mouseDown;this.mouseMove=mouseMove;this.moveTopImage=moveTopImage;this.otherFunctionalityOnRemoveWin=otherFunctionalityOnRemoveWin;this.removeWin=removeWin;this.setBody=setBody;this.mouseUp=mouseUp;document.onmousedown=this.mouseDown;document.onmousemove=this.mouseMove;document.onmouseup=this.mouseUp;var Preloader=new Image();Preloader.src="images/preloader.gif";function otherFunctionalityOnRemoveWin(){}
function cancelPreloader(){var Overlay=gId("dwOverlay");if(Overlay)rCh(Overlay);this.overlayExists=false;this.ImgOffscreen=gId("ImgOffscreen");if(this.ImgOffscreen){this.ImgOffscreen.onload=function(){};rCh(this.ImgOffscreen);}}
function createEnlargement(winType,imgSrc){DW.addOverlay(1,winType);this.ImgOffscreen=gId("ImgOffscreen");if(this.ImgOffscreen)rCh(this.ImgOffscreen);this.ImgOffscreen=gEl("IMG");this.ImgOffscreen.id="ImgOffscreen";this.ImgOffscreen.style.position="absolute";this.ImgOffscreen.style.top="-1000000px";this.ImgOffscreen.style.left="-1000000px";aCh(this.ImgOffscreen);this.ImgOffscreen.onload=function(){var CancelPreload=gId("CancelPreload");if(CancelPreload)CancelPreload.innerHTML="";DW.createWindow([DW.photoCaption,"imgSrc="+this.src],[0,this.width,this.height],null,null,0,[4,0,0],winType);if(winType){var TdCount=gId("SsTnCount");TdCount.innerHTML=DW.photoCount;}}
this.ImgOffscreen.onerror=function(){var imgSrc=this.src;DW.cancelPreloader();alert("Image Not Found:\n"+imgSrc);}
this.ImgOffscreen.src=imgSrc;}
function createWindow(dataSrc,WinDim,TheLink,theEvent,bodyMargin,RequestedPos,winType,centerContent,addOverlay,noX){this.setBody();if(TheLink)TheLink.blur();if(window.SS&&winType!="SS")SS.kill();if(window.TN&&winType!="TN")TN.kill();if(!bodyMargin)bodyMargin=0;this.winType=(winType)?winType:"";var Data=this.getData(dataSrc,TheLink),theCaption,body;theCaption=getPhotoCaption(Data[0]);body=Data[1].replace(/\^\^/g, "'" );
body=body.replace(/\^/g, "\"" );
var showImg=(body.indexOf("imgSrc=")==0);var scrollStyle=(WinDim[0])?" overflow:auto;":"";var winWid=WinDim[1];var winHgt=WinDim[2];var clickPos=(RequestedPos)?(RequestedPos[0]==1):true;var aboveClkPos=(RequestedPos)?(RequestedPos[0]==2):false;var topCent=(RequestedPos)?(RequestedPos[0]==3):false;var center=(RequestedPos)?(RequestedPos[0]==4):false;var botCent=(RequestedPos)?(RequestedPos[0]==5):false;var xOffset=(RequestedPos)?RequestedPos[1]:0;var yOffset=(RequestedPos)?RequestedPos[2]:15;if(showImg){var imgSrc=body.split("imgSrc=")[1];var WinDim=this.getScaledSize(winWid,winHgt,theCaption);winWid=WinDim[0];winHgt=WinDim[1];if(userWithWritePrivileges)theCaption+="<div class='dwTitleLine2' id='ImageProperties'>&nbsp;</div>";var body="<img src='"+imgSrc+"' border='0' hspace='0' vspace='0' galleryimg='no' style='"+getOpacity()+" width:"+winWid+"px; height:"+winHgt+"px;' onload='DW.showImg( this );' onAbort='this.src=this.src;' id='ImageDW' onmouseover='DW.overImg=true;' onmouseout='DW.overImg=false;'>";if(this.winType=="TN"){var titleBarGUI="<table align='center' id='tnTable'><tr align='center'><td class='dwBackEnlargementSsTn' id='SsTnBackTD' onmousedown='DW.cancelEvt( event );'><a href='javascript:void(0);' onClick='TN.nextImage( 0, event ); return false;' title='Last enlargement' onmousedown='DW.cancelEvt( event );' class='SsTnArrow'>\u25C4</a></td><td class='dwTitle dwImgTitleSS' id='SsTnTitle'>"+theCaption+"</td><td class='dwNextEnlargementSsTn'><a href='javascript:void(0);' onClick='TN.nextImage( 1, event ); return false;' title='Next enlargement, or click photo...' onmousedown='DW.cancelEvt( event );' class='SsTnArrow' id='SsTnNextArrow'>\u25BA</a></td></tr></table>";theCaption=titleBarGUI;}
else if(this.winType=="SS"){var titleBarGUI="<table align='center' id='tnTable'><tr align='center'><td class='dwBackEnlargementSsTn' id='SsTnBackTD' onmousedown='DW.cancelEvt( event );'><a href='javascript:void(0);' onClick='SS.back(); return false;' title='Back' onmousedown='DW.cancelEvt( event );' class='SsTnArrow'>\u25C4</a></td><td class='dwTitle dwImgTitleSS' id='SsTnTitle'>"+theCaption+"</td><td class='dwNextEnlargementSsTn'><a href='javascript:void(0);' onClick='SS.next( event ); return false;' title='Next' onmousedown='DW.cancelEvt( event );' class='SsTnArrow' id='SsTnNextArrow'>\u25BA</a></td></tr></table>";theCaption=titleBarGUI;}}
var Window=gId("dWinID");if(Window)rCh(Window);var NewWindow=gEl("DIV");var scrollSt,bodyHgtSt;bodyHgtStyle=(winHgt)?" height:"+winHgt+"px;":"";NewWindow.id="dWinID";NewWindow.className="dwWin";aCh(NewWindow);NewWindow.style.visibility="hidden"
NewWindow.style.position="absolute";var borderWid=(DW.overlayExists)?0:Settings.borderWidDW;NewWindow.style.borderWidth=borderWid+"px";NewWindow.style.width=(IE&&document.compatMode!="CSS1Compat")?(winWid+(2*borderWid))+"px":winWid+"px";NewWindow.style.top=(screen.height*-1)+"px";NewWindow.style.left=(screen.width*-1)+"px";NewWindow.style.zIndex=10000;var music=(this.winType=="SS"&&Settings.SS.audio)?"&nbsp; &nbsp;<a href='javascript:void(0);' onClick='SS.pause( 1 ); Menu.show( this, \"Menu_Music\", 34, event, 0, 6 );' Menu.keepAlive([\"Menu_Music\"]);' onMouseout='Menu.hide([\"Menu_Music\"]);' class='SsMusic' title='"+Msg.SsAudio+"'>&#9835;</a>&nbsp;":"";var counterCell=(this.winType=="TN"||this.winType=="SS")?"<td id='dwTitleLeft' class='dwCounterSsTn' onmousedown='DW.cancelEvt( event );'><span id='SsTnCount' onmousedown='DW.cancelEvt( event );'></span><span onmousedown='DW.cancelEvt( event );'>"+music+"</td>":"";var pauseBut=(this.winType=="SS")?"&nbsp;<a href='javascript:SS.pause( ( SS.running ) ? 1 : 0 );' title='Pause'><img src='images/pauseSsOff.gif' id='PauseSs' class='dwPauseSs' onMouseover='SS.highlightPause( this, 1 );' onMouseout='SS.highlightPause( this, 0 );'></a>&nbsp;":"";var winClass=(DW.overlayExists||addOverlay)?"dwTitleRowOverlay":"dwTitleRow";var dwX=(noX)?"":"<a href='javascript:DW.removeWin();' title='Close' id='dwX' class='dwX'>&nbsp;&times;&nbsp;</a>";var myWindow="<div class='"+winClass+"' id='dwTitleRowID' onmouseover='DW.overTitleBar=true;' onmouseout='DW.overTitleBar=false;'><table align='center'><tr>"+counterCell+"<td class='dwTitle' style='width:100%; text-align:center;' id='dwTitleCenter'>"+theCaption+"</td><td valign='top' id='dwTitleRight' onmousedown='DW.cancelEvt( event );' style='white-space:nowrap;'>"+pauseBut+dwX+"</td></tr></table></div><div class='"+((showImg)?"dwBodyParentImg":"dwBodyParent")+"' style='width:100%;"+bodyHgtStyle+scrollStyle+"'><div class='dwBody' id='dwBodyID' style='margin:"+bodyMargin+"px;'>";if(centerContent)myWindow+="<table align='center'><tr><td>";myWindow+=body;if(centerContent)myWindow+="</td></tr></table>";myWindow+="</div></div>";NewWindow.innerHTML=myWindow;var xPos=0,yPos=0;if(clickPos||aboveClkPos){if(theEvent)var ClickPos=this.getClickPosition(theEvent);else if(window.gClickPos)var ClickPos=gClickPos;window.gClickPos=ClickPos;xPos=ClickPos[0];var vPortWid=(document.body.clientWidth)?document.body.clientWidth:window.innerWidth;var skew=Math.round(100*xPos/vPortWid)/100;xPos=xPos+xOffset-(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:gId(RequestedPos[3]);if(SF){var Target=(theEvent.target)?theEvent.target:theEvent.srcElement;if(Target.nodeType==3)Component=Component.parentNode;}
var CurComponent=Component;var parPosAbs=false;while(CurComponent){yPos+=CurComponent.offsetTop;xPos+=CurComponent.offsetLeft;CurComponent=CurComponent.offsetParent;}
switch(RequestedPos[0]){case 10:xPos+=xOffset;yPos-=NewWindow.offsetHeight-yOffset;break;case 11:xPos+=Component.offsetWidth+xOffset;yPos-=NewWindow.offsetHeight-yOffset;break;case 12:xPos+=Component.offsetWidth+xOffset;yPos+=yOffset;break;case 13:xPos+=Component.offsetWidth+xOffset;yPos+=Component.offsetHeight+yOffset;break;case 14:xPos+=xOffset;yPos+=Component.offsetHeight+yOffset;break;case 15:xPos+=Component.offsetWidth+xOffset-NewWindow.offsetWidth;yPos+=Component.offsetHeight+yOffset;break;case 16:xPos+=xOffset-NewWindow.offsetWidth;yPos+=Component.offsetHeight+yOffset;break;case 17:xPos+=xOffset-NewWindow.offsetWidth;yPos+=yOffset;break;default:alert("Switch/Case Error at DW.createWindow: RequestedPos[ 0 ] has a value of "+RequestedPos[0]+" which is invalid.");}}
var NewWindowPos=this.keepInWin(NewWindow,xPos,yPos);xPos=Math.round(NewWindowPos[0]);yPos=Math.round(NewWindowPos[1]);NewWindow.style.left=xPos+"px";NewWindow.style.top=yPos+"px";if(addOverlay)this.addOverlay(0,winType);NewWindow.style.visibility="visible";}
function getScaledSize(imgWid,imgHgt,photoCaption){var photoCaptionLC=photoCaption.toLowerCase();var nLines=1;nLines+=photoCaptionLC.split("<div").length-1;nLines+=photoCaptionLC.split("<br").length-1;var marginX=45;var marginY=50+(10*nLines);var dwWid=imgWid+marginX;var dwHgt=imgHgt+marginY;var bodyWid,bodyHgt;if(IE){bodyWid=this.TheBody.clientWidth;bodyHgt=this.TheBody.clientHeight;}
else{bodyWid=window.innerWidth;bodyHgt=window.innerHeight;}
var winWidNew,winHgtNew;if(dwWid>=bodyWid||dwHgt>=bodyHgt){var widOver=dwWid-bodyWid;var hgtOver=dwHgt-bodyHgt;if(hgtOver/bodyHgt>widOver/bodyWid){winHgtNew=bodyHgt-marginY;winWidNew=Math.round((winHgtNew/imgHgt)*imgWid);}
else{winWidNew=bodyWid-marginX;winHgtNew=Math.round((winWidNew/imgWid)*imgHgt);}}
else{winWidNew=imgWid;winHgtNew=imgHgt;}
return[winWidNew,winHgtNew];}
function addOverlay(showPreloader,winType){this.winType=winType;this.setBody();var Overlay=gId("dwOverlay");if(!Overlay){if(window.SSE&&SSE.running)SSE.pauseSS(1);window.onscroll=function(){var Overlay=gId("dwOverlay");if(Overlay){rCh(Overlay);DW.overlayExists=false;if(window.SSE&&!SSE.running)SSE.pauseSS(0);}
if(window.DW)DW.removeWin();}
var Overlay=gEl("DIV");Overlay.id="dwOverlay";Overlay.className="dwOverlay";if(this.winType=="TN"||this.winType=="SS"){var TopImage=gId("TopImage");if(TopImage){rCh(TopImage);(this.winType=="SS")?SS.TopImage=null:TN.TopImage=null;}}
else{Overlay.onclick=function(){var CancelPreloadImg=gId("CancelPreloadImg");if(!CancelPreloadImg){rCh(this);DW.overlayExists=false;}}}
aCh(Overlay);var xPos=(IE)?this.TheBody.scrollLeft:window.pageXOffset;var yPos=(IE)?this.TheBody.scrollTop:window.pageYOffset;Overlay.style.left=xPos+"px";Overlay.style.top=yPos+"px";if(showPreloader)Overlay.innerHTML="<div align='center' class='cancelPreload' id='CancelPreload'><img src='images/preloader.gif' class='cancelPreload' id='CancelPreloadImg' /><div><a href='javascript:DW.cancelPreloader();' class='cancelPreload' title='Stop image loading'>Cancel</a></div></div>";}
this.overlayExists=true;}
function reCenter(DW){var scrollX,scrollY,bodyWid,bodyHgt,xPos,yPos;if(IE){scrollX=this.TheBody.scrollLeft;scrollY=this.TheBody.scrollTop;bodyWid=this.TheBody.clientWidth;bodyHgt=this.TheBody.clientHeight;}
else{scrollX=window.pageXOffset;scrollY=window.pageYOffset;bodyWid=window.innerWidth;bodyHgt=window.innerHeight;}
winHgt=DW.offsetHeight;winWid=DW.offsetWidth;xPos=parseInt((bodyWid-winWid)/2+scrollX);yPos=parseInt((bodyHgt-winHgt)/2+scrollY);DW.style.left=xPos+"px";DW.style.top=yPos+"px";}
function showImg(Photo){Photo.oncontextmenu=function(){return(Settings.preventImageTheft)?false:true;};if(this.winType=="TN"){Photo.title="Next enlargement";Photo.onclick=function(event){TN.nextImage(1,event);this.title="";}
gId("SsTnCount").onmouseover=function(){var Numbers=this.innerHTML.split("/");this.title="Photo #"+Numbers[0]+" of "+Numbers[1];}
TN.imgWidOld=Photo.width;TN.imgHgtOld=Photo.height;TN.preloadNext();}
else if(this.winType=="SS"){Photo.title="Next";Photo.onclick=function(event){SS.next(event);this.title="";}
gId("SsTnCount").onmouseover=function(){var Numbers=this.innerHTML.split("/");this.title="Photo #"+Numbers[0]+" of "+Numbers[1];}
SS.imgWidOld=Photo.width;SS.imgHgtOld=Photo.height;SS.preLoadNext();if(Settings.SS.audio){var nAudio=(GetCookie("audio"))?parseInt(GetCookie("audio")):0;if(nAudio&&Audio[nAudio-1]&&Audio[nAudio-1][0]){var audioFile=Audio[nAudio-1][0];SS.audioFile=audioFile;SS.MusicMenuLink=gId(audioFile);setTimeout("if( window.SS ) SS.playAudio( 0 );",1000);}}}
else{Photo.onclick=DW.removeWin;Photo.title="Click to close";}
Photo.style.cursor="pointer";showImgProperties(Photo);startFade(Photo,this.transDur,0);}
function keepInWin(NewWindow,leftEdge,topEdge){var bodyHgt=(IE)?this.TheBody.clientHeight:window.innerHeight;var bodyWid=(IE)?this.TheBody.clientWidth:window.innerWidth;var winHgt=NewWindow.offsetHeight;var yOffset=(IE)?this.TheBody.scrollTop:window.pageYOffset;var vScreenPos=topEdge-yOffset;var vSkew=bodyHgt-vScreenPos;if(vScreenPos<10)topEdge=10+yOffset;else if(vSkew<winHgt+10)topEdge-=winHgt-vSkew+10;var winWid=NewWindow.offsetWidth;var xOffset=(IE)?this.TheBody.scrollLeft:window.pageXOffset;var hScreenPos=leftEdge-xOffset;var hSkew=bodyWid-hScreenPos;if(hScreenPos<10)leftEdge=10+xOffset;else if(hSkew<winWid+10){leftEdge-=winWid-hSkew+10;if(!IE&&this.TheBody.scrollHeight>bodyHgt)leftEdge-=15;}
if(leftEdge<11)leftEdge=10;if(topEdge<11)topEdge=10;return[leftEdge,topEdge];}
function getClickPosition(theEvent){try{if(IE){var x=event.clientX+this.TheBody.scrollLeft;var y=event.clientY+this.TheBody.scrollTop;}
else{var x=theEvent.pageX;var y=theEvent.pageY;}}
catch(err){var x=0;var y=0;}
return[x,y];}
function getData(dataSrc,TheLink){if(dataSrc=="nextSibling"){if(eval("typeof this.LastSrc")=="object")eval("this.LastSrc.innerHTML = this.lastData");try{var DataSource=(TheLink.nextSibling.innerHTML)?TheLink.nextSibling:TheLink.nextSibling.nextSibling;}
catch(err){alert("EXCEPTION: Data source not found");return false;}
try{var Title=(DataSource.firstChild.innerHTML)?DataSource.firstChild:DataSource.firstChild.nextSibling;var title=Title.innerHTML;}
catch(err){alert("EXCEPTION: Title source not found");return false;}
try{var Body=(Title.nextSibling.innerHTML)?Title.nextSibling:Title.nextSibling.nextSibling;var body=Body.innerHTML;}
catch(err){alert("EXCEPTION: Body source not found");return false;}
eval("this.LastSrc = DataSource");eval("this.lastData = DataSource.innerHTML");DataSource.innerHTML="";}
else{var title=dataSrc[0];var body=dataSrc[1];}
return[title,body];}
function mouseDown(e){if(DW.overTitleBar){document.onmousedown=DW.mouseDown;document.onmousemove=DW.mouseMove;document.onmouseup=DW.mouseUp;this.Window=gId("dWinID");if(IE){var borderWid=(DW.overlayExists)?0:Settings.borderWidDW;if(DW.winType=="TN"||DW.winType=="SS"){this.dWinOffsetX=event.offsetX+borderWid+DW.ssTnskewIeX;this.dWinOffsetY=event.offsetY+borderWid+DW.ssTnskewIeY;var Elem=event.srcElement,ParentElem=Elem.offsetParent;if(Elem.id=="dwTitleCenter")this.dWinOffsetX+=gId("dwTitleLeft").scrollWidth;else if(Elem.id=="SsTnTitle"||ParentElem.id=="SsTnTitle"){var CurComponent=Elem;var xPos=0,yPos=0;while(CurComponent){if(CurComponent.id=="tnTable"){yPos=CurComponent.offsetTop;xPos=CurComponent.offsetLeft;break;}
CurComponent=CurComponent.offsetParent;}
this.dWinOffsetX+=gId("dwTitleLeft").scrollWidth+gId("SsTnBackTD").scrollWidth+xPos;}
else if(Elem.id=="dwTitleRight"){var CurComponent=Elem;var xPos=0,yPos=0;while(CurComponent){if(CurComponent.id=="dwTitleRight"){yPos=CurComponent.offsetTop;xPos=CurComponent.offsetLeft;break;}
CurComponent=CurComponent.offsetParent;}
this.dWinOffsetX+=xPos;}}
else{this.dWinOffsetX=event.offsetX+borderWid+DW.skewIeX;this.dWinOffsetY=event.offsetY+borderWid+DW.skewIeY;}}
else{this.dWinOffsetX=e.layerX;this.dWinOffsetY=e.layerY;return false;}}
else if(DW.overImg&&Settings.preventImageTheft){document.onmousemove=function(){return false;}
document.onmouseup=function(){return false;}
return false;}}
function mouseMove(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=gId("EvalOnClose");if(EvalOnClose)eval(EvalOnClose.value);var Window=gId("dWinID");if(Window)rCh(Window);DW.cancelPreloader();if(window.SSE&&!SSE.running)SSE.pauseSS(0);DW.overTitleBar=false;switch(DW.winType){case "SS":if(window.SS)SS.kill();break;case "TN":if(window.TN)TN.kill();break;}
DW.otherFunctionalityOnRemoveWin();}
function moveTopImage(){var TopImage=gId("TopImage");if(TopImage){var BotImage=gId("ImageDW");var x=0;var y=0;TheElement=BotImage;var parPosAbs=false;while(TheElement){if(SF){if(!parPosAbs)parPosAbs=(TheElement.style.position=="absolute");if(parPosAbs&&TheElement==document.body)break;}
y+=TheElement.offsetTop;x+=TheElement.offsetLeft;TheElement=TheElement.offsetParent;}
var borderWid=(DW.overlayExists||OP)?0:Settings.borderWidDW;TopImage.style.left=(x+borderWid-parseInt(BotImage.parentNode.style.marginLeft))+"px";TopImage.style.top=(y+borderWid-parseInt(BotImage.parentNode.style.marginTop))+"px";}}
function mouseUp(){this.Window=null;}
function setBody(){if(!this.TheBody)this.TheBody=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;}
function cancelEvt(evt){(evt&&evt.stopPropagation)?evt.stopPropagation():event.cancelBubble=true;}}
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(["About","MACC","Admin_Options"]);}
function write(){var menu="<div id='Admin_Options' onMouseOver='Menu.keepAlive([\"Admin_Options\"]);' onMouseOut='Menu.clearAll();' class='menu'><table align='left' border='0' cellspacing='0' cellpadding='0' 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 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 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'>Upload Images</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='About' onMouseOver='Menu.keepAlive([\"About\"]);' onMouseOut='Menu.clearAll();' class='menu'><table align='left' border='0' cellspacing='0' cellpadding='0' class='menuBorder'><tr id='MenuFooter'><td><a href='musicians.aspx' class='menu'><div onMouseOver='Menu.on(this);' onMouseOut='Menu.off(this);' class='menuItemOff'><div class='menuItem'>The Musicians</div></div></a></td></tr><tr id='MenuHeader'><td><a href='board.aspx' class='menu'><div onMouseOver='Menu.on(this);' onMouseOut='Menu.off(this);' class='menuItemOff'><div class='menuItem'>Board of Directors</div></div></a></td></tr></table></div>";if(window.MACC_MenuItems){var MACC_Menu="<div id='MACC' onMouseOver='Menu.keepAlive([\"MACC\"]);' onMouseOut='Menu.clearAll();' class='menu'><table align='left' border='0' cellspacing='0' cellpadding='0' class='menuBorder'>";for(var i=0;i<MACC_MenuItems.length-1;i++){MACC_Menu+="<tr><td><a href='"+MACC_MenuItems[i][1]+"' onClick='PopUp.openWin(this.href); return false;' class='menu'><div onMouseOver='Menu.on(this);' onMouseOut='Menu.off(this);' class='menuItemOff'><div class='menuItem'>"+MACC_MenuItems[i][0]+"</div></div></a></td></tr>";}
MACC_Menu+="</table></div>";menu+=MACC_Menu;}
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&&IE&&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 initPage(){try{var Links=document.links;for(var i=0;i<Links.length;i++){var LinkComponents=Links[i].href.split("/");var file=LinkComponents[LinkComponents.length-1].replace(/\?.*/, "" ).toLowerCase();
if(file==fileName.toLowerCase()){if(Links[i].className=="navBot")Links[i].className="navBotDisabled";if(Links[i].className=="navTop")Links[i].className="navTopDisabled";}}
var Images=document.images;for(var i=0;i<Images.length;i++){var Img=Images[i];if( Img.className == "diTnOff" || Img.className == "diTnOn" || Img.className == "tnLeft" || Img.className == "tnRight" || Img.className == "tnRow" && Img.parentNode && /a/i.test(Img.parentNode.tagName))Img.title=Msg.Enlarge;}
var Links=document.links;for(var i=0;i<Links.length;i++){var Link=Links[i];var RequestedPath=Link.pathname.split("/");var requestedPage=RequestedPath[RequestedPath.length-1];switch(requestedPage){case "contact.aspx":Link.title=Msg.Contact;break;case "default.aspx":Link.title=Msg.Home;break;case "director.aspx":Link.title=Msg.Director;break;case "donate.aspx":Link.title=Msg.Donate;break;case "concerts.aspx":Link.title=Msg.Events;break;case "news.aspx":Link.title=Msg.News;break;}}
if(window.FW&&userWithWritePrivileges){var AdminTdBulletBot=document.getElementById("AdminTdBulletBot");var AdminTdLinkBot=document.getElementById("AdminTdLinkBot");if(AdminTdBulletBot&&AdminTdLinkBot){AdminTdBulletBot.className="navBulletBot";AdminTdLinkBot.className="navLink";}
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){LogInLink.innerHTML="Log-Off";LogInLink.onmouseover=function(){this.title=Msg.Logoff;}
LogInLink.onclick=function(){FW.logOff();}}
var MasterTable=document.getElementById("MasterTable");MasterTable.style.height="1%";}
var ThumbnailsGUI=gId("ThumbnailsGUI");if(ThumbnailsGUI){window.TN=new ThumbNails();TN.displayThumbnails();var ThumbnailsProgessBar=gId("ThumbnailsProgessBar");if(ThumbnailsProgessBar)TN.updateProgressBar();}
switch(fileNameLC){case "default.aspx":SSE.writeSlideShow();break;}
self.status="";}
catch(Err){if(local)alert(Err);self.status="Initializing at initPage()...";setTimeout("initPage()",200);}}
function PopUp(){this.winName="mauipopsWin";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 initDynamicIndex(){DI=new DynamicIndex();DI.writeImageLayout();DI.setEventHandlers();DI.maintainState();DI.initialized=true;}
function DynamicIndex(){this.initialized=false;this.MsgDI=new Array();this.MsgDI.Show="Show content";this.MsgDI.Hide="Hide content";this.editImgTableLayout=editImgTableLayout;this.getImageTableData=getImageTableData;this.getPlusMinus=getPlusMinus;this.onClickMore=onClickMore;this.collapseOthers=collapseOthers;this.switchDisplay=switchDisplay;this.showTip=showTip;this.maintainState=maintainState;this.setEventHandlers=setEventHandlers;this.writeImageLayout=writeImageLayout;this.imgLayoutPage=(window.SettingsDI);function writeImageLayout(){if(this.imgLayoutPage){var nRecords=0;var Htm=new Array();var Divs=gTn("div");for(var i=0;i<Divs.length;i++){var DivRecord=Divs[i];if( /^Record$/.test(DivRecord.className)){Htm[nRecords]=new Array();var Div=DivRecord.firstChild;while(Div){if( Div.tagName && /div/i.test(Div.tagName)){var htm=Div.innerHTML.trim();Htm[nRecords].push(htm);}
Div=Div.nextSibling;}
nRecords++;}}
var Out=new Array();var rowNum=0;var imagesPerRow=SettingsDI.imagesPerRow;for(var i=0;i<nRecords;i++){var newRow=(i%imagesPerRow==0);if(newRow){Out.push("<table align='center'");if(i>0){Out.push(" style='margin-top:");Out.push(SettingsDI.verticalSpacingPx);Out.push("px;'");}
Out.push(">\n");Out.push("\t<tbody>\n");Out.push("\t\t<tr align='center'>\n");for(var j=rowNum;j<rowNum+imagesPerRow;j++){if(j>=nRecords)break;Out.push("\t\t\t<td class='diSpacer'>\n");Out.push("\t\t\t\t");Out.push(Htm[j][0]);Out.push("\n");Out.push("\t\t\t</td>\n");}
Out.push("\t\t</tr>\n");Out.push("\t\t<tr align='center'>\n");for(var j=rowNum;j<rowNum+imagesPerRow;j++){if(j>=nRecords)break;Out.push("\t\t\t<td class='diSpacer'>\n");Out.push("\t\t\t\t<div class='diCaptionOff'>\n");Out.push("\t\t\t\t\t");Out.push(Htm[j][1]);Out.push("\n");Out.push("\t\t\t\t</div>\n");Out.push("\t\t\t</td>\n");}
Out.push("\t\t</tr>\n");if(rowNum%imagesPerRow==0){Out.push("\t</tbody>\n");Out.push("</table>\n\n");Out.push("<table align='center'");Out.push(" style='width:");Out.push(SettingsDI.verbiageWidthPx);Out.push("px;'");Out.push(">\n");Out.push("\t<tbody>\n");Out.push("\t\t<tr>\n");Out.push("\t\t\t<td>\n");for(var j=rowNum;j<rowNum+imagesPerRow;j++){if(j>=nRecords)break;Out.push("\t\t\t\t<div class='diContent diContentBkgOn'>\n");Out.push("\t\t\t\t\t");Out.push(Htm[j][2]);Out.push("\n");Out.push("\t\t\t\t</div>\n");}
Out.push("\t\t\t</td>\n");Out.push("\t\t</tr>\n");Out.push("\t</tbody>\n");Out.push("</table>\n\n");}}
rowNum++;}
var out=Out.join("");out=out.trim();var OutputDI=gId("OutputDI");if(0){var Textarea=gEl("textarea");Textarea.style.width="1200px";Textarea.style.height="600px";Textarea.style.marginTop="20px";Textarea.value=out.replace(/\t/g, "  " );
OutputDI.innerHTML=out;OutputDI.appendChild(Textarea);}
else{out=out.replace(/\t/g, "" );
out=out.replace(/\n/g, "" );
OutputDI.innerHTML=out;}}}
function onClickMore(Link,evt){}
function setEventHandlers(){try{var AllLinks=gTn("a");for(var i=0;i<AllLinks.length;i++){var Link=AllLinks[i];if(AllLinks[i].className=="diHeading"){var PlusMinusLink=Link.previousSibling;while(PlusMinusLink){if( PlusMinusLink.tagName && /a/i.test(PlusMinusLink.tagName))break;PlusMinusLink=PlusMinusLink.previousSibling;}
PlusMinusLink.href="javascript:void(0);";PlusMinusLink.className="diPlusMinus";PlusMinusLink.onclick=function(event){if(window.DI){DI.onClickMore(this.nextSibling,event);DI.switchDisplay(this.nextSibling);}}
PlusMinusLink.onmouseover=function(){if(window.DI)DI.showTip(this.nextSibling);return true;}
Link.href="javascript:void(0);";Link.onmouseover=function(){if(window.DI)DI.showTip(this);return true;}
if(this.imgLayoutPage)Link.onclick=function(event){if(window.DI){DI.editImgTableLayout(this);}}
else
Link.onclick=function(event){if(window.DI){DI.onClickMore(this,event);DI.switchDisplay(this);}}}}
self.status="";}
catch(Err){if(local){var err="";for(member in Err)err+=member+": "+Err[member]+"\n";alert("Exception at DI.setEventHandlers:\n\n"+err);}
else{self.status="Initializing DI.setEventHandlers() method, one moment please...";setTimeout("DI.setEventHandlers();",250);}}}
function maintainState(){try{var diState=GetCookie(fileNameLC);if(diState){var AllLinks=gTn("a");var DiState=diState.split("_");for(var i=0;i<AllLinks.length;i++){for(var k in DiState){if(DiState[k]&&parseInt(DiState[k])==i){try{if(this.imgLayoutPage)this.editImgTableLayout(AllLinks[i]);else
this.switchDisplay(AllLinks[i]);}
catch(e){};}}}}
self.status="";}
catch(Err){if(local){var err="";for(member in Err)err+=member+": "+Err[member]+"\n";alert("Exception at DI.maintainState so \u201C"+fileNameLC+"\u201D cookie deleted:\n\n"+err);}
else{self.status="Initializing DI.maintainState() method, one moment please...";setTimeout("DI.maintainState();",250);}
DeleteCookie(fileNameLC);}}
function getPlusMinus(Link){var PlusMinusLink=Link.previousSibling;while(PlusMinusLink){if( PlusMinusLink.tagName && /a/i.test(PlusMinusLink.tagName))break;PlusMinusLink=PlusMinusLink.previousSibling;}
return PlusMinusLink;}
function switchDisplay(Link,Img,Content,Caption){var PlusMinus=getPlusMinus(Link);var expanding=(PlusMinus.innerHTML=="+"),contracting=!expanding;if(Caption)Caption.className=(expanding)?"diCaptionOn":"diCaptionOff";if(Img)Img.className=(expanding)?"diTnOn":"diTnOff";PlusMinus.innerHTML=(expanding)?"-":"+";var AllLinks=gTn("a");var valOld=GetCookie(fileNameLC),valNew="";for(var i=0;i<AllLinks.length;i++){if(AllLinks[i]==Link){if(valOld){var key="_"+i+"_";if(valOld.indexOf(key)>=0){if(contracting){var ValOld=valOld.split(key);valNew=((ValOld[0])?ValOld[0]:"")+"_"+((ValOld[1])?ValOld[1]:"");(valNew=="_")?DeleteCookie(fileNameLC):SetCookie(fileNameLC,valNew);}
break;}
if(expanding)valNew=valOld+i+"_";}
else if(expanding)valNew="_"+i+"_";if(valNew)SetCookie(fileNameLC,valNew);break;}}
if(!Content){var Content=Link.nextSibling;while(Content){if( Content.tagName && /div/i.test(Content.tagName))break
Content=Content.nextSibling;}}
try{Content.style.display=(contracting)?"none":"block";}
catch(Err){if(local){var err="";for(member in Err)err+=member+": "+Err[member]+"\n";alert("Exception at DI.switchDisplay so \u201C"+fileNameLC+"\u201D cookie deleted:\n\n"+err);}
DeleteCookie(fileNameLC);}
if(this.imgLayoutPage&&this.initialized&&expanding){var ContentTd=Content.parentNode;while(ContentTd){if( ContentTd.tagName && /td/i.test(ContentTd.tagName))break;ContentTd=ContentTd.parentNode;}
var Focuser=gEl("a");Focuser.href="javascript:void(0)";Focuser.innerHTML=".";ContentTd.appendChild(Focuser);Focuser.focus();Link.focus();ContentTd.removeChild(Focuser);}
this.showTip(Link);}
function showTip(Link,msgOn,msgOff){var PlusMinus=getPlusMinus(Link);if(PlusMinus.innerHTML=="+"){Link.title=(msgOn)?msgOn:this.MsgDI.Show;PlusMinus.title=(msgOn)?msgOn:this.MsgDI.Show;}
else{Link.title=(msgOff)?msgOff:this.MsgDI.Hide;PlusMinus.title=(msgOff)?msgOff:this.MsgDI.Hide;}}
function editImgTableLayout(Link){var ImageData=this.getImageTableData(Link);this.collapseOthers(Link,ImageData);var nCellClicked=ImageData[0];var ImgArr=ImageData[2];var Img=ImgArr[nCellClicked];var CaptionArr=ImageData[3];var Caption=CaptionArr[nCellClicked];var DivContentArr=ImageData[4];var Content=DivContentArr[nCellClicked];this.switchDisplay(Link,Img,Content,Caption);}
function collapseOthers(Link,ImageData){var nCellClicked=ImageData[0];var Td=ImageData[1];var ImgArr=ImageData[2];var CaptionArr=ImageData[3];var ContentArr=ImageData[4];var nCell=0;while(Td){if(nCellClicked!=nCell){var DivCaption=Td.firstChild,LinkOther=null;outer:while(DivCaption){if( DivCaption.tagName && /div/i.test(DivCaption.tagName)){LinkOther=DivCaption.lastChild;while(LinkOther){if( LinkOther.tagName && /a/i.test(LinkOther.tagName)){break outer;}
LinkOther=LinkOther.previousSibling;}}
DivCaption=DivCaption.nextSibling;}
if(LinkOther){var PlusMinusLink=this.getPlusMinus(LinkOther);PlusMinusLink.innerHTML="-";this.switchDisplay(LinkOther,ImgArr[nCell],ContentArr[nCell],CaptionArr[nCell]);}
else{DeleteCookie(fileNameLC);if(local){alert("ERROR: DI.collapseOthers unable to locate link so \u201C"+fileNameLC+"\u201D cookie deleted:");return;}}}
var Td=Td.nextSibling;while(Td){if( Td.tagName && /td/i.test(Td.tagName))break;Td=Td.nextSibling;}
nCell++;}}
function getImageTableData(Link){var ImgArr=new Array(),TdFirst=null,CaptionArr=new Array(),ContentArr=new Array(),nCellClicked=-1;var Tr=null;var Parent=Link.parentNode,Table=null;while(Parent){if(Parent.tagName){if( /td/i.test(Parent.tagName))nCellClicked=Parent.cellIndex;if( /tr/i.test(Parent.tagName))Tr=Parent;if( /table/i.test(Parent.tagName)){Table=Parent;break;}}
Parent=Parent.parentNode;}
var Td=Tr.firstChild;while(Td){if( Td.tagName && /td/i.test(Td.tagName)){if(!TdFirst)TdFirst=Td;var DivCaption=Td.firstChild;while(DivCaption){if( /div/i.test(DivCaption.tagName ) && /^diCaption/.test(DivCaption.className))CaptionArr.push(DivCaption);DivCaption=DivCaption.nextSibling;}}
Td=Td.nextSibling;}
var TrImages=Tr.previousSibling;while(TrImages){if( TrImages.tagName && /tr/i.test(TrImages.tagName)){var TdImages=TrImages.firstChild;while(TdImages){if( TdImages.tagName && /td/i.test(TdImages.tagName)){var LinkImages=TdImages.firstChild;while(LinkImages){if( LinkImages.tagName && /a/i.test(LinkImages.tagName)){var Img=LinkImages.firstChild;while(Img){if( Img.tagName && /img/i.test(Img.tagName))ImgArr.push(Img);Img=Img.nextSibling;}}
LinkImages=LinkImages.nextSibling;}}
TdImages=TdImages.nextSibling;}}
TrImages=TrImages.previousSibling;}
var TableContent=Table.nextSibling;while(TableContent){if( TableContent.tagName && /table/i.test(TableContent.tagName)){var TbodyContent=TableContent.firstChild;while(TbodyContent){if( TbodyContent.tagName && /tbody/i.test(TbodyContent.tagName)){var TrContent=TbodyContent.firstChild;while(TrContent){if( TrContent.tagName && /tr/i.test(TrContent.tagName)){var TdContent=TrContent.firstChild;while(TdContent){if( TdContent.tagName && /td/i.test(TdContent.tagName)){var DivContent=TdContent.firstChild;while(DivContent){if( DivContent.tagName && /div/i.test(DivContent.tagName))ContentArr.push(DivContent);DivContent=DivContent.nextSibling;}}
TdContent=TdContent.nextSibling;}}
TrContent=TrContent.nextSibling;}}
TbodyContent=TbodyContent.nextSibling;}}
TableContent=TableContent.nextSibling;}
return[nCellClicked,TdFirst,ImgArr,CaptionArr,ContentArr];}}
function FileWriter(){this.HtmNotes="";var ssImg="";if(fileName=="default.aspx"){this.HtmNotes="<div style='margin:5px 0px 5px 0px;'>Right-click the slide-show to pause it. When adding new pictures <a href='javascript:PopUp.openWin( \"uploader.aspx\", 650, 300, 2, 0, 0, 1, 0, 0, 0 );' class='fw'>upload them</a> at 700 &times; 300 pixels.</div>";ssImg="<button onClick='FW.insertTags( \"[\\\"\", \"\\\"],\", \"EditedHTML\" ); return false;' title='Insert blank slide-show image at cursor position' class='htmlTags'>SS Image</button>"}
this.HtmNotesBot="Just published but don&rsquo;t see your changes? Press Reload &nbsp;&#149;&nbsp; Completely ruined a page? Go to Help &rArr; Restore";var ddTags=(fileName=="concerts.aspx"||fileName=="news.aspx")?"<button onClick='FW.insertTags( \"<!-- Begin dt: Definition Term -->\\n<dt class=\\\"NewsEvents\\\">\\n  Overtype With Definition Term\\n</dt>\\n<!-- End dt: Definition Term -->\\n\\n<!-- Begin dd: Definition -->\\n<dd class=\\\"NewsEvents\\\">\\n  Overtype With Definition\\n</dd>\\n<!-- End dd: Definition -->\", \"\", \"EditedHTML\" ); return false;' title='Insert Term & Definition Tags at cursor position' class='htmlTags'>&lt;dt-dd&gt;</button>":"";var clubs=(fileName=="musicians.aspx")?"<button onClick='FW.insertTags( \"{clubs}\", \"\", \"EditedHTML\" ); return false;' title='Insert clubs icon' class='htmlTags'>&clubs;</button>":"";var diamond=(fileName=="musicians.aspx")?"<button onClick='FW.insertTags( \"{diams}\", \"\", \"EditedHTML\" ); return false;' title='Insert diamond icon' class='htmlTags'>&diams;</button>":"";this.HtmButtons="<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>"+ddTags+"<button onClick='FW.insertTags( \"<a href=\\\"images/SomePhotoName.jpg\\\" onClick=\\\"return enlargement( &#39;Photo Caption&#39;, this );\\\"><img src=\\\"images/SomePhotoNameTN.jpg\\\" class=\\\"tnLeft\\\" style=\\\"width:???px; height:???px;\\\" /></a>\", \"\", \"EditedHTML\" ); return false;' title='Insert left-aligned clickable thumbnail at cursor position' class='htmlTags'>Thumbnail Left</button><button onClick='FW.insertTags( \"<a href=\\\"images/SomePhotoName.jpg\\\" onClick=\\\"return enlargement( &#39;Photo Caption&#39;, this );\\\"><img src=\\\"images/SomePhotoNameTN.jpg\\\" class=\\\"tnRight\\\" style=\\\"width:???px; height:???px;\\\" /></a>\", \"\", \"EditedHTML\" ); return false;' title='Insert right-aligned clickable thumbnail at cursor position' class='htmlTags'>Thumbnail Right</button><button onClick='FW.insertTags( \"<a href=\\\"http://OvertypeMeWithActualWebSiteAddress\\\" onClick=\\\"PopUp.openWin(this.href); return false;\\\">Overtype me with link name that users will click on</a>\", \"\", \"EditedHTML\" ); return false;' title='Insert clickable link at cursor position' class='htmlTags'>External Link</button>"+ssImg+clubs+diamond;this.JsNotes="";this.JsButtons="";this.XmlNotes="<div class='underline'>Here's why you may need to edit this XML data:</div><ol><li>Change contact information like name, address & email-address that the contact form submits to.</li><li>With respect to the &ldquo;submit-contact-form-to&rdquo; value, in most cases you will not want to change this. Instead you will change the forward for it in the <a href='https://admin.1and1.com/' onClick='PopUp.openWin(this.href); return false;' class='fw'>1and1 control panel</a>.</li><li>To change Administrator Names, E-mails, Passwords & Editing Privileges<ol class='fSize10' type='a'><li>Set it to yes to allow administrator to edit that particular data type</li><li>Set it to no to prohibit administrator from editing that particular data type</li><li>Note that in most cases with trusted administrators, you will set it to yes for all 3 data types.</li></ol></li><li>To add new administrators. There are several blank administrator records for you. Anytime you need to add a new administrator just fill one out & publish.</li></ol>";if(DB.Administrators[userWithWritePrivileges]){var xmlLink=(DB.Administrators[userWithWritePrivileges][3])?" &#149; <a href='xml.aspx' class='fw'>Edit XML</a>":"";var headLink=(DB.Administrators[userWithWritePrivileges][1])?" &#149; <a href='header.aspx' class='fw'>Edit Header</a>":"";var footLink=(DB.Administrators[userWithWritePrivileges][1])?" &#149; <a href='footer.aspx' class='fw'>Edit Footer</a>":"";var uploadLink=(DB.Administrators[userWithWritePrivileges][1]||DB.Administrators[userWithWritePrivileges][2])?" &#149; <a href='javascript:PopUp.openWin( \"uploader.aspx\", 650, 300, 2, 0, 0, 1, 0, 0, 0 );' class='fw'>Upload Images</a>":"";this.AdminLinks="<a href='javascript:void(0);' style='color:rgb( 255,255,255 ); font-size:9pt; position:absolute; top:10px; left:15px;' 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>"+xmlLink+headLink+footLink+uploadLink;}
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)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 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.<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' border='0' cellspacing='0' cellpadding='0'><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(/enlargement\( *'/g, "enlargement( '" );
var LargePic=htm.split("enlargement( '");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("enlargement( '");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(){var Form=document.LogIn;var userNameFW=Form.user.value;if(userNameFW==""){alert("Please enter your user name");Form.user.focus();return false;}
else if(Form.pw.value==""){alert("Please enter your password");Form.pw.focus();return false;}
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);var url=fileName+"?user="+Form.user.value+"&pw="+Form.pw.value;if(qStr&&qStr.getVal("db"))url+="&db="+qStr.getVal("db");document.location.replace(url);}
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' style='margin:0px;'><table align='center' border='0' cellspacing='0' cellpadding='0'><tr><td><table align='center' border='0' cellspacing='0' cellpadding='0'><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+"' onkeypress='if( window.event && window.event.keyCode == 13 || event.which == 13 ) { FW.logIn(); return false; }' /></td></tr><tr><td class='fwField' style='padding-top:6px;'>Password</td><td class='fwValue' style='padding-top:6px;' id='tdBookingID'><input type='password' name='pw' autocomplete='off' value='"+pwOut+"' class='fwText' title='Case sensitive password' onkeypress='if( window.event && window.event.keyCode == 13 || event.which == 13 ) { FW.logIn(); return false; }' /></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='button' name='OK' value='OK' class='logInButtons' onClick='return FW.logIn();' /><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.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 SlideShowEmbedded(){try{if(ImagesSSE[ImagesSSE.length-1]==null)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)");}
for(var i=0;i<ImagesSSE.length;i++){if(!ImagesSSE[i][1])ImagesSSE[i][1]=SettingsSSE.speed;}
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.start=start;this.showSlide=showSlide;this.skipErrantSlide=skipErrantSlide;this.preLoadNext=preLoadNext;this.mouseOverImg=mouseOverImg;this.getCoordinates=getCoordinates;this.mouseDown=mouseDown;this.next=next;this.repositionElements=repositionElements;this.pauseSS=pauseSS;window.onresize=this.repositionElements;this.setFileSize=setFileSize;this.writeSlideShow=writeSlideShow;this.reportImgName=reportImgName;this.switchSpeed=switchSpeed;function writeSlideShow(){var Htm=new Array();Htm.push("<div id='slideShowContainer' class='ssContainer' style='");Htm.push("width:");Htm.push(SettingsSSE.Dimension[0]+SettingsSSE.borderWid*2);Htm.push("px; ");Htm.push("height:");Htm.push(SettingsSSE.Dimension[1]+SettingsSSE.borderWid*2);Htm.push("px; ");Htm.push(getOpacity());Htm.push("'>");Htm.push("<img id='slideShow' class='ssImage' onClick='SSE.next( event );' oncontextmenu='return SSE.reportImgName( this, event );' onMousedown='return SSE.mouseDown();' src='images/");Htm.push(ImagesSSE[SSE.nFirstSlide][0]);Htm.push("' onMouseover='SSE.mouseOverImg( this );' style='");Htm.push("width:");Htm.push(SettingsSSE.Dimension[0]);Htm.push("px; height:");Htm.push(SettingsSSE.Dimension[1]);Htm.push("px;");if(SettingsSSE.borderWid){Htm.push(" border:");Htm.push(SettingsSSE.borderWid);Htm.push("px solid rgb( ");Htm.push(SettingsSSE.borderCol);Htm.push(" );");}
Htm.push("' />");Htm.push("</div>");var htm=Htm.join("");gId("SlideShowEmbedded").innerHTML=htm;}
function mouseOverImg(Img){if(userWithWritePrivileges){Img.title="Click to skip \u2022 Right-click "+((macOS)?"(ctrl+click) ":"")+"to pause";Img.style.cursor="pointer";}}
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(IE){skewX=SettingsSSE.Skew.IE[0];skewY=SettingsSSE.Skew.IE[1];}
else 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(gId("slideShow").parentNode);SSE.ImgOverlay.style.left=OverlayPos[0]+"px";SSE.ImgOverlay.style.top=OverlayPos[1]+"px";}}
function showSlide(){if(this.NextImage){var TheImage=gId("slideShow");var imgWid=SettingsSSE.Dimension[0];var imgHgt=SettingsSSE.Dimension[1];var imgWidReal=this.NextImage.width;var imgHgtReal=this.NextImage.height;if((userWithWritePrivileges||local)&&imgWidReal>1&&imgHgtReal>1&&(imgWidReal!=imgWid||imgHgtReal!=imgHgt)){var eMsg="\u201C"+ImagesSSE[this.slideNum][0]+"\u201D has incorrect dimensions:\n1) All images must be sized to "+imgWid+" \u00D7 "+imgHgt+" pixels\n2) This image is "+imgWidReal+" \u00D7 "+imgHgtReal+" pixels";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 \u21D2 beach1.jpg";alert(eMsg);}
if(this.dissolve&&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=imgWid;TheImage.height=imgHgt;TheImage.src=Settings.folder+ImagesSSE[nOldImg][0];var Htm=new Array();Htm.push("<img name='slideShowNew' id='slideShowNew' onClick='SSE.next( event );' oncontextmenu='return SSE.reportImgName( this, event );' onMouseover='SSE.mouseOverImg( this );' onMousedown='return SSE.mouseDown();' class='ssImage' src='");Htm.push(Settings.folder+ImagesSSE[nNewImg][0]);Htm.push("' ");Htm.push("title='");Htm.push(TheImage.title);Htm.push("' style='");Htm.push("width:");Htm.push(SettingsSSE.Dimension[0]);Htm.push("px; height:");Htm.push(SettingsSSE.Dimension[1]);Htm.push("px;");if(SettingsSSE.borderWid){Htm.push(" border:");Htm.push(SettingsSSE.borderWid);Htm.push("px solid rgb( ");Htm.push(SettingsSSE.borderCol);Htm.push(" );");}
Htm.push("' />");var newImg=Htm.join("");if(!SSE.ImgOverlay){SSE.ImgOverlay=gEl("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";aCh(SSE.ImgOverlay);}
SSE.ImgOverlay.style.width=(SettingsSSE.Dimension[0]+2*SettingsSSE.borderWid)+"px";SSE.ImgOverlay.style.height=(SettingsSSE.Dimension[1]+2*SettingsSSE.borderWid)+"px";(IE)?SSE.ImgOverlay.style.visibility="hidden":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,Settings.transDur,0);}
else{if(this.ImgOverlay){rCh(this.ImgOverlay);this.ImgOverlay=null;}
TheImage.style.visibility="hidden";TheImage.width=imgWid;TheImage.height=imgHgt;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][1]*1000;this.slideNum++;if(this.slideNum==ImagesSSE.length)this.slideNum=0;this.NextImage=new Image();this.NextImage.onerror=this.skipErrantSlide;this.NextImage.src=Settings.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=false;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 start(firstImgDelay){startFade(gId("slideShowContainer"),0.8,0);this.repositionElements();setTimeout("try{ SSE.preLoadNext(); } catch( Err ){ }",firstImgDelay*1000);}
function switchSpeed(hiSpeed){this.speedActual=(hiSpeed)?this.SPEED_FAST:SettingsSSE.speed*1000;}
function mouseDown(){if(Settings.preventImageTheft){document.onmousemove=function(){return false;}
document.onmouseup=function(){return false;}
return false;}}
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=SettingsSSE.Dimension[0],hgt=SettingsSSE.Dimension[1];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='"+Settings.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 id='imgWidSSE'>"+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(Settings.preventImageTheft)?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=gId("fileSizeSSE");if(FileSizeSSE)FileSizeSSE.innerHTML=Math.round(fileSize)+" KB";}
else if(SSE.Request.status)alert("AJAX request error occurred at SSE.setFileSize\n\nStatus expected: 200 or 304\nStatus returned: "+SSE.Request.status);}}
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 writeSlideShow(){var style=(IE)?" visibility:hidden;":(MZ)?" opacity:.0;":(SF)?" opacity:.0;":"";slideShow="<div id='slideShowContainer' class='pfHide' style='margin:0px 0px 0px 75px; width:700px; height:300px;"+style+"'><img name='slideShow' onmousedown='SSE.imgClickHandler( event );' onContextMenu='return SSE.rightClick( this, event );' src='images/"+Images[SSE.nFirstSlide][0]+"' class='ssImage'></div>";document.write(slideShow);}