var gaButtons=new Array(); var gaTypes=new Array(); var gaBtnBgColor=new Array(); var gaSelBtnBgColor=new Array(); var gaOrders=null; var gaObjBtns=new Array(); var BTN_TEXT=1; var BTN_IMG=2; var BTN_IMG_TOP=4 var BTN_IMG_BOTTOM=8; var BTN_IMG_LEFT=16; var BTN_IMG_RIGHT=32; var gsAlign="left"; var gsBgImage=""; var gsBgColor="#99ccff"; var gsShadow="#cccccc"; var gsTBBgImage=""; var gnShowHideStyle=0; var goTocInfo=null; var gbTocInfoInited=false; var goWebSearch=null; var gsTBFontFamily="Arial"; var gsTBFontSize="xx-small"; var gsTBFontColor="#003063"; var gsTBDarkColor="#808080"; var gsTBLightColor="#FFFAFA"; var gsTBSelectedBgColor="#639ace"; var gsTBFontSelectedColor="#ffffff"; var gaOnLoads=new Array(); var goWebSearchEnable=true; var goShow=null; var goHide=null; var goHide2=null; var goSync=null; var goToc=null; var goIdx=null; var goFts=null; var goGlo=null; var goNext=null; var goPrev=null; var LAYOUT=1; var HLAYOUT=0; var VLAYOUT=1; var ALIGN=2; var BALIGN=0; var EALIGN=2; var goEl=null; var gnRE=0; var gnButtonLayout=0; var gnShowHide=-1; var gbEqualSize=false; var goCusButton=new Array(); var gsBtnStyle=""; var gaAvenues=null; var gsCurAveName=""; var gsIToc=null; var gsITocS=null; var gsIIndex=null; var gsIIndexS=null; var gsISearch=null; var gsISearchS=null; var gsIGlossary=null; var gsIGlossaryS=null; var gsIBanner=null; var gsIGo=null; var gsIHide=null; var gsIPrev=null; var gsINext=null; var gsISync=null; var gsINextD=null; var gsIPrevD=null; var gsIWebSearch=null; var gsIWebSearchD=null; var gbAveButttnInited=false; var goNextParent=null; var goPrevParent=null; var gsSearchPrompt="- Search -"; var gstrSearch=""; var gbPreview=false; gbPreview=false; var gsSearchFormTitle=""; var gnHasNavPane=-1; var gbInitBtn=false; var gaBtns=new Array(); var gbWhTBar=false; var goTextFont=null; var goSelTextFont=null; var gsPane=""; var gbNeedUpdateAve=false; var gbUpdateTimerCount=0; function setGoImage(sGoImage) { if(sGoImage) { gsIGo=sGoImage; } } function btnBgColor(sType,sColor) { this.sType=sType; this.sColor=sColor; } function setBackground(sBgImage) { gsBgImage=sBgImage; } function setBackgroundcolor(sBgColor) { gsBgColor=sBgColor; } function setAlignment(strAlignment) { gnButtonLayout=0; if(strAlignment=="left") { gnButtonLayout=HLAYOUT|BALIGN; } else if(strAlignment=="right") { gnButtonLayout=HLAYOUT|EALIGN; } else if(strAlignment=="top") { gnButtonLayout=VLAYOUT|BALIGN; } else if(strAlignment=="bottom") { gnButtonLayout=VLAYOUT|EALIGN; } } function writeStyle(bMiniBar) { var sStyle=""; sStyle+="\n"; document.write(sStyle); } function button(sType,sText,nWidth,nHeight) { this.sType=sType; this.sText=sText; this.nWidth=nWidth; this.nHeight=nHeight; this.aIs=new Array(); var i=0; while(button.arguments.length>i+4) { if (button.arguments[4+i]) this.aIs[i]=_getFullPath(_getPath(document.location.href),button.arguments[4+i]); else this.aIs[i]=""; i++; } } function getImage(oImage,sTitle) { if(oImage.aIs[0]) { var sI=""; if(sTitle=="") sTitle=oImage.sText; sI+="\""+sTitle+"\"0) sI+=" width="+oImage.nWidth; if(oImage.nHeight>0) sI+=" height="+oImage.nHeight; sI+=" border=no align=\"absmiddle\">"; return sI; } return ""; } function getCurrentAveName() { var oSelect=getElement("avenue"); if(oSelect) return oSelect.value; else return ""; } function updateWebSearch(bEnable) { var oWebSearch=getElement("btnwebsearch"); var oWebSearchParent=null; if(oWebSearch) oWebSearchParent=getParentNode(oWebSearch); goWebSearchEnable=bEnable; if(oWebSearchParent) { if(bEnable) enableButton(oWebSearchParent,goWebSearch); else disableButton(oWebSearchParent,goWebSearch); } } function setState(oEL,sState) { if(gbNav6) oEL.setAttribute("state",sState); else oEL.state=sState; } function updateAvenueIfNeeded() { gbUpdateTimerCount--; if (gbNeedUpdateAve&&gbUpdateTimerCount==0) { updateAvenue(); } } function updateAvenue() { var sSelect=getAvenueHTML(gaAvenues); var oSelect=getElement("avenue"); if(oSelect) { if(gbNav6) { var oParent=getParentNode(oSelect); if(oParent) { removeThis(oSelect); oParent.insertAdjacentHTML("afterBegin",sSelect); } } else oSelect.outerHTML=sSelect; oSelect=getElement("avenue"); if(isValidAvenue(gaAvenues,gsCurAveName)) oSelect.value=gsCurAveName; } updateAveButton(); } function initAveButtonObj() { if(!gbAveButttnInited) { var oNext=getElement("btnavnext"); if(oNext) goNextParent=getParentNode(oNext); var oPrev=getElement("btnavprev"); if(oPrev) goPrevParent=getParentNode(oPrev); } gbAveButttnInited=true; } function disableAveButton() { initAveButtonObj(); if(goNextParent) disableButton(goNextParent,goNext); if(goPrevParent) disableButton(goPrevParent,goPrev); } function disableButton(oEl,oBtn) { setState(oEl,"disable"); var sPF=oEl.className.substring(0,6); oEl.className=sPF+"Normal"; var oIs=getElementsByTag(oEl,"img"); if(oIs.length>0&&oBtn&&oBtn.aIs&&oBtn.aIs.length>3) { if(oBtn.aIs[3]) oIs[0].src=oBtn.aIs[3]; } else oEl.style.visibility="hidden"; } function enableButton(oEl,oBtn) { setState(oEl,"normal"); if(oEl==goEl) { var sPF=oEl.className.substring(0,6); oEl.className=sPF+"Up"; } var oIs=getElementsByTag(oEl,"img"); if(oIs.length>0&&oBtn&&oBtn.aIs&&oBtn.aIs.length>0) { if(oBtn.aIs[0]) oIs[0].src=oBtn.aIs[0]; } oEl.style.visibility="visible"; } function updateAveButton() { initAveButtonObj(); var strAveName=getCurrentAvenue(); if(strAveName!="") { if(gaAvenues) { for(var i=0;i0) { for(var i=0;i"; sSelect+=""; if(aAvenues) { for(var i=0;i"+aAvenues[i].sName+""; } } sSelect+=""; return sSelect; } function addAvenueSelection() { var oMsg=new whMessage(WH_MSG_GETAVIAVENUES,this,1,new Object()); var sButton=""; if(SendMessage(oMsg)) { sButton=getAvenueHTML(oMsg.oParam.aAvenues); } else { sButton=getAvenueHTML(null); } gaButtons[gaButtons.length]=""+sButton+""; } function setSearchFormTitle(sTitle) { gsSearchFormTitle=sTitle; } function highLightIfNeeded() { if(document.searchForm.searchString.value==gsSearchPrompt) { document.searchForm.searchString.select(); } } function addSearchForm() { var sPropmptString=gsSearchPrompt; var nWidth=20; if(!nWidth) nWidth=20; if(gbNav4) nWidth=nWidth*.6; if(gsSearchFormTitle) sPropmptString=""; var sButton=""; if(gbNav6) sButton=""+sButton; if("image"=="text") { sButton+=""; } else if("image"=="image"&&gsIGo) { sButton+=""; } sButton+="
"+_textToHtml(gsSearchFormTitle)+"
" sButton+="\"Go\"
"; if(gbNav6) sButton+=""; var nBtn=gaButtons.length; gaButtons[nBtn]=""+sButton+""; gaTypes[nBtn]="searchform"; } function getShowHide() { var sText=""; var sI=""; if(hasNavPane()) { if(goHide) { if(gnShowHideStyle&BTN_TEXT) sText=goHide.sText; if(gnShowHideStyle&BTN_IMG) sI=getImage(goHide,"Hide"); } } else { if(goShow) { if(gnShowHideStyle&BTN_TEXT) sText=goShow.sText; if(gnShowHideStyle&BTN_IMG) sI=getImage(goShow,"Show"); } } var sButton=genButton(sText,sI,gnShowHideStyle); return sButton; } function addBanner(sImage) { if(sImage) { var nBtn=gaButtons.length; gaButtons[nBtn]="     \"About"; gaTypes[nBtn]="banner"; } } function showBanner() { if (!gbPreview) { var nWidth=360; var nHeight=240; var nScreenWidth=screen.width; var nScreenHeight=screen.height; var nLeft=(nScreenWidth-nWidth)/2; var nTop=(nScreenHeight-nHeight)/2; if (gbIE4) { if (gbIE5) nHeight+=20; else nHeight+=40; window.showModalDialog("whskin_banner.htm","","dialogHeight:"+nHeight+"px;dialogWidth:"+nWidth+"px;resizable:no;status:no;scroll:no;help:no;center:yes;"); } else window.open("whskin_banner.htm","banner","dependent,innerHeight="+nHeight+",innerWidth="+nWidth+",height="+nHeight+",width="+nWidth+",resizable=no,menubar=no,location=no,personalbar=no,status=no,scrollbar=no,toolbar=no,screenX="+nLeft+",screenY="+nTop); } } function addButton(sType,nStyle,sTitle,sHref,sOnClick,sOnMouseOver,sOnLoad,nWidth,nHeight,sI1,sI2,sI3,sI4,sI5,sI6) { var sButton=""; var bMini=false; var sText=""; var sI=""; var bState=false; var nBtn=gaButtons.length; var bHref=false; if(sType=="show"&&isShowHideEnable()) { var svTitle="Show Navigation Component"; sButton=""; gnShowHideStyle=nStyle; goShow=new button(sType,sTitle,nWidth,nHeight,sI1,sI2,sI3); gaObjBtns[nBtn]=goShow; if(gnShowHide!=-1) { nBtn=gnShowHide; } else { gnShowHide=nBtn; } sButton+=getShowHide(); sButton+=""; bState=true; } else if(sType=="hide"&&isShowHideEnable()) { var svTitle="Hide Navigation Component"; sButton=""; gnShowHideStyle=nStyle; goHide=new button(sType,sTitle,nWidth,nHeight,sI1,sI2,sI3); gaObjBtns[nBtn]=goHide; if(gnShowHide!=-1) { nBtn=gnShowHide; } else { gnShowHide=nBtn; } sButton+=getShowHide(); sButton+=""; bState=true; } else if(sType=="hide2"&&(!gbNav4)) { var svTitle="Hide Navigation Component"; sButton=""; gnShowHideStyle=nStyle; if(!sI1) sI1=gsIHide; goHide2=new button(sType,sTitle,nWidth,nHeight,sI1,sI2,sI3); gaObjBtns[nBtn]=goHide2; if(nStyle&BTN_TEXT) sText=goHide2.sText if(nStyle&BTN_IMG) sI=getImage(goHide2,svTitle); sButton+=genButton(sText,sI,nStyle); sButton+=""; bMini=true; } else if(sType=="synctoc") { var svTitle="Sync TOC"; sButton=""; if(!sI1) sI1=gsISync; goSync=new button(sType,sTitle,nWidth,nHeight,sI1,sI2,sI3); gaObjBtns[nBtn]=goSync; if(nStyle&BTN_TEXT) sText=goSync.sText if(nStyle&BTN_IMG) sI=getImage(goSync,svTitle); sButton+=genButton(sText,sI,nStyle); sButton+=""; bMini=true; } else if(sType=="toc") { var svTitle="Contents"; sButton=""; if(!sI1) sI1=gsIToc; if(!sI2) sI2=gsITocS; if(!sI4) sI4=gsITocS; goToc=new button(sType,sTitle,nWidth,nHeight,sI1,sI2,sI3,sI4,sI5,sI6); gaObjBtns[nBtn]=goToc; if(nStyle&BTN_TEXT) sText=goToc.sText if(nStyle&BTN_IMG) sI=getImage(goToc,svTitle); sButton+=genButton(sText,sI,nStyle); sButton+=""; bState=true; } else if(sType=="idx") { var svTitle="Index"; sButton=""; if(!sI1) sI1=gsIIndex; if(!sI2) sI2=gsIIndexS; if(!sI4) sI4=gsIIndexS; goIdx=new button(sType,sTitle,nWidth,nHeight,sI1,sI2,sI3,sI4,sI5,sI6); gaObjBtns[nBtn]=goIdx; if(nStyle&BTN_TEXT) sText=goIdx.sText if(nStyle&BTN_IMG) sI=getImage(goIdx,svTitle); sButton+=genButton(sText,sI,nStyle); sButton+=""; bState=true; } else if(sType=="fts") { var svTitle="Search"; sButton=""; if(!sI1) sI1=gsISearch; if(!sI2) sI2=gsISearchS; if(!sI4) sI4=gsISearchS; goFts=new button(sType,sTitle,nWidth,nHeight,sI1,sI2,sI3,sI4,sI5,sI6); gaObjBtns[nBtn]=goFts; if(nStyle&BTN_TEXT) sText=goFts.sText if(nStyle&BTN_IMG) sI=getImage(goFts,svTitle); sButton+=genButton(sText,sI,nStyle); sButton+=""; bState=true; } else if(sType=="glo") { var svTitle="Glossary"; sButton=""; if(!sI1) sI1=gsIGlossary; if(!sI2) sI2=gsIGlossaryS; if(!sI4) sI4=gsIGlossaryS; goGlo=new button(sType,sTitle,nWidth,nHeight,sI1,sI2,sI3,sI4,sI5,sI6); gaObjBtns[nBtn]=goGlo; if(nStyle&BTN_TEXT) sText=goGlo.sText if(nStyle&BTN_IMG) sI=getImage(goGlo,svTitle); sButton+=genButton(sText,sI,nStyle); sButton+=""; bState=true; } else if(sType=="avnext") { var svTitle="Next Topic"; sButton=""; if(!sI1) sI1=gsINext; if(!sI4) sI4=gsINextD; goNext=new button(sType,sTitle,nWidth,nHeight,sI1,sI2,sI3,sI4,sI5,sI6); gaObjBtns[nBtn]=goNext; if(nStyle&BTN_TEXT) sText=goNext.sText if(nStyle&BTN_IMG) sI=getImage(goNext,svTitle); sButton+=genButton(sText,sI,nStyle); sButton+=""; bMini=true; } else if(sType=="avprev") { var svTitle="Previous Topic"; sButton=""; if(!sI1) sI1=gsIPrev; if(!sI4) sI4=gsIPrevD; goPrev=new button(sType,sTitle,nWidth,nHeight,sI1,sI2,sI3,sI4,sI5,sI6); gaObjBtns[nBtn]=goPrev; if(nStyle&BTN_TEXT) sText=goPrev.sText if(nStyle&BTN_IMG) sI=getImage(goPrev,svTitle); sButton+=genButton(sText,sI,nStyle); sButton+=""; bMini=true; } else if(sType=="blankblock") { gaButtons[nBtn]=null; gaTypes[nBtn]=sType; } else if(sType=="websearch") { var svTitle="WebSearch"; sButton=""; if(!sI1) sI1=gsIWebSearch; if(!sI4) sI4=gsIWebSearchD; goWebSearch=new button(sType,sTitle,nWidth,nHeight,sI1,sI2,sI3,sI4,sI5,sI6); gaObjBtns[nBtn]=goWebSearch; if(nStyle&BTN_TEXT) sText=goWebSearch.sText if(nStyle&BTN_IMG) sI=getImage(goWebSearch,svTitle); sButton+=genButton(sText,sI,nStyle); sButton+=""; } else if(sType.indexOf("custom")==0) { var nCusBtnIdx=goCusButton.length; goCusButton[nCusBtnIdx]=new cusButton(sType,sTitle,sOnClick,sOnMouseOver,sOnLoad,nWidth,nHeight,sI1,sI2,sI3); gaObjBtns[nBtn]=goCusButton[nCusBtnIdx]; var re=new RegExp("\"","g"); var svTitle=sTitle.replace(re, """); if(sHref&&sHref.length!=0) { sButton=""; if(nStyle&BTN_TEXT) sText=sTitle; if(nStyle&BTN_IMG) sI+=getImage(goCusButton[nCusBtnIdx],sTitle); sButton+=genButton(sText,sI,nStyle); sButton+=""; } if(sButton.length!=0) { var btnClass=""; if(sText||bMini) btnClass="clsBtnNormal"; else btnClass="clsNoBNormal"; if(!bState) { if(bHref) gaButtons[nBtn]=""+sButton+""; else gaButtons[nBtn]=""+sButton+""; } else gaButtons[nBtn]=""+sButton+""; gaTypes[nBtn]=sType; } if(sType=="avenuesel") addAvenueSelection(); else if(sType=="searchform") addSearchForm(); else if(sType=="banner") { if(!sI1) sI1=gsIBanner; addBanner(sI1); } } function isShowHideEnable() { if(gbIE4) return true; else return false; } function genButton(sText,sI,nStyle) { var sButton=""; var sShowText=_textToHtml(sText); if (gbNav4 && !gbNav6) sShowText += " "; if(sText!=""&&sI!="") { if(nStyle&BTN_IMG_TOP) sButton+=sI+"
"+ sShowText; else if(nStyle&BTN_IMG_BOTTOM) sButton+=sText+"
"+sI; else if(nStyle&BTN_IMG_RIGHT) sButton+=sText+" "+sI; else sButton+=sI+" "+sShowText; } else if(sText!="") { sButton+=sShowText; } else if(sI!="") { sButton+=sI; } return sButton; } function searchB() { var onMsg=new whMessage(WH_MSG_SHOWFTS,this,1,null); SendMessage(onMsg); var oMsg=new whMessage(WH_MSG_SEARCHTHIS,this,1,document.searchForm.searchString.value); if(!SendMessage(oMsg)) gstrSearch=document.searchForm.searchString.value; else gstrSearch=""; } function ReSortToolbarButtons() { var bSearchEnabled=isSearchEnabled(); var strOrder=""; var oMsg=new whMessage(WH_MSG_TOOLBARORDER,this,1,null); if(SendMessage(oMsg)) { strOrder=oMsg.oParam; } if(strOrder.length>0) { gaOrders=strOrder.split("|"); var aTempButtons=new Array(); var ti=0; for(var si=0;si0) { gaOrders=strOrder.split("|"); var aTempButtons=new Array(); var ti=0; for(var si=0;si0) { var strHeight="100%"; var strWidth="100%"; if (gbNav4) { strHeight=window.innerHeight-4; strWidth=window.innerWidth-4; } if (gbIE4) { strHeight=document.body.clientHeight-4; strWidth=document.body.clientWidth-4; } if(gbNav6) sHTML=""; else sHTML="
"; if((gnButtonLayout&LAYOUT)==HLAYOUT) { sHTML+=""; for(var i=0;i"; } sHTML+=""; } else { for(var i=0;i"+gaButtons[i]+""; else sHTML+=""; } } if(gbNav6) sHTML+="
"; else sHTML+=""; } document.write(sHTML); if(document.body) document.body.onselectstart=onSelect; updateAveButton(); } function hasNavPane() { if(gnHasNavPane==-1) { gnHasNavPane=0; var oParam=new Object(); oParam.bVisible=false; var oMsg=new whMessage(WH_MSG_ISPANEVISIBLE,this,1,oParam); if(SendMessage(oMsg)) { if(oParam.bVisible) gnHasNavPane=1; } } if(gnHasNavPane==1) return true; else return false; } function getTocInfo() { var oParam=new Object(); oParam.oTocInfo=null; var oMsg=new whMessage(WH_MSG_GETTOCPATHS,this,1,oParam); if(SendMessage(oMsg)) { goTocInfo=oParam.oTocInfo; gbTocInfoInited=true; } } function onBtnClick(e) { var oEl=null; var oElo=null; if(gbNav6) { oElo=e.target; while(oElo&&oElo.nodeName.indexOf("#")==0) oElo=getParentNode(oElo); oEl=oElo; } else { oElo=event.srcElement; oEl=oElo; event.cancelBubble=true; } while(-1==oEl.className.indexOf("clsBtn")&&-1==oEl.className.indexOf("clsNoB")) { oEl=getParentNode(oEl); if(!oEl) return; } if(oElo.tagName=="A"||oElo.tagName=="IMG") return true; var oaA=getElementsByTag(oElo,"A"); if(oaA&&oaA.length) { var oA=oaA[0]; if(gbNav6) { var sCmd=oA.getAttribute("onclick"); var nCmd=sCmd.indexOf("return false;"); if(nCmd!=-1); sCmd=sCmd.substring(0,nCmd); setTimeout(sCmd,1); } else oA.onclick(); } } function onBtnMouseDown(e,nBtn) { var oEl=null; if(gbNav6) { var oElo=e.target; while(oElo&&oElo.nodeName.indexOf("#")==0) oElo=getParentNode(oElo); oEl=oElo; } else { oEl=event.srcElement; event.cancelBubble=true; } while(-1==oEl.className.indexOf("clsBtn")&&-1==oEl.className.indexOf("clsNoB")) { oEl=getParentNode(oEl); if(!oEl) return; } var sPF=oEl.className.substring(0,6); var oIs=getElementsByTag(oEl,"img"); if(oIs.length>0&&gaObjBtns[nBtn]&&gaObjBtns[nBtn].aIs&&gaObjBtns[nBtn].aIs.length>2) { if(gaObjBtns[nBtn].aIs[2]) oIs[0].src=gaObjBtns[nBtn].aIs[2]; } var sState=getState(oEl); if(sState!="disable") { oEl.className=sPF+"Down"; } } function onBtnMouseUp(e,nBtn) { var oEl=null; if(gbNav6) { var oElo=e.target; while(oElo&&oElo.nodeName.indexOf("#")==0) oElo=getParentNode(oElo); oEl=oElo; } else { oEl=event.srcElement; event.cancelBubble=true; } while(-1==oEl.className.indexOf("clsBtn")&&-1==oEl.className.indexOf("clsNoB")) { oEl=getParentNode(oEl); if(!oEl) return; } var sPF=oEl.className.substring(0,6); var sState=getState(oEl); if(sState=="down"||sState=="disable") { var oIs=getElementsByTag(oEl,"img"); if(oIs.length>0&&gaObjBtns[nBtn]&&gaObjBtns[nBtn].aIs&&gaObjBtns[nBtn].aIs.length>3) { if(gaObjBtns[nBtn].aIs[3]) oIs[0].src=gaObjBtns[nBtn].aIs[3]; } } else { var oIs=getElementsByTag(oEl,"img"); if(oIs.length>0&&gaObjBtns[nBtn]&&gaObjBtns[nBtn].aIs&&gaObjBtns[nBtn].aIs.length>0) { if(gaObjBtns[nBtn].aIs[0]) oIs[0].src=gaObjBtns[nBtn].aIs[0]; } } if(goEl==oEl) { if(sState!="down"&&sState!="disable") { oEl.className=sPF+"Up"; } } } function getState(oEl) { var sState=""; if(gbNav6) sState=oEl.getAttribute("state"); else if(oEl.state) sState=oEl.state; return sState; } function onBtnMouseOver(e,nBtn) { markButton(e); var oEl=null; if(gbNav6) { var oElo=e.target; while(oElo&&oElo.nodeName.indexOf("#")==0) oElo=getParentNode(oElo); oEl=oElo; } else { oEl=event.srcElement; event.cancelBubble=true; } while(-1==oEl.className.indexOf("clsBtn")&&-1==oEl.className.indexOf("clsNoB")) { oEl=getParentNode(oEl); if(!oEl) return; } var sPF=oEl.className.substring(0,6); var sState=getState(oEl); if(sState=="down"||sState=="disable") { if(sState=="down") oEl.className=sPF+"Down"; var oIs=getElementsByTag(oEl,"img"); if(oIs.length>0&&gaObjBtns[nBtn]&&gaObjBtns[nBtn].aIs&&gaObjBtns[nBtn].aIs.length>4) { if(gaObjBtns[nBtn].aIs[4]) oIs[0].src=gaObjBtns[nBtn].aIs[4]; } } else { oEl.className=sPF+"Up"; var oIs=getElementsByTag(oEl,"img"); if(oIs.length>0&&gaObjBtns[nBtn]&&gaObjBtns[nBtn].aIs&&gaObjBtns[nBtn].aIs.length>1) { if(gaObjBtns[nBtn].aIs[1]) oIs[0].src=gaObjBtns[nBtn].aIs[1]; } } } function onBtnMouseOut(e,nBtn) { goEl=null; var oEl=null; if(gbNav6) { var oElo=e.target; while(oElo&&oElo.nodeName.indexOf("#")==0) oElo=getParentNode(oElo); oEl=oElo; } else { oEl=event.srcElement; event.cancelBubble=true; } while(-1==oEl.className.indexOf("clsBtn")&&-1==oEl.className.indexOf("clsNoB")) { oEl=getParentNode(oEl); if(!oEl) return; } var sPF=oEl.className.substring(0,6); var sState=getState(oEl); if(sState=="down"||sState=="disable") { var oIs=getElementsByTag(oEl,"img"); if(oIs.length>0&&gaObjBtns[nBtn]&&gaObjBtns[nBtn].aIs&&gaObjBtns[nBtn].aIs.length>3) { if(gaObjBtns[nBtn].aIs[3]) oIs[0].src=gaObjBtns[nBtn].aIs[3]; } if(sState=="down") oEl.className=sPF+"Down"; } else { var oIs=getElementsByTag(oEl,"img"); if(oIs.length>0&&gaObjBtns[nBtn]&&gaObjBtns[nBtn].aIs&&gaObjBtns[nBtn].aIs.length>0) { if(gaObjBtns[nBtn].aIs[0]) oIs[0].src=gaObjBtns[nBtn].aIs[0]; } oEl.className=sPF+"Normal"; } } function showToc() { var oMsg=new whMessage(WH_MSG_SHOWTOC,this,1,null) SendMessage(oMsg); } function showIndex() { var oMsg=new whMessage(WH_MSG_SHOWIDX,this,1,null) SendMessage(oMsg); } function showFts() { var oMsg=new whMessage(WH_MSG_SHOWFTS,this,1,null) SendMessage(oMsg); } function showGlossary() { var oMsg=new whMessage(WH_MSG_SHOWGLO,this,1,null) SendMessage(oMsg); } function syncWithShow() { if(!gbTocInfoInited) { getTocInfo(); } if(goTocInfo) { showToc(); var oParam=goTocInfo; var oMsg=new whMessage(WH_MSG_SYNCTOC,this,1,oParam); SendMessage(oMsg); } } function markButton(e) { var oEl=null; if(gbNav6) { var oElo=e.target; while(oElo&&oElo.nodeName.indexOf("#")==0) oElo=getParentNode(oElo); oEl=oElo; } else oEl=event.srcElement; while(oEl&&oEl.tagName!="TD") oEl=getParentNode(oEl); if(oEl) goEl=oEl; } function showHidePane() { var oMsg=null; if(hasNavPane()) oMsg=new whMessage(WH_MSG_HIDEPANE,this,1,null); else oMsg=new whMessage(WH_MSG_SHOWPANE,this,1,null); SendMessage(oMsg); } function goAveNext() { goAvenue(true); } function goAvePrev() { goAvenue(false); } function doWebSearch() { if (goWebSearchEnable) { var oMsg=new whMessage(WH_MSG_WEBSEARCH,this,1,null); SendMessage(oMsg); } } function goAvenue(bNext) { var oMsg=null; initAveButtonObj(); gsCurAveName=getCurrentAveName(); if(gbNav4&&!gbNav6) { if(bNext) { gaAvenues=null; updateAvenue(); oMsg=new whMessage(WH_MSG_NEXT,this,1,null); SendMessage(oMsg); } else if(!bNext) { gaAvenues=null; updateAvenue(); oMsg=new whMessage(WH_MSG_PREV,this,1,null); SendMessage(oMsg); } } else { if(bNext&&goNextParent) { var sState=getState(goNextParent); if(sState!="disable") { gaAvenues=null; gbNeedUpdateAve=true; gbUpdateTimerCount++; setTimeout("updateAvenueIfNeeded();", 2000); oMsg=new whMessage(WH_MSG_NEXT,this,1,null); SendMessage(oMsg); } } else if(!bNext&&goPrevParent) { var sState=getState(goPrevParent); if(sState!="disable") { gaAvenues=null; gbNeedUpdateAve=true; gbUpdateTimerCount++; setTimeout("updateAvenueIfNeeded();", 2000); oMsg=new whMessage(WH_MSG_PREV,this,1,null); SendMessage(oMsg); } } } } function window_Unload() { if(!gbNav4||gbNav6) { UnRegisterListener2(this,WH_MSG_GETSEARCHS); UnRegisterListener2(this,WH_MSG_PANESTATUE); UnRegisterListener2(this,WH_MSG_SYNCINFO); UnRegisterListener2(this,WH_MSG_PANEINFO); UnRegisterListener2(this,WH_MSG_AVENUEINFO); UnRegisterListener2(this,WH_MSG_GETCURRENTAVENUE); UnRegisterListener2(this,WH_MSG_ENABLEWEBSEARCH); UnRegisterListener2(this,WH_MSG_INITSEARCHSTRING); } } function window_OnLoad() { if(document.body) { if(gsBgImage&&gsBgImage.length>0) { document.body.background=gsBgImage; } if(gsBgColor&&gsBgColor.length>0) { document.body.bgColor=gsBgColor; } } doCusOnLoad(); var oMsg=new whMessage(WH_MSG_GETPANEINFO,this,1,null); if(SendMessage(oMsg)) { setTimeout("flipPaneButton(\""+oMsg.oParam+"\");",1); } if (!gaAvenues) { var oMsg2=new whMessage(WH_MSG_GETAVIAVENUES,this,1,new Object()); if(SendMessage(oMsg2)) { gaAvenues=oMsg2.oParam.aAvenues; gbNeedUpdateAve=false; setTimeout("updateAvenue();",1); } } } function onSendMessage(oMsg) { var nMsgId=oMsg.nMessageId; if(nMsgId==WH_MSG_GETSEARCHS) { if(document.searchForm&&document.searchForm.searchString) { oMsg.oParam.sValue=document.searchForm.searchString.value; return false; } } else if(nMsgId==WH_MSG_PANESTATUE) { if(oMsg.oParam=="visible") { if(isShowHideEnable()) setTimeout("flipShowHide(true);",1); setTimeout("showPaneButton();",1); } else { if(isShowHideEnable()) setTimeout("flipShowHide(false);",1); setTimeout("hidePaneButton();",1); } } else if(nMsgId==WH_MSG_PANEINFO) { if(oMsg.oParam) setTimeout("flipPaneButton(\""+oMsg.oParam+"\");",1); else setTimeout("hidePaneButton();",1); } else if(nMsgId==WH_MSG_SYNCINFO) { if(oMsg.oParam) goTocInfo=oMsg.oParam; else goTocInfo=null; gbTocInfoInited=true; } else if(nMsgId==WH_MSG_AVENUEINFO) { gaAvenues=oMsg.oParam; gbNeedUpdateAve=false; setTimeout("updateAvenue();",1); } else if(nMsgId==WH_MSG_GETCURRENTAVENUE) { var sAveName=getCurrentAvenue(); if(sAveName!="") { oMsg.oParam.sAvenue=sAveName; return false; } else return true; } else if(nMsgId==WH_MSG_ENABLEWEBSEARCH) { setTimeout("updateWebSearch("+oMsg.oParam+");",1); } else if(nMsgId==WH_MSG_INITSEARCHSTRING) { if(gstrSearch!="") { oMsg.oParam=gstrSearch; gstrSearch=""; return false; } } return true; } function getCurrentAvenue() { var strAveName=""; var oSelect=getElement("avenue"); if(oSelect) { strAveName=oSelect.value; } return strAveName; } function initBtn() { var oBtn=null; oBtn=getElement("btntoc"); if(oBtn) gaBtns[gaBtns.length]=oBtn; oBtn=getElement("btnidx"); if(oBtn) gaBtns[gaBtns.length]=oBtn; oBtn=getElement("btnfts"); if(oBtn) gaBtns[gaBtns.length]=oBtn; oBtn=getElement("btnglo"); if(oBtn) gaBtns[gaBtns.length]=oBtn; gbInitBtn=true; } function showPaneButton() { flipPaneButton(gsPane); } function hidePaneButton() { flipPaneButton(""); } function flipPaneButton(sPane) { if (sPane) gsPane=sPane; if(!gbInitBtn) initBtn(); var oUp=null; if(sPane) { oUp=getElement("btn"+sPane); } for(var i=0;i0) { var strClassName=oaA[0].className; oaA[0].className="btnsel"+strClassName.substring(3); } } var oIs=getElementsByTag(oEl,"img"); var oBtn=getButtonObjByType(gaBtns[i].id.substring(3)); if(oIs.length>0&&oBtn&&oBtn.aIs&&oBtn.aIs.length>3) { if(oBtn.aIs[3]) oIs[0].src=oBtn.aIs[3]; } } } else { var oEl=getParentNode(gaBtns[i]); var sState=getState(oEl); var sPF=oEl.className.substring(0,6); if(sState=="down") { setState(oEl,"up"); if(oEl==goEl) oEl.className=sPF+"Up"; else oEl.className=sPF+"Normal"; if(sPF=="clsBtn") { if(gaBtns[i].id) { var sColor=getBtnColor(gaBtns[i].id.substring(3),false); if(sColor) { oEl.style.backgroundColor=sColor } else { oEl.style.backgroundColor=""; } } var oaA=getElementsByTag(oEl,"A"); if(oaA.length>0) { var strClassName=oaA[0].className; oaA[0].className="btn"+strClassName.substring(6); } } var oIs=getElementsByTag(oEl,"img"); var oBtn=getButtonObjByType(gaBtns[i].id.substring(3)); if(oIs.length>0&&oBtn&&oBtn.aIs&&oBtn.aIs.length>0) { if(oBtn.aIs[0]) oIs[0].src=oBtn.aIs[0]; } } } } } } function flipShowHide(bShow) { gnHasNavPane=-1; var oA=getElement("btnshowhide"); if(oA) { var oEl=getParentNode(oA); var sPF=oEl.className.substring(0,6); if(oEl&&oEl.state) { if(bShow) { oEl.state="down"; oEl.className=sPF+"Down"; } else { oEl.state="up"; if(oEl==goEl) oEl.className=sPF+"Up"; else oEl.className=sPF+"Normal"; } } oA.innerHTML=getShowHide(); } } function cusOnClick(nIdx) { if(goCusButton.length>nIdx) { var sOnClick=goCusButton[nIdx].sOnClick; if(sOnClick&&sOnClick.length>0) { if(!gbPreview) eval(sOnClick); return false; } } return true; } function cusOnMouseOver(nIdx) { if(goCusButton.length>nIdx) { var sOnMouseOver=goCusButton[nIdx].sOnMouseOver; if(sOnMouseOver&&sOnMouseOver.length>0) { if(!gbPreview) eval(sOnMouseOver); return false; } } return true; } function doCusOnLoad() { if(!gbPreview&&gaOrders) { for(var i=0;ii+7) { if (cusButton.arguments[7+i]) this.aIs[i]=_getFullPath(_getPath(document.location.href),cusButton.arguments[7+i]); else this.aIs[i]=""; i++; } if(sOnLoad) { registerOnLoad(sOnLoad,sType); } } function getBtnColor(sType,bSel) { var aBtnColors=null; if(bSel) aBtnColors=gaSelBtnBgColor; else aBtnColors=gaBtnBgColor; if(aBtnColors) { for(var i=0;i