var gsDefaultTarget="bsscright";
var gsBgColor="#ffffff";
var gsBgImage="";
var goIdxFont=null;
var goIdxEmptyFont=null;
var goIdxHoverFont=null;
var gsIdxMargin="0pt";
var gsIdxIndent="8pt";
var gsIdxActiveBgColor="#cccccc";
var gsCK = null;
var gsBCK = null;
var gbCR = false;
var gbBCR = false;
var gbWhIHost=true;
function myEvent()
{
this.pageX = 0;
this.pageY = 0;
}
var _event=new myEvent();
function setBackgroundcolor(sBgColor)
{
gsBgColor=sBgColor;
}
function setBackground(sBgImage)
{
gsBgImage=sBgImage;
}
function setFont(sType,sFontName,sFontSize,sFontColor,sFontStyle,sFontWeight,sFontDecoration)
{
var vFont=new whFont(sFontName,sFontSize,sFontColor,sFontStyle,sFontWeight,sFontDecoration);
if(sType=="Normal")
goIdxFont=vFont;
else if(sType=="Empty")
goIdxEmptyFont=vFont;
else if(sType=="Hover")
goIdxHoverFont=vFont;
}
function setActiveBgColor(sBgColor)
{
gsIdxActiveBgColor=sBgColor;
}
function setMargin(sMargin)
{
gsIdxMargin=sMargin;
}
function setIndent(sIndent)
{
gsIdxIndent=sIndent;
}
function writeOneItem(oHTML,bDown,aDataCon,aCurIdxSet,nLength,aPos,nLevel)
{
var sHTML="";
var nIdxSet=aCurIdxSet[0];
var nIIdx=aPos[nIdxSet];
var sKOriName=getItemName(aDataCon,nIdxSet,nIIdx);
var sKName=_textToHtml(sKOriName);
var nIdxIndent=parseInt(gsIdxIndent);
var sTopics="";
if(nLevel==1){
if(getItemType(aDataCon,nIdxSet,nIIdx)==1)
{
sHTML+="
";
sHTML+=""+sKName+"
";
}
else{
for(var i=0;i";
sHTML+="0)
sHTML+=sTopics+");return false;\">"+sKName+"";
else
sHTML+=");return false;\" style=\""+getFontStyle(goIdxEmptyFont)+"\">"+sKName+"";
}
}
else if(nLevel>=2){
var nIndent=nIdxIndent*nLevel;
for(var i=0;i";
else
sHTML+="";
else
sHTML+=");return false;\" style=\""+getFontStyle(goIdxEmptyFont)+"\">"+sKName+"";
}
oHTML.addHTML(sHTML,nLength,bDown,(nLevel==1),sKOriName);
}
function getTargetName(aDataCon,nIdxSet,nIIdx)
{
if(nIdxSetnIIdx)
if(aDataCon[nIdxSet].aKs[nIIdx].sTarget)
return aDataCon[nIdxSet].aKs[nIIdx].sTarget;
return gsDefaultTarget;
}
function mergeItems(oHTML,bDown,aDataCon,aCurIdxSet,nLength,aPos,nLevel)
{
var oLocalHTML=new indexHTMLPart();
writeOneItem(oLocalHTML,bDown,aDataCon,aCurIdxSet,nLength,aPos,nLevel);
var aLocalPos=new Array();
var aMaxPos=new Array();
for(var i=0;i0)
aMaxPos[aCurIdxSet[i]]=aLocalPos[aCurIdxSet[i]]+nNKOff;
}
var oSubHTML=new indexHTMLPart();
writeItems(oSubHTML,aDataCon,aLocalPos,null,aMaxPos,true,nLevel+1);
oLocalHTML.addSubHTML(oSubHTML,true);
oHTML.appendHTML(oLocalHTML,bDown);
}
function adjustPosition(bDown,aDataCon,aCurIdxSet,nLength,aPos)
{
if(bDown)
{
for(var i=0;inIIdx)
return aDataCon[nIdxSet].aKs[nIIdx].sName;
else
return null;
}
function getItemType(aDataCon,nIdxSet,nIIdx)
{
if(nIdxSetnIIdx)
return aDataCon[nIdxSet].aKs[nIIdx].nType;
else
return 0;
}
function getNKOff(aDataCon,nIdxSet,nIIdx)
{
if(nIdxSetnIIdx)
return aDataCon[nIdxSet].aKs[nIIdx].nNKOff;
else
return null;
}
function getPKOff(aDataCon,nIdxSet,nIIdx)
{
if(nIdxSetnIIdx)
return aDataCon[nIdxSet].aKs[nIIdx].nPKOff;
else
return null;
}
function window_OnLoad()
{
if(gsBgImage&&gsBgImage.length>0)
{
document.body.background=gsBgImage;
}
if(gsBgColor&&gsBgColor.length>0)
{
document.body.bgColor=gsBgColor;
}
document.body.insertAdjacentHTML("beforeEnd",writeLoadingDiv());
loadIdx();
var oMsg=new whMessage(WH_MSG_SHOWIDX,this,1,null)
SendMessage(oMsg);
}
function loadIdx()
{
if(!gbReady)
{
var oResMsg=new whMessage(WH_MSG_GETPROJINFO,this,1,null);
if(SendMessage(oResMsg)&&oResMsg.oParam)
{
gbReady=true;
var oProj=oResMsg.oParam;
var aProj=oProj.aProj;
gbXML=oProj.bXML;
if(aProj.length>0)
{
var sLangId=aProj[0].sLangId;
for(var i=0;inIIdx)
{
if(aDataCon[nIdxSet].aKs[nIIdx].aTopics)
{
var nLen=aDataCon[nIdxSet].aKs[nIIdx].aTopics.length;
var nProj=aDataCon[nIdxSet].nProjId;
var sPath=gaData[nProj].sPPath;
for(var i=0;i>1;
sItem=getInnerText(oP[nM]);
if(compare(sItem,sK)==0)
{
bF=true;
break;
}
else if(compare(sItem,sK)>0)
nE=nM-1;
else if(compare(sItem,sK)<0)
nB=nM;
}
if(!bF)
{
if(nB==nE) nM=nB;
if(nM+10){
var nbTag=getElementsByTag(oMatch,"NOBR");
if(nbTag&&nbTag.length>0)
HighLightElement(nbTag[0], gsIdxActiveBgColor, "transparent");
if (gbCR)
{
if (gbIE4)
tempColl(0).click();
else
{
var strCommand = tempColl[0].getAttribute("onClick");
var nstrCommand = strCommand.indexOf(";");
strCommand = strCommand.substring(0, nstrCommand);
strCommand = strCommand.replace("event", "_event");
window._event.pageX = oMatch.offsetLeft ;
window._event.pageY = oMatch.offsetTop + 20;
window.setTimeout(strCommand, 100);
}
}
}
}
gsCK=gsBCK;
gbCR=gbBCR;
if(gsBCK!=null)
{
gsBCK=null;
gbBCR=false;
findCK();
return false;
}
}
return true;
}
function clearHighLight()
{
resetHighLight(gsBgColor);
}
function IndexWriteClassStyle()
{
var sStyle="";
sStyle+="";
document.write(sStyle);
return;
}
function window_Unload()
{
UnRegisterListener2(this,WH_MSG_PROJECTREADY);
UnRegisterListener2(this,WH_MSG_SEARCHINDEXKEY);
}
function onSendMessage(oMsg)
{
if(oMsg)
{
var nMsgId=oMsg.nMessageId;
if(nMsgId==WH_MSG_SEARCHINDEXKEY)
{
if(oMsg.oParam && oMsg.oParam.sInput)
{
if(gsCK==null)
{
gsCK=oMsg.oParam.sInput;
gbCR = oMsg.oParam.bCR;
findCK();
}
else
{
gsBCK=oMsg.oParam.sInput;
gbBCR = oMsg.oParam.bCR;
}
}
}
else if(nMsgId==WH_MSG_PROJECTREADY)
{
loadIdx();
}
}
return true;
}
if(window.gbWhVer&&window.gbWhLang&&window.gbWhMsg&&window.gbWhUtil&&window.gbWhHost&&window.gbWhProxy)
{
RegisterListener2(this,WH_MSG_PROJECTREADY);
RegisterListener2(this,WH_MSG_SEARCHINDEXKEY);
goIdxFont=new whFont("Verdana","8pt","#000000","normal","normal","none");
goIdxEmptyFont=new whFont("Verdana","8pt","#666666","normal","normal","none");
goIdxHoverFont=new whFont("Verdana","8pt","#007f00","normal","normal","underline");
window.onload=window_OnLoad;
window.onbeforeunload=window_BUnload;
window.onunload=window_Unload;
gbWhIHost=true;
}
else
document.location.reload();