+// WebHelp 5.10.003\r
RegisterListener2(this, WH_MSG_GETSTARTFRAME);\r
RegisterListener2(this, WH_MSG_GETDEFAULTTOPIC);\r
RegisterListener2(this, WH_MSG_MINIBARORDER);\r
RegisterListener2(this, WH_MSG_GETPANETYPE);\r
RegisterListener2(this, WH_MSG_GETPANES);\r
RegisterListener2(this, WH_MSG_RELOADNS6);\r
+RegisterListener2(this, WH_MSG_GETCMD);\r
+RegisterListener2(this, WH_MSG_GETPANE);\r
+RegisterListener2(this, WH_MSG_GETDEFPANE);\r
\r
if (gbNav6)\r
{\r
\r
function delayReload()\r
{\r
- if(!gnReload)\r
+ if (!(this.cMRServer && cMRServer.m_strVersion))\r
{\r
- if(nViewFrameType&&nViewFrameType==1)\r
- document.location=document.location;\r
+ if(gnReload!=2)\r
+ {\r
+ if(nViewFrameType&&nViewFrameType==1)\r
+ document.location=document.location;\r
+ }\r
}\r
}\r
\r
-var gsToolbarOrder = "toc|fts|glo|blankblock|banner";\r
+var gsToolbarOrder = "toc|fts|glo|blankblock|searchform|banner";\r
var gsMinibarOrder = "blankblock|hide2|";\r
\r
-var gsTopic = "files/introduction_to_visu.htm";\r
+var gsTopic = "files/introduction.htm";\r
+var PANE_OPT_SEARCH = 1;\r
+var PANE_OPT_BROWSESEQ = 2;\r
+var gnOpts=-1;\r
+var gnCmd=-1;\r
+var gnPans=2;\r
+var gsBtns="invalid";\r
+var gsDefaultBtn="invalid";\r
+var gbHasTitle=false;\r
\r
if (location.hash.length > 1)\r
- gsTopic = location.hash.substring(1);\r
+{\r
+ var sParam = location.hash;\r
+ if (sParam.indexOf("#<") == 0)\r
+ {\r
+ document.location = "whcsh_home.htm#" + sParam.substring(2);\r
+ }\r
+ else if (sParam.indexOf("#>>") == 0)\r
+ {\r
+ parseParam(sParam.substring(3));\r
+ sParam = "#" + gsTopic + sParam.substring(1);\r
+ }\r
+ else\r
+ {\r
+ var nPos = sParam.indexOf(">>");\r
+ if (nPos>1)\r
+ {\r
+ gsTopic = sParam.substring(1, nPos);\r
+ parseParam(sParam.substring(nPos+2));\r
+ }\r
+ else\r
+ gsTopic = sParam.substring(1);\r
+ }\r
+ if (gnPans == 1 && gsTopic)\r
+ {\r
+ var strURL=location.href;\r
+ if (location.hash)\r
+ {\r
+ var nPos=location.href.indexOf(location.hash);\r
+ strURL=strURL.substring(0, nPos);\r
+ }\r
+ if (gbHasTitle)\r
+ document.location=_getPath(strURL)+ "whskin_tw.htm" + sParam;\r
+ else\r
+ document.location=_getPath(strURL)+ gsTopic;\r
+ }\r
+}\r
+\r
+function parseParam(sParam)\r
+{\r
+ if (sParam)\r
+ {\r
+ var nBPos=0;\r
+ do \r
+ {\r
+ var nPos=sParam.indexOf(">>", nBPos);\r
+ if (nPos!=-1)\r
+ {\r
+ if (nPos>0)\r
+ {\r
+ var sPart=sParam.substring(nBPos, nPos);\r
+ parsePart(sPart);\r
+ }\r
+ nBPos = nPos + 2;\r
+ }\r
+ else\r
+ {\r
+ var sPart=sParam.substring(nBPos);\r
+ parsePart(sPart);\r
+ break;\r
+ }\r
+ } while(nBPos < sParam.length);\r
+ } \r
+}\r
+\r
+function parsePart(sPart)\r
+{\r
+ if(sPart.toLowerCase().indexOf("cmd=")==0)\r
+ {\r
+ gnCmd=parseInt(sPart.substring(4));\r
+ }\r
+ else if(sPart.toLowerCase().indexOf("cap=")==0)\r
+ {\r
+ document.title=_browserStringToText(sPart.substring(4));\r
+ gbHasTitle=true;\r
+ }\r
+ else if(sPart.toLowerCase().indexOf("pan=")==0)\r
+ {\r
+ gnPans=parseInt(sPart.substring(4));\r
+ }\r
+ else if(sPart.toLowerCase().indexOf("pot=")==0)\r
+ {\r
+ gnOpts=parseInt(sPart.substring(4));\r
+ }\r
+ else if(sPart.toLowerCase().indexOf("pbs=")==0)\r
+ {\r
+ var sRawBtns = sPart.substring(4);\r
+ var aBtns = sRawBtns.split("|");\r
+ for (var i=0;i<aBtns.length;i++)\r
+ {\r
+ aBtns[i] = transferAgentNameToPaneName(aBtns[i]);\r
+ }\r
+ gsRawBtns = aBtns.join("|");\r
+ }\r
+ else if(sPart.toLowerCase().indexOf("pdb=")==0)\r
+ {\r
+ gsDefaultBtn=transferAgentNameToPaneName(sPart.substring(4));\r
+ }\r
+}\r
\r
function setToolbarOrder(sOrder)\r
{\r
}\r
}\r
}\r
- oMsg.oParam = gsToolbarOrder;\r
+ var sParam="";\r
+ if (gsBtns!="invalid")\r
+ sParam=gsBtns+"|blankblock|banner";\r
+ else\r
+ sParam = gsToolbarOrder;\r
+\r
+ if (gnOpts!=-1)\r
+ {\r
+ var nPosForm=sParam.indexOf("|searchform|");\r
+ if (gnOpts&PANE_OPT_SEARCH)\r
+ {\r
+ if (nPosForm == -1 && sParam.indexOf("|fts|") != -1)\r
+ {\r
+ var nPos=sParam.indexOf("banner");\r
+ if (nPos!=-1)\r
+ {\r
+ sParam=sParam.substring(0, nPos) + "searchform|" + sParam.substring(nPos);\r
+ }\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if (nPosForm!=-1)\r
+ {\r
+ sParam=sParam.substring(0,nPosForm) + sParam.substring(nPosForm+11);\r
+ }\r
+ }\r
+ }\r
+ oMsg.oParam=sParam;\r
return false;\r
}\r
else if (nMsgId == WH_MSG_MINIBARORDER)\r
{\r
- oMsg.oParam = gsMinibarOrder;\r
+ var sMinParam=gsMinibarOrder;\r
+ if (gnOpts!=-1)\r
+ {\r
+ var nPosBro=gsMinibarOrder.indexOf("avprev|avnext");\r
+ if (gnOpts&PANE_OPT_BROWSESEQ)\r
+ {\r
+ if (nPosBro==-1)\r
+ {\r
+ sMinParam ="avprev|avnext|" + gsMinibarOrder;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if (nPosBro!=-1)\r
+ {\r
+ if (nPosBro!=0)\r
+ sMinParam=gsMinibarOrder.substring(0, nPosBro) + gsMinibarOrder.substring(nPosBro+14);\r
+ else\r
+ sMinParam=gsMinibarOrder.substring(14);\r
+ }\r
+ }\r
+ }\r
+ oMsg.oParam = sMinParam;\r
return false;\r
}\r
else if (nMsgId == WH_MSG_ISSYNCSSUPPORT)\r
}\r
else\r
{\r
- if(nViewFrameType)\r
+ if(typeof(nViewFrameType)!="undefined")\r
{\r
oMsg.oParam= (nViewFrameType < 3);\r
return false;\r
}\r
else if (nMsgId == WH_MSG_ISSEARCHSUPPORT)\r
{\r
- if(nViewFrameType)\r
+ if(typeof(nViewFrameType)!="undefined")\r
{\r
oMsg.oParam= (nViewFrameType < 3);\r
return false;\r
}\r
else if (nMsgId == WH_MSG_GETPANETYPE)\r
{\r
- if(nViewFrameType)\r
+ if(typeof(nViewFrameType)!="undefined")\r
{\r
var oPaneInfo = new Object();\r
oPaneInfo.nType = nViewFrameType;\r
else if(nMsgId==WH_MSG_RELOADNS6)\r
{\r
if(gbNav6)\r
- gnReload=1;\r
+ gnReload++;\r
+ return false;\r
+ }\r
+ else if(nMsgId==WH_MSG_GETCMD)\r
+ {\r
+ oMsg.oParam=gnCmd;\r
+ return false;\r
+ }\r
+ else if(nMsgId==WH_MSG_GETPANE)\r
+ {\r
+ if (gsBtns!="invalid" && oMsg.oParam.sName)\r
+ {\r
+ if(gsBtns.indexOf(oMsg.oParam.sName) != -1)\r
+ oMsg.oParam.bEnable=true;\r
+ else\r
+ oMsg.oParam.bEnable=false;\r
+ }\r
+ else\r
+ oMsg.oParam.bEnable=true;\r
+ return false;\r
+ }\r
+ else if(nMsgId==WH_MSG_GETDEFPANE)\r
+ {\r
+ if (gsDefaultBtn!="invalid")\r
+ {\r
+ oMsg.oParam=gsDefaultBtn;\r
+ }\r
return false;\r
}\r
return true;\r
return "idx";\r
else if (sAN =="nls")\r
return "fts";\r
- else if (sAN =="Glossary")\r
+ else if (sAN =="gls")\r
return "glo";\r
else if (sAN =="WebSearch")\r
return "websearch";\r