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+="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="
"+_textToHtml(gsSearchFormTitle)+"
";
if(gbNav6)
sButton="
";
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]="