// Web software by DavidRegier.com
IE=false,AOL=false,SF=false,MZ=false;if(navigator.appName=="Microsoft Internet Explorer"){IE=true;if(navigator.userAgent.indexOf("AOL")>=0)AOL=true;}
else if(navigator.userAgent.indexOf("Safari")>=0)SF=true;else if(navigator.appName=="Netscape")MZ=true;winOS=(navigator.platform.substring(0,3)=="Win");winIE=(winOS&&IE);macOS=(navigator.platform.substring(0,3)=="Mac");macIE=(macOS&&IE);theHost=document.location.hostname;theHostLC=theHost.toLowerCase();local=(theHostLC.length==0||theHostLC=="127.0.0.1"||theHostLC=="localhost"),live=!local;qStr=unescape(document.location.search).substring(1);homePage="index.aspx"
path=document.location.pathname;delimeter=(path.indexOf("\\")>=0)?"\\":"/";if(path.charAt(path.length-1)==delimeter)path+=homePage;Path=path.split(delimeter);fileName=Path[Path.length-1];var bDoesTrans=(IE&&winOS)?true:false;function init(){try{var Links=document.links;for(var i=0;i<Links.length;i++){if(Links[i].href.indexOf("images/")>=0){Links[i].onmouseover=function(){this.title=Msg.enlarge;}
Links[i].firstChild.onmouseover=function(){imgHighlight(this,1);return true;}
Links[i].firstChild.onmouseout=function(){imgHighlight(this,0);return true;}}}}
catch(Err){var err="";for(member in Err)err+=member+": "+Err[member]+"; ";self.status="Exception init: "+err;eval("setTimeout( 'init()', 100 );");}}
function PreLoader(){this.Files=["index.aspx","about_maui.aspx","calendar.aspx","cal-data.js","calendar-driver.js","maps.aspx","inquire.aspx","inquire.js","images/blackrock25.jpg","images/project30.jpg","images/restaurant35.jpg","images/livroom25.jpg","images/bedroom25.jpg","images/dolphins15.jpg","images/iao15.jpg","images/windsurf15.jpg","images/falls16.jpg","images/crater15.jpg","images/lava15.jpg","images/kaanapali_rainbow15.jpg","images/puamana15.jpg","images/molokini30.jpg","images/harbor30.jpg","images/maui25.gif","images/street_map29.gif","images/golf_course60.jpg","images/maalaea50.jpg","images/inquire.gif",null];this.debug=0;if(this.debug)DeleteCookie("nFilesCached");this.Request=null;this.timer=0;this.nFilesCachedCookie=GetCookie("nFilesCached");this.nFilesCached=(this.nFilesCachedCookie)?parseInt(this.nFilesCachedCookie):0;this.run=run;this.getImages=getImages;this.nextImg=nextImg;this.getFileName=getFileName;if(this.debug)self.status="File preloader started...";function run(){if(!AOL&&!SF){if(window.XMLHttpRequest){try{this.Request=new XMLHttpRequest();}
catch(Err){this.Request=null;}}
else if(window.ActiveXObject){try{this.Request=new ActiveXObject("Msxml2.XMLHTTP");}
catch(Err){try{this.Request=new ActiveXObject("Microsoft.XMLHTTP");}
catch(Err){this.Request=null;}}}}
clearTimeout(PL.timer);if(this.Request){if(this.nFilesCached<this.Files.length-1){this.Request.onreadystatechange=function(){if(window.PL&&PL.Request.readyState==4){if(PL.Request.status==200){if(PL.debug)self.status=PL.getFileName()+" preloaded; #"+((PL.nFilesCached+1)+" of "+(PL.Files.length-1));}
else{if(PL.debug)alert("File preloader encountered an error retrieving: \n "+PL.getFileName()+"\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("PL.run();",100);}}
this.Request.open("GET",this.Files[this.nFilesCached],true);this.Request.send(null);}}
else{if(PL.debug)self.status="Browser does not support the HttpRequest Request Protocol";this.timer=setTimeout("PL.getImages();",100);}}
function getImages(){clearTimeout(PL.timer);if(this.nFilesCached<this.Files.length-1){var FileComponents=this.Files[this.nFilesCached].split(".");var fileExt=FileComponents[FileComponents.length-1].toLowerCase();if(fileExt=="jpg"||fileExt=="gif"){this.Img=document.createElement("div");document.body.appendChild(this.Img);this.Img.style.display="none";this.Img.innerHTML="<img src='"+this.Files[this.nFilesCached]+"' onload='PL.nextImg(1);' onerror='PL.nextImg(0);' onabort='PL.nextImg(0);'>";}
else{if(PL.debug)self.status=PL.getFileName()+" skipped, preloading images only; #"+((PL.nFilesCached+1)+" of "+(PL.Files.length-1));this.nFilesCached++;SetCookie("nFilesCached",this.nFilesCached);this.timer=setTimeout("PL.getImages();",100);}}}
function nextImg(success){if(PL.debug){if(success)self.status=PL.getFileName()+" image preloaded; #"+((PL.nFilesCached+1)+" of "+(PL.Files.length-1));else
alert("Image preloader encountered an error retrieving: \n1) "+PL.getFileName()+"\n 2) "+((PL.nFilesCached+1)+" of "+(PL.Files.length-1)));}
PL.nFilesCached++;SetCookie("nFilesCached",PL.nFilesCached);PL.timer=setTimeout("PL.getImages();",100);}
function getFileName(){var FileComponents=PL.Files[PL.nFilesCached].split("/");return FileComponents[FileComponents.length-1];}}
PL=new PreLoader();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,path,domain,secure){document.cookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");}
function DeleteCookie(name,path,domain){if(GetCookie(name)){document.cookie=name+"="+((path)?"; path="+path:"")+((domain)?"; domain="+domain:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}
var expdate=new Date();expdate.setTime(expdate.getTime()+(24*60*60*365*1000));function setRef(){try{var ref=document.referrer;if(qStr&&qStr.indexOf("ref=")==0)ref=qStr.split("ref=")[1];if(ref&&!GetCookie("deebRef"))SetCookie("deebRef",ref,null,"/");}
catch(Err){}}
function randompick(){return randompick.arguments[Math.floor(Math.random()*randompick.arguments.length)];}
function getTransition(transNum,duration){var trans="";if(winIE){var d=duration;if(parseFloat(navigator.userAgent.split("MSIE")[1])>=5.5){var thisTrans=(transNum==1)?Math.floor(Math.random()*17)+2:transNum;switch(thisTrans){case 2:trans="Fade(duration="+d+",overlap=1)";break;case 3:trans="Blinds(duration="+d+",bands="+randompick(2,4,6,8)+",direction="+randompick('up','down','right','left')+")";break;case 4:trans="CheckerBoard(duration="+d+",squaresX="+randompick(2,4,8,12)+",squaresY="+randompick(2,4,8,12)+",direction="+randompick('up','down','right','left')+")";break;case 5:trans="Barn(duration="+d+",motion="+randompick('in','out')+",orientation=",randompick('horizontal','vertical')+")";break;case 6:trans="GradientWipe(duration="+d+",gradientSize="+randompick(0,0.1,0.3,0.5,0.7,0.9,1)+",wipeStyle="+randompick(0,1)+",motion="+randompick('forward','reverse')+")";break;case 7:trans="Inset(duration="+d+")";break;case 8:trans="Iris(duration="+d+",irisStyle="+randompick('DIAMOND','CIRCLE','CROSS','PLUS','SQUARE','STAR')+",motion="+randompick('in','out')+")";break;case 9:trans="RadialWipe(duration="+d+",wipeStyle="+randompick('CLOCK','WEDGE','RADIAL')+")";break;case 10:trans="RandomBars(duration="+d+",orientation="+randompick('horizontal','vertical')+")";break;case 11:trans="RandomBars(duration="+d+")";break;case 12:trans="Slide(duration="+d+",pushStyle="+randompick('HIDE','PUSH','SWAP')+",bands="+randompick(1,2,3,4,5,6,7)+")";break;case 13:trans="Spiral(duration="+d+",gridSizeX="+randompick(8,16,32,64)+",gridSizeY="+randompick(8,16,32,64)+")";break;case 14:trans="Stretch(duration="+d+",stretchStyle="+randompick('HIDE','PUSH','SPIN')+")";break;case 15:trans="Strips(duration="+d+",motion="+randompick('leftdown','leftup','rightdown','rightup')+")";break;case 16:trans="Wheel(duration="+d+",spokes="+randompick(2,4,10,16,20)+")";break;case 17:trans="Zigzag(duration="+d+",gridSizeX="+randompick(8,16,32,64)+",gridSizeY="+randompick(8,16,32,64)+")";break;case 18:trans="RandomDissolve(duration="+d+")";break;default:alert("SWITCH/CASE ERROR: Case caught by default handler in \"getTransition\"");}
trans="progid:DXImageTransform.Microsoft."+trans;}
else{switch(transNum){case 2:trans="blendTrans(duration="+d+")";break;default:trans="revealTrans(duration="+d+",transition="+Math.floor(Math.random()*23)+")";}}}
return trans;}
function getRGB(abbrev){var rgb=abbrev;switch(abbrev){case "b":rgb="0,0,0";break;case "w":rgb="255,255,255";break;}
var reRGB=/^\d{1,3},\d{1,3},\d{1,3}$/,badRGB=false;if( !reRGB.test(rgb))badRGB=true;else{var Channels=rgb.split(",");for(var i=0;i<3;i++)if(parseInt(Channels[i])>255)badRGB=true;}
if(badRGB){if(local)alert("ERROR: Bad RGB value \""+rgb+"\"");rgb="255,255,255";}
return rgb;}
function getOpacity(dissolveSF,dissolveMZ){var opac="";if(winIE)opac="visibility:hidden;";else if(MZ&&dissolveMZ)opac="-moz-opacity:0;"
else if(SF&&dissolveSF)opac="opacity:0;"
return opac;}
function startFade(FadeInPhoto,transNum,transDur,transDelay,dissolveSF,dissolveMZ){window.FadeInPhoto=FadeInPhoto;window.transNum=transNum;window.transDur=transDur;window.transDelay=transDelay;if(winIE)setTimeout("fadeInDirectX()",transDelay);else if((MZ&&dissolveMZ)||(SF&&dissolveSF)){FadeInPhoto.onload=function(){};(transDelay)?setTimeout("fadeIn( FadeInPhoto )",transDelay):fadeIn(FadeInPhoto);}
else{if(SF)FadeInPhoto.style.opacity=1.0;else FadeInPhoto.style.visibility="visible";}}
function fadeInDirectX(){try{FadeInPhoto.style.filter=getTransition(transNum,transDur);FadeInPhoto.filters(0).apply();FadeInPhoto.style.visibility="visible";FadeInPhoto.filters(0).play();}
catch(Err){if(local){var eMsg="Exception Caught in fadeInDirectX function:\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";alert(eMsg);}
FadeInPhoto.style.visibility="visible";}}
GuiObj=null,fadeOpacity=0,fadeOpacityTimer=0;function fadeIn(GuiObj){if(MZ)GuiObj.style.MozOpacity=fadeOpacity;else GuiObj.style.opacity=fadeOpacity;this.fadeOpacity+=.05;if(fadeOpacity<1){window.GuiObj=GuiObj;fadeOpacityTimer=setTimeout("fadeIn( GuiObj )",40);}
else{if(MZ)GuiObj.style.MozOpacity=0.9999;else GuiObj.style.opacity=0.9999;clearTimeout(fadeOpacityTimer);GuiObj=null;fadeOpacity=0;fadeOpacityTimer=0;}}
function dissolveDirectX(OldPhoto,newPhotoSrc,borderWid,borderCol,transNum,transDur){try{OldPhoto.style.filter=getTransition(transNum,transDur);OldPhoto.filters(0).apply();OldPhoto.src=newPhotoSrc;if(borderWid)OldPhoto.style.borderColor="rgb( "+getRGB(borderCol)+" )";OldPhoto.filters(0).play();}
catch(Err){if(local){var eMsg="Exception Caught in dissolveDirectX function:\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";alert(eMsg);}
OldPhoto.src=newPhotoSrc;if(borderWid)OldPhoto.style.borderColor="rgb( "+getRGB(borderCol)+" )";}}
function directX(OldPhoto,newPhotoSrc,borderWid,borderCol,transNum,transDur){try{OldPhoto.parentNode.style.filter=getTransition(transNum,transDur);OldPhoto.parentNode.filters(0).apply();OldPhoto.src=newPhotoSrc;if(borderWid)OldPhoto.style.borderColor="rgb( "+getRGB(borderCol)+" )";OldPhoto.parentNode.filters(0).play();}
catch(Err){if(local){var eMsg="Exception Caught in directX function:\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";alert(eMsg);}
OldPhoto.src=newPhotoSrc;if(borderWid)OldPhoto.style.borderColor="rgb( "+getRGB(borderCol)+" )";}}
function imgHighlight(Img,on){Img.className=(on)?"borderOn":"borderOff";}
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 replaceLiteral(target,replacement){return this.split(target).join(replacement);}
function getObj(theObj){var obj=(document.getElementById)?document.getElementById(theObj):eval(theObj);return obj;}
var Msg=new Array();Msg.enlarge="Click to enlarge";Msg.vTour="Take our \"Java\" powered virutal tour";Msg.inquire="Get our rates & submit a rental inquiry";function getEmailLink(lnkText,subject,message){lnkText=lnkText.slice(lnkText.indexOf("=")+1);subject=escape(subject.slice(subject.indexOf("=")+1));message=escape(message.slice(message.indexOf("=")+1));return "<a href='mailto:"+DB.Contact.OwnerEmail+"?subject="+subject+"&body="+message+"' onClick='if( confirm( \"STOP: Read this so that your e-mail is correctly routed...\\n\\n1) If this is your first time contacting us, and you are making an initial inquiry, click Cancel and you will be redirected to our inquiry form.\\n2) Otherwise click OK to send an ordinary e-mail...\" ) )  return true; else { document.location.href=\"inquire.aspx\"; return false; }' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title='Send us an e-mail'>"+lnkText+"</a>";}
function PopUp(){this.winName="deebWin";this.Win=null;this.openWin=openWin;this.closeWin=closeWin;this.linkToWin=linkToWin;function openWin(url,tBar,lBar,sBar,mBar,wWid,wHgt,scBar,reSize,wPos){var nArgs=arguments.length;if(nArgs==2||nArgs==10){if(nArgs==2){switch(tBar){case 1:tBar=1;lBar=1;sBar=1;mBar=1;wWid=.8;wHgt=.6;scBar=1;reSize=1;wPos=1;break;case 2:tBar=0;lBar=0;sBar=1;mBar=0;wWid=.7;wHgt=.5;scBar=1;reSize=1;wPos=1;break;case 3:tBar=0;lBar=0;sBar=1;mBar=0;wWid=1;wHgt=1;scBar=1;reSize=1;wPos=1;break;}}
this.closeWin();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);}
else
alert("ERROR: "+nArgs+" arguments have been passed to method \"PopUp.openWin\", it accepts either 2 or 10 arguments.");}
function closeWin(){try{if(this.Win&&this.Win.open&&!this.Win.closed){this.Win.close();this.Win=null;}}
catch(e){}}
function linkToWin(){if(PopUp&&PopUp.Win&&PopUp.Win.registered)PopUp.Win.myOpener=self;else setTimeout("PopUp.linkToWin()",250);}}
PopUp=new PopUp();function vTour(){if(macIE)document.location.href="http://www.realpropertyvr.com/RealPropertyVR/pano.asp?id=116";else
PopUp.openWin("http://www.realpropertyvr.com/RealPropertyVR/pano.asp?id=116",0,0,0,0,620,300,0,1,2);return false;}
function setButton(Button,command,buttonVal){switch(command){case "enable":Button.value=buttonVal;Button.disabled=false;break;case "disable":Button.value="Please Wait...";Button.disabled=true;break;}}
function showHawaiiTime(){var gmtOffset=10;var now=new Date();var difhrs=now.getTimezoneOffset()/60;var lochrs=now.getHours();GMThours=lochrs+difhrs;now.setHours(GMThours-gmtOffset);var am_pm="AM";var hours=now.getHours();if(hours>=12)am_pm="PM";if(hours>=13)hours-=12;if(hours==0)hours="12";var minutes=now.getMinutes();if(minutes<10)minutes="0"+minutes;var seconds=now.getSeconds();if(seconds<10)seconds="0"+seconds;try{document.getElementById("hawaii_time").innerHTML=hours+":"+minutes+":"+seconds+" "+am_pm;}
catch(Err){}
finally{setTimeout("showHawaiiTime()",1000);}}
function largePic(cap,img,wid,hgt,Link,evt){if(window.DW){DW.createWindow([cap,"imgSrc=images/"+img],[0,wid,hgt],Link,evt);return false;}
else
return true;}
function DynamicWindow(transNum,transDur){this.dissolveMZ=1;this.dissolveSF=1;this.gDisableContextImgMenu=false;this.ContactUs=["Maui ElDorado #D-105","<div><table align='center' border='0' cellspacing='0' cellpadding='0'><tr><td align='right'><div style='margin:0px 0px 0px 0px;' class='fSize10 fColorGray102 noWrap'>OWNERS:</div></td><td><div style='margin:0px 0px 0px 6px;'>"+DB.Contact.OwnerName+"</div></td></tr><tr><td align='right' valign='top'><div style='margin:4px 0px 0px 0px;' class='fSize10 fColorGray102 noWrap'>ADDRESS:</div></td><td valign='top'><div style='margin:4px 0px 0px 6px;'>"+DB.Contact.Street+"<br>"+DB.Contact.CityStZip+"</div></td></tr><tr><td align='right'><div style='margin:4px 0px 0px 0px;' class='fSize10 fColorGray102 noWrap'>TEL:</div></td><td><div style='margin:4px 0px 0px 6px;'>"+DB.Contact.Tel+"</div></td></tr><tr><td align='right'><div style='margin:4px 0px 0px 0px;' class='fSize10 fColorGray102 noWrap'>FAX:</div></td><td><div style='margin:4px 0px 0px 6px;'>"+DB.Contact.Fax+"</div></td></tr><tr><td align='right'><div style='margin:4px 0px 0px 0px;' class='fSize10 fColorGray102 noWrap'>MAUI TIME:</div></td><td><div style='margin:4px 0px 0px 6px;'><span id='hawaii_time'></span></div></td></tr><tr><td align='right'><div style='margin:4px 0px 0px 0px;' class='fSize10 fColorGray102 noWrap'>CONTACT US:</div></td><td><div style='margin:4px 0px 0px 6px;'><a href='inquire.aspx' onMouseOver='this.title=Msg.inquire; self.status=Msg.inquire; return true;' onMouseOut='self.status=\"\"; return true;' target='_top'>Get Rates & Submit Inquiry</a></div></td></tr><tr><td align='right'><div style='margin:4px 0px 0px 0px;' class='fSize10 fColorGray102 noWrap'>E-MAIL:</div></td><td><div style='margin:4px 0px 0px 6px;'>"+getEmailLink("LinkText=Send e-mail","Subject=Maui Eldorado Web Site E-Mail","Message=")+"</div></td></tr></table></div>"];this.Msg=new Array();this.Msg["fullSize"]="View this image full-size";this.dissolveMZ=1;this.dissolveSF=1;this.gDisableContextImgMenu=false;this.Msg=new Array();this.Msg["fullSize"]="View this image full-size";this.transNum=(transNum)?transNum:2;this.transDur=(transDur)?transDur:0.8;this.dWinOffsetX=0;this.dWinOffsetY=0;this.Window=null;this.overTitleBar=false;this.Photo=null;this.disableContextImgMenu=false;this.createWindow=createWindow;this.showImg=showImg;this.keepInWin=keepInWin;this.getClickPosition=getClickPosition;this.getIeBody=getIeBody;this.getData=getData;this.mouseDown=mouseDown;this.mouseMove=mouseMove;this.removeWin=removeWin;this.mouseUp=mouseUp;this.dissolve=dissolve;document.onmousedown=this.mouseDown;document.onmousemove=this.mouseMove;document.onmouseup=this.mouseUp;function createWindow(dataSrc,WinDim,TheLink,theEvent,bodyMargin,RequestedPos,disableContextImgMenu){if(TheLink)TheLink.blur();if(!bodyMargin)bodyMargin=0;this.disableContextImgMenu=(typeof disableContextImgMenu=="boolean")?disableContextImgMenu:this.gDisableContextImgMenu;var Data=getData(dataSrc,TheLink),title,body;title=Data[0].replace(/\^\^/g, "'" );
title=title.replace(/\^/g, "\"" );
body=Data[1].replace(/\^\^/g, "'" );
body=body.replace(/\^/g, "\"" );
var showImg=(body.indexOf("imgSrc=")==0);var scrollStyle=(WinDim[0])?" overflow:auto;":"";var winWid=WinDim[1];var winHgt=WinDim[2];var clickPos=(RequestedPos)?(RequestedPos[0]==1):true;var aboveClkPos=(RequestedPos)?(RequestedPos[0]==2):false;var topCent=(RequestedPos)?(RequestedPos[0]==3):false;var center=(RequestedPos)?(RequestedPos[0]==4):false;var botCent=(RequestedPos)?(RequestedPos[0]==5):false;var xOffset=(RequestedPos)?RequestedPos[1]:10;var yOffset=(RequestedPos)?RequestedPos[2]:10;if(showImg){var mzDissolve=(MZ&&this.dissolveMZ&&this.dissolve(winWid,winHgt));var sfDissolve=(SF&&this.dissolveSF);var body="<img src='"+body.split("imgSrc=")[1]+"' width='"+winWid+"' height='"+winHgt+"' border='0' hspace='0' vspace='0' galleryimg='no' style='"+getOpacity(sfDissolve,mzDissolve)+"' onload='DW.showImg( this );' onAbort='this.src=this.src;'"+">";this.title=title;var titleLC=title.toLowerCase(),lineBrks="";var nLinesInTitle=titleLC.split("<br>").length;for(var i=0;i<nLinesInTitle;i++)lineBrks+="<br>";title="Loading Image..."+lineBrks;}
var Window=document.getElementById("dWinID");if(Window)document.body.removeChild(Window);var NewWindow=document.createElement("DIV"),scrollSt,bodyHgtSt;bodyHgtStyle=(winHgt)?" height:"+winHgt+"px;":"";NewWindow.id="dWinID";NewWindow.className="dwWin";document.body.appendChild(NewWindow);NewWindow.style.visibility="hidden"
NewWindow.style.position="absolute";NewWindow.style.width=(IE)?(winWid+2*parseInt(NewWindow.currentStyle["borderWidth"]))+"px":winWid+"px";NewWindow.style.top=(screen.height*-1)+"px";NewWindow.style.left=(screen.width*-1)+"px";NewWindow.style.zIndex=10000;var myWindow="<div class='dwTitleRow' id='dwTitleRowID'><table align='center' border='0' cellspacing='0' cellpadding='0'><tr><td class='dwTitle' style='width:100%; text-align:center;' onmouseover='DW.overTitleBar=true; if( macIE ) style.cursor=\"text\";' onmouseout='DW.overTitleBar=false;' id='dwTitleTd1ID'><div id='dwTitleBarID'>"+title+"</div></td><td valign='top' id='dwTitleTd2ID'><a href='javascript:DW.removeWin();' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' onClick='this.blur(); return true;' title='Close this pop-up window' class='dwX' style='font-size:"+((macIE)?100:130)+"%;'>&times;</a></td></tr></table></div><div class='"+((showImg)?"dwBodyParentImg":"dwBodyParent")+"' style='width:100%;"+bodyHgtStyle+scrollStyle+"'><div class='dwBody' id='dwBodyID' style='margin:"+bodyMargin+"px;'>"+body+"</div></div>";NewWindow.innerHTML=myWindow;var xPos,yPos;if(clickPos||aboveClkPos){var ClickPos=getClickPosition(theEvent);xPos=ClickPos[0]+xOffset;if(clickPos)yPos=ClickPos[1]+yOffset;else
yPos=ClickPos[1]-NewWindow.offsetHeight+yOffset;var center=(document.body.clientWidth)?document.body.clientWidth/2:window.innerWidth/2;if(xPos>center)xPos-=(NewWindow.offsetWidth+2*xOffset);}
else if(topCent||center||botCent){var IeBody,scrollX,scrollY,bodyWid,bodyHgt;if(IE){IeBody=getIeBody();scrollX=IeBody.scrollLeft;scrollY=IeBody.scrollTop;bodyWid=IeBody.clientWidth;bodyHgt=IeBody.clientHeight;}
else{scrollX=window.pageXOffset;scrollY=window.pageYOffset;bodyWid=window.innerWidth;bodyHgt=window.innerHeight;}
winHgt=NewWindow.offsetHeight;winWid=NewWindow.offsetWidth;xPos=parseInt((bodyWid-winWid)/2+scrollX+xOffset);if(topCent)yPos=parseInt(scrollY+yOffset);else if(center)yPos=parseInt((bodyHgt-winHgt)/2+scrollY+yOffset);else yPos=parseInt(bodyHgt-winHgt+scrollY+yOffset);}
var NewWindowPos=keepInWin(NewWindow,xPos,yPos);xPos=NewWindowPos[0];yPos=NewWindowPos[1];NewWindow.style.left=xPos+"px";NewWindow.style.top=yPos+"px";NewWindow.style.visibility="visible";}
function showImg(Photo){Photo.onclick=DW.removeWin;Photo.oncontextmenu=function(){if(DW.disableContextImgMenu)return false;};Photo.onmouseover=function(){Photo.title="Click to close this pop-up window";self.status=Photo.title;Photo.style.cursor=(IE)?"hand":"pointer";return true;};Photo.onmouseout=function(){self.status="";return true;};if(local){var imgNum=-1;for(var i=0;i<document.images.length;i++){if(document.images[i]==Photo){imgNum=i;break;}}
var ImgReal=new Image();ImgReal.src=eval("document.images["+imgNum+"].src;");if(ImgReal.complete){var realWid=ImgReal.width,realHgt=ImgReal.height;if(realWid>1&&realHgt>1&&(realWid!=Photo.width||realHgt!=Photo.height))alert(ImgReal.src+" has incorrect dimensions set: \n\n  1) "+Photo.width+" x "+Photo.height+" are the errant values \n  2) "+realWid+" x "+realHgt+" are the true values");}}
document.getElementById("dwTitleBarID").innerHTML=this.title;var mzDissolve=(MZ&&this.dissolveMZ&&this.dissolve(Photo.width,Photo.height));var sfDissolve=(SF&&this.dissolveSF);startFade(Photo,this.transNum,this.transDur,0,sfDissolve,mzDissolve);}
function keepInWin(NewWindow,leftEdge,topEdge){if(IE)var IeBody=getIeBody();var bodyHgt=(IE)?IeBody.clientHeight:window.innerHeight;var bodyWid=(IE)?IeBody.clientWidth:window.innerWidth;var winHgt=NewWindow.offsetHeight;var yOffset=(IE)?IeBody.scrollTop:window.pageYOffset;var vScreenPos=topEdge-yOffset;var vSkew=bodyHgt-vScreenPos;if(vSkew<winHgt+10)topEdge-=winHgt-vSkew+10;else if(vScreenPos<10)topEdge=10+yOffset;var winWid=NewWindow.offsetWidth;var xOffset=(IE)?IeBody.scrollLeft:window.pageXOffset;var hScreenPos=leftEdge-xOffset;var hSkew=bodyWid-hScreenPos;if(hSkew<winWid+10){leftEdge-=winWid-hSkew+10;if(!IE&&document.body.scrollHeight>bodyHgt)leftEdge-=15;}
else if(hScreenPos<10)leftEdge=10+xOffset;return[leftEdge,topEdge];}
function getIeBody(){var ieCSS=(document.compatMode)?document.compatMode=="CSS1Compat":false;return(ieCSS)?document.documentElement:document.body;}
function getClickPosition(theEvent){try{if(IE)IeBody=getIeBody();var x=(IE)?event.clientX+IeBody.scrollLeft:theEvent.pageX;var y=(IE)?event.clientY+IeBody.scrollTop: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&&!macIE){this.Window=document.getElementById("dWinID");if(IE){this.dWinOffsetX=event.offsetX;this.dWinOffsetY=event.offsetY;}
else{this.dWinOffsetX=e.layerX;this.dWinOffsetY=e.layerY;return false;}}}
function mouseMove(e){if(this.Window){var ClickPos=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+document.body.scrollLeft;this.Window.style.top=event.clientY-this.dWinOffsetY+document.body.scrollTop;return false;}
else{this.Window.style.top=e.pageY-this.dWinOffsetY;this.Window.style.left=e.pageX-this.dWinOffsetX;}}}
function removeWin(){var Window=document.getElementById("dWinID");if(Window){Window.innerHTML="";document.body.removeChild(Window);}}
function mouseUp(){this.Window=null;}
function dissolve(wid,hgt){var imgArea=wid*hgt;var maxImgArea=450*450;return(imgArea<=maxImgArea);}}
function FileWriter(){if(!GetCookie("userHasWritePrivleges"))return;this.help=help;this.restore=restore;this.init=init;this.checkContent=checkContent;this.enableResetBtn=enableResetBtn;this.resetUI=resetUI;this.reLoad=reLoad;this.logOff=logOff;this.init();function help(nType,Link,evt){function getHelpTxt(helpType){var htm="<dl><dt class='fw'>Reload & Cache</dt><dd class='fw'><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 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 cached version of that page and not the most recent version which you just published. Instead, you are viewing a \"ghost from the past.\"<br><br><u>Here's a cure to all your cache problems</u>: After you press Publish, & once the page loads, don't evaluate it just yet - better yet, immediately go down to the Reload button (next to Publish) & press it. Now, after this full reload, where you can be sure cache is not an issue, you may evaluate the page to make sure it looks as you were expecting.<br><br><u>Remember this mantra</u> to eliminate cache frustrations forever:<br>&nbsp;&nbsp;Just Published but don't see your changes? Then press Reload</dd><dt class='fw'>Publish "+((helpType=='htm')?"HTML":"Data")+"</dt><dd class='fw'>Press Publish-"+((helpType=='htm')?"HTML":"Data")+" 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=='htm')htm+=" Need help with your HTML skills? Try <a href='javascript:PopUp.openWin( \"http://www.DavidRegier.com/lesson.aspx\", 1 );' class='noWrap'>David's Tutorial</a> & <a href='javascript:PopUp.openWin( \"http://www.w3schools.com/html/html_primary.asp\", 1 );' class='noWrap'>W3schools.com</a>";htm+="</dd><dt class='fw'>Reset</dt><dd class='fw'>Press Reset if you made edit(s) but then changed your mind or you just want to start over! The content in the text-box will revert back to original start-up values since you last published.</dd><dt class='fw'>Restore</dt><dd class='fw'>Restore is the ultimate \"safety net\" and more powerful that Reset because it let's you go back to an earlier date & time. If you made a serious mistake, which you only realized after publishing, then restore is the solution. Before you consider using restore, please understand that you will lose the current working file as you will be reverting to an earlier time - so don't try this casually!<div align='center' style='margin:4px 0px 0px 0px;'><form>";if(helpType=='htm'){var BackUpHTM=document.AspForm.BackUpHTM;htm+="<input type='button' value='Restore To:' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' onClick='return FW.restore( \"RestoreHTM\" );' title='Restore this file to a prior selected time' />&nbsp;&nbsp;";htm+="<select onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title='Select a prior restore point' onChange='document.AspForm.BackUpHTM.selectedIndex=this.selectedIndex;'>";for(var i=0;i<BackUpHTM.length;i++)htm+="<option value='"+BackUpHTM[i].value+"'>"+BackUpHTM[i].text+"</option>";htm+="</select>";}
else{var BackUpData=document.AspForm.BackUpData;htm+="<input type='button' value='Restore To:' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' onClick='return FW.restore( \"RestoreData\" );' title='Restore this file to a prior selected time' />&nbsp;&nbsp;";htm+="<select onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title='Select a prior restore point' onChange='document.AspForm.BackUpData.selectedIndex=this.selectedIndex;'>";for(var i=0;i<BackUpData.length;i++)htm+="<option value='"+BackUpData[i].value+"'>"+BackUpData[i].text+"</option>";htm+="</select>";}
htm+="</form></div><ol style='margin-top:4px; margin-bottom:4px;'><li style='margin-left:-10px;'>Select a restore date. They will be listed & numbered with the most recent at the top. Remember that the dates & times showing are from your server's time zone, not yours.</li><li style='margin-left:-10px;'>If you don't know which date to select then try the immediate prior backup. It will be already selected for you (#1 at the top). Press Restore to revert 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, try a reload first before doing another restore.</li></ol></dd></dl>";return htm;}
var DataSrc=(nType==1)?["Help with Publishing HTML",getHelpTxt('htm')]:["Help with Publishing Data",getHelpTxt('data')];if(window.DW)DW.createWindow(DataSrc,[1,550,250],Link,evt,6,[2,-275,-15]);}
function restore(aspJob){var Form=document.AspForm;var eMsg="No action taken: There are no restore dates...";if(aspJob=="RestoreHTM"&&Form.BackUpHTM[Form.BackUpHTM.selectedIndex].value==""||aspJob=="RestoreData"&&Form.BackUpData[Form.BackUpData.selectedIndex].value==""){alert(eMsg);return false;}
Form.ASP_Job.value=aspJob;Form.submit();}
function init(){try{document.getElementById("htmTitle").innerHTML="HTML CONTENT FOR THIS PAGE<div class='fSize9'>TIP: Use 2 HTML line-break tags create a new paragraph: &lt;br&gt;&lt;br&gt;</div>";document.getElementById("dataTitle").innerHTML="DATA FILE<div class='fSize9'>TIP: Need to use a double quote within a text string? Then \\\"escape\\\" it.</div>";var help="Learn about Reload, Publish, Reset & Restore";var justPub="Refresh page to override cached (old) version";document.getElementById("EditedHtml").title="Edit text then press \"Publish HTML\"";document.getElementById("helpHTM").title=help;document.getElementById("reloadHTM").title=justPub;document.getElementById("publishHTM").title="Write HTML to file";document.getElementById("resetHTM").title="Revert HTML back to original values since you last published";document.getElementById("EditedData").title="Edit data then press \"Publish Data\"";document.getElementById("helpData").title=help;document.getElementById("reloadData").title=justPub;document.getElementById("publishData").title="Write Data to file";document.getElementById("resetData").title="Revert Data back to original values since you last published";var htm="<div style='margin:10px 0px 0px 0px;'><a href='javascript:FW.logOff();' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title='Log off as administrator'>Log Out</a>&nbsp;&nbsp;&#149;&nbsp;&nbsp;<a href='javascript:PopUp.openWin( \"uploader.aspx\", 0, 0, 1, 0, 600, 200, 1, 1, 1 );' onMouseOver='self.status=this.title; return true;' onMouseOut='self.status=\"\"; return true;' title='Upload files to the server'>File-Uploader</a></div>";document.getElementById("fwBottomRow").innerHTML=htm;}
catch(e){setTimeout("FW.init();",250);self.status="Initializing File Writer...";}}
function checkContent(htmForm,leftClick){var Form=document.AspForm;var EditedHtml=Form.EditedHtml;var EditedData=Form.EditedData;if(htmForm){if(leftClick&&EditedHtml.value==EditedHtml.defaultValue){alert("Edit the text then press Publish HTML...");EditedHtml.focus();return false;}
else{setButton(Form.ButPublishHTML,"disable","Publish HTML");Form.Which_Button.value="html";}}
else{if(leftClick&&EditedData.value==EditedData.defaultValue){alert("Edit the data then press Publish Data...");EditedData.focus();return false;}
else{try{eval(EditedData.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;}
setButton(Form.ButPublishData,"disable","Publish Data");Form.Which_Button.value="data";}}
Form.ASP_Job.value="File_Writer";Form.submit();return(leftClick)?true:false;}
function enableResetBtn(butID){document.getElementById(butID).disabled=false;}
function resetUI(TextBox,Button){eval("document.AspForm."+TextBox+".value = document.AspForm."+TextBox+".defaultValue;");Button.disabled=true;}
function reLoad(){document.location.reload(true);}
function logOff(){var url="";if(qStr){if(qStr.indexOf("user=")>=0){var userValOld=qStr.getVal("user");var qStrNew=qStr+"&end";qStrNew=qStrNew.split("user="+userValOld).join("user=logoff");url=fileName+"?"+qStrNew;}
else
url=fileName+"?"+qStr+"&user=logoff";}
else
url=fileName+"?user=logoff";document.location.replace(url);}}
function ColExpIndex(){this.msg=new Array();this.msg["show"]="Click to show content";this.msg["hide"]="Click to hide content";this.toggleLink=new Array();this.toggleLink["show"]=["Show All Answers","Show (expose) all answers on page"];this.toggleLink["hide"]=["Hide All Answers","Hide (collapse) all answers on page"];this.getPlusMinus=getPlusMinus;this.switchDisplay=switchDisplay;this.showTip=showTip;this.toggleAll=toggleAll;this.getToggleAllLink=getToggleAllLink;this.reloadPhotos=reloadPhotos;function getPlusMinus(Link){return Link.parentNode.firstChild;}
function switchDisplay(Link){var PlusMinus=getPlusMinus(Link);var turnOn=(PlusMinus.innerHTML=="+");var Content=(Link.parentNode.nextSibling.style)?Link.parentNode.nextSibling:Link.parentNode.nextSibling.nextSibling;if(turnOn){PlusMinus.innerHTML="-";var focuserID=new Date().getTime();var focuser="<A HREF='javascript:void( 0 );' ID='focuser"+focuserID+"'>&nbsp;</A>";Content.innerHTML=focuser+Content.innerHTML;Content.style.display="block";var Focuser=document.getElementById("focuser"+focuserID);if(Focuser){if(Focuser.focus){Focuser.focus();Link.focus();}
Focuser.style.display="none";}
setTimeout("CE.reloadPhotos()",10);}
else{PlusMinus.innerHTML="+";Content.style.display="none";}
showTip(Link);}
function reloadPhotos(){var Photos=document.images;for(var i=0;i<Photos.length;i++)Photos[i].src=Photos[i].src;}
function showTip(Link){var PlusMinus=getPlusMinus(Link);if(PlusMinus.innerHTML=="+"){Link.title=CE.msg.show;self.status=CE.msg.show;}
else{Link.title=CE.msg.hide;self.status=CE.msg.hide;}}
function toggleAll(Link){var divElements=document.getElementsByTagName("span");var showAll=(Link.innerHTML==CE.toggleLink.show[0])?true:false;for(var i=0;i<divElements.length;i++){if(divElements[i].className=="cePlusMinus"){var TheLink=divElements[i].parentNode.firstChild;if(showAll){if(divElements[i].innerHTML=="+")switchDisplay(TheLink);}
else{if(divElements[i].innerHTML=="-")switchDisplay(TheLink);}}}
if(showAll){Link.innerHTML=CE.toggleLink.hide[0];Link.title=CE.toggleLink.hide[1];Link.focus();window.scrollBy(0,10);}
else{Link.innerHTML=CE.toggleLink.show[0];Link.title=CE.toggleLink.show[1];Link.focus();}}
function getToggleAllLink(){return "<A HREF='javascript:void( 0 );' onClick='CE.toggleAll( this ); return false;' onMouseover='self.status=this.title; return true;' onMouseout='self.status=\"\"; return true;' TITLE='"+CE.toggleLink.show[1]+"'>"+CE.toggleLink.show[0]+"</A>";}}