home *** CD-ROM | disk | FTP | other *** search
/ Internet CD 2005 August / MICD_2005_08.iso / Multimedia / Twist / TwistEval.exe / Main / ehlpdht1.js < prev    next >
Encoding:
JavaScript  |  2005-06-28  |  49.6 KB  |  1,792 lines

  1. //// Segment Begin -- (JavaScript 1.0)
  2. // eHelp« Corporation Dynamic HTML JavaScript 
  3. // Copyright⌐ 1998-2001 eHelp« Corporation.All rights reserved.
  4. // Version=4.47
  5.  
  6. // Warning:Do not modify this file.It is generated by RoboHELP« and changes will be overwritten.
  7.  
  8.  
  9. /// Section Begin - General (JavaScript 1.0)
  10.  
  11. //{{HH_SYMBOL_SECTION
  12. var HH_ChmFilename = "";
  13. var HH_WindowName = "";
  14. var HH_GlossaryFont = "";
  15. var HH_Glossary = "";
  16. var HH_Avenue = "";
  17. var HH_ActiveX = false;
  18. //}}HH_SYMBOL_SECTION
  19.  
  20. //Begin to support previous generic parameters
  21. //Get the information about the browser.
  22. var gstrBsAgent     = navigator.userAgent.toLowerCase();
  23. var gnBsVer               = parseInt(navigator.appVersion);
  24.  
  25. var gbBsIE          = (gstrBsAgent.indexOf('msie') != -1);
  26. var gbBsNS          = (gstrBsAgent.indexOf('mozilla') != -1) && ((gstrBsAgent.indexOf('spoofer') == -1) && (gstrBsAgent.indexOf('compatible') == -1));
  27. var gbBsOpera        = (gstrBsAgent.indexOf('opera') != -1);
  28.  
  29. var gbBsIE3Before     = ((gbBsIE) && (gnBsVer <= 2));
  30. var gbBsNS3Before     = ((gbBsNS) && (gnBsVer <= 3));
  31.  
  32. var gbBsNS2            = ((gbBsNS) && (gnBsVer <= 2));
  33. var gbBsNS3            = ((gbBsNS) && (gnBsVer == 3));
  34. var gbBsIE300301    = ((gbBsIE) && (gnBsVer == 2) && ((gstrBsAgent.indexOf("3.00") != -1)||(gstrBsAgent.indexOf("3.0a") != -1)||(gstrBsAgent.indexOf("3.0b")!=-1)||(gstrBsAgent.indexOf("3.01")!=-1)));
  35. var gbBsIE302        = ((gbBsIE) && (gnBsVer == 2) && (gstrBsAgent.indexOf("3.02") != -1));
  36.  
  37. var gbBsNS4            = ((gbBsNS) && (gnBsVer >= 4));
  38. var gbBsNS6            = ((gbBsNS) && (gnBsVer >= 5));
  39.  
  40. var gbBsIE4            = ((gbBsIE) && (gnBsVer >= 4));
  41. var gbBsIE5            = false;
  42. var gbBsIE55        = false;
  43.  
  44. gbBsIE = (navigator.appName.indexOf("Microsoft") != -1);
  45.  
  46. if (parseInt(navigator.appVersion) >= 4) {
  47.     gbBsIE4 = (navigator.appName.indexOf("Microsoft") != -1);
  48.  
  49.     if (gbBsIE4) {
  50.         var nPos = gstrBsAgent.indexOf("msie");
  51.         var strIEversion = gstrBsAgent.substring(nPos + 5);
  52.         var nVersion =  parseFloat(strIEversion);
  53.         if (nVersion >= 5)
  54.             gbBsIE5 = true;
  55.         if (nVersion >= 5.5)
  56.             gbBsIE55 = true;
  57.     }
  58. }
  59.  
  60. var gbBsMac            = (gstrBsAgent.indexOf('mac') != -1);
  61. var gbBsWindows        = ((gstrBsAgent.indexOf('win') != -1) || (gstrBsAgent.indexOf('16bit') != -1));
  62. var gbBsOp3            = (gstrBsAgent.indexOf('opera') != -1);
  63.  
  64. // Utilities functions.
  65. function BsscHasExtJs()
  66. {
  67.     if( gbBsIE3Before || gbBsNS3Before)
  68.         return false;
  69.     return true;
  70. }
  71.  
  72. // Register event handler
  73. var gBsOnLoads             = new Array();    // An array holds all the onload event handler.
  74. var gBsOnClicks         = new Array();    // An array holds all the onClick event handler.
  75. var gBsOnUnLoads         = new Array();    // An array holds all the OnUnLoad event handler.
  76. var gBsOnMouseOvers     = new Array();    // An array holds all the OnMouseOver event handler.
  77. var gBsOnMouseOuts         = new Array();    // An array holds all the OnMouseOut event handler.
  78.  
  79. var gbOrignalOnMouseDown = null;
  80.  
  81. function BsscRegisterOnLoad(funcHandler)
  82. {
  83.     var nLength = gBsOnLoads.length;
  84.     gBsOnLoads[nLength] = funcHandler;
  85. }
  86.  
  87. function BsscRegisterOnClick(funcHandler)
  88. {
  89.     var nLength = gBsOnClicks.length;
  90.     gBsOnClicks[nLength] = funcHandler;
  91. }
  92.  
  93. function BsscRegisterOnUnLoad(funcHandler)
  94. {
  95.     var nLength = gBsOnUnLoads.length;
  96.     gBsOnUnLoads[nLength] = funcHandler;
  97. }
  98.  
  99. function BsscRegisterOnMouseOver(funcHandler)
  100. {
  101.     var nLength = gBsOnMouseOvers.length;
  102.     gBsOnMouseOvers[nLength] = funcHandler;
  103. }
  104.  
  105. function BsscRegisterOnMouseOut(funcHandler)
  106. {
  107.     var nLength = gBsOnMouseOuts.length;
  108.     gBsOnMouseOuts[nLength] = funcHandler;
  109. }
  110.  
  111.  
  112. function BsGeneralOnLoad()
  113. {
  114.     if (!gbBsIE4 && !gbBsNS4)
  115.         return;
  116.  
  117.     // Make everything visible in navigator
  118.     if (gbBsNS4 && !gbBsNS6) {
  119.         // Make some special effects items visible
  120.         for (var iLayer = 0; iLayer < document.layers.length; iLayer++) {
  121.             document.layers[iLayer].visibility = "show";
  122.             document.layers[iLayer].left = 0;
  123.         }
  124.     }
  125. }
  126.  
  127. // If resize the netscape browser, need to reload it.
  128. function BsReDo()
  129. {
  130.   if (innerWidth != origWidth || innerHeight != origHeight)
  131.      location.reload();
  132. }
  133. // End of the local functions.
  134.  
  135. // The following functions are used by the html files.
  136. function BSSCOnLoad()
  137. {
  138.     if( !BsscHasExtJs() )
  139.         return;
  140.     for (var nElement = gBsOnLoads.length - 1; nElement >= 0; nElement--)
  141.         gBsOnLoads[nElement]();
  142. }
  143.  
  144. function BSSCOnClick()
  145. {
  146.     if (!BsscHasExtJs()) return;
  147.         
  148.     for (var nElement = gBsOnClicks.length - 1; nElement >= 0; nElement--)
  149.         gBsOnClicks[nElement]();
  150. }
  151.  
  152. function BSSCOnUnload()
  153. {
  154.     if (!BsscHasExtJs()) return;
  155.     for (var nElement = gBsOnUnLoads.length - 1; nElement >= 0; nElement--)
  156.     {
  157.         gBsOnUnLoads[nElement]();
  158.     }
  159. }
  160.  
  161. function BSSCOnMouseOver()
  162. {
  163.     if (!BsscHasExtJs()) return;
  164.     for (var nElement = gBsOnMouseOvers.length - 1; nElement >= 0; nElement--)
  165.     {
  166.         gBsOnMouseOvers[nElement]();
  167.     }
  168. }
  169.  
  170. function BSSCOnMouseOut()
  171. {
  172.     if (!BsscHasExtJs()) return;
  173.     for (var nElement = gBsOnMouseOuts.length - 1; nElement >= 0; nElement--)
  174.     {
  175.         gBsOnMouseOuts[nElement]();
  176.     }
  177. }
  178. // End of invocation of the event handle functions.
  179.  
  180.  
  181. // Add the GereralOnLoad to the onload array.
  182. if (typeof(BsscRegisterOnLoad) != "undefined")
  183. {
  184.     BsscRegisterOnLoad(BsGeneralOnLoad);
  185. }
  186. if (gbBsNS4) {
  187.     origWidth = innerWidth;
  188.     origHeight = innerHeight;
  189.     onresize = BsReDo;
  190. }
  191. //End to support previous generic parameters
  192.  
  193. //Begin to support previous HHActiveX invoking
  194. function BsHHActivateComponents()
  195. {
  196.     if( HH_ActiveX && (HH_ChmFilename != "") && ((self == top) || (self == top.frames[0])))
  197.     {
  198.         var objBody = document.all.tags("BODY")[0];
  199.         if( typeof(objBody) == "object" )
  200.         {
  201.             objBody.insertAdjacentHTML("beforeEnd", '<OBJECT ID="HHComponentActivator" CLASSID="CLSID:399CB6C4-7312-11D2-B4D9-00105A0422DF" width=0 height=0></OBJECT>');
  202.             if (HHComponentActivator.object)
  203.                 HHComponentActivator.Activate(HH_ChmFilename, HH_WindowName, HH_GlossaryFont, HH_Glossary, HH_Avenue);
  204.         }
  205.     }
  206. }
  207.  
  208. function BsHHActivXOnLoad()
  209. {    
  210.     if( gbBsIE4 )
  211.         BsHHActivateComponents(); 
  212. }
  213.  
  214. if( typeof(BsscRegisterOnLoad) != "undefined" )
  215. {
  216.     BsscRegisterOnLoad(BsHHActivXOnLoad);
  217. }
  218. //End to support previous HHActiveX invoking
  219.  
  220.  
  221. /// Section End - General (JavaScript 1.0)
  222.  
  223. /// Section Begin  - Popup and Related Topic (JavaScript 1.0)
  224.  
  225. //Begin to support previous popup functions
  226. //////////////////////////////////////////////////////////////////////////////////////////////
  227. //
  228. //    Begin DHTML Popup Functions
  229. //
  230. //////////////////////////////////////////////////////////////////////////////////////////////
  231. //variables used to isolate the browser type
  232. var gBsDoc            = null;            
  233. var gBsSty            = null;
  234. var gBsHtm            = null;
  235. var gBsStyVisShow    = null;
  236. var gBsStyVisHide    = null;
  237. var gBsClientWidth    = 640;
  238. var gBsClientHeight = 480;
  239. var gBsBrowser        = null;
  240.  
  241. // here is the varible for judge popup windows size. these parameter is for IE5.0, it may need adjust for others.
  242. var gBRateH_W        = 0.618; // 1.618 Golden cut.
  243. var gBMaxXOfParent    = 0.8; 
  244. var gBMaxYOfParent    = 0.8;
  245. var gBscrollHeight   = 16;
  246. var gBscrollWidth   =  16;
  247. var gBpermitXDelta    = 3;
  248. var gBpermitYDelta    = 3;
  249.  
  250.  
  251. var arrayPopupURL = new Array();
  252. var arrayAbsPopupURL = new Array();
  253.  
  254. var arrayDirty = new Array();
  255.  
  256. function setAbsPopupURL(nIndex, strURL)
  257. {
  258.     arrayAbsPopupURL[nIndex] = strURL;
  259. }
  260.  
  261. function getAbsPopupURL(nIndex)
  262. {
  263.     if (nIndex == -1 || arrayAbsPopupURL.length <= nIndex) return null;
  264.     else 
  265.         return arrayAbsPopupURL[nIndex];
  266. }
  267.  
  268. function getPopupURL(nIndex)
  269. {
  270.     if (nIndex == -1 || arrayPopupURL.length <= nIndex) return null;
  271.     else 
  272.         return arrayPopupURL[nIndex];
  273. }
  274.  
  275. function getPopupID(nIndex)
  276. {
  277.     return gstrPopupID + nIndex;
  278. }
  279.  
  280. function getPopupShadowID(nIndex)
  281. {
  282.     return gstrPopupShadowID + nIndex;
  283. }
  284.  
  285. function getPopupTopicID(nIndex)
  286. {
  287.     return gstrPopupTopicID + nIndex;
  288. }
  289.  
  290. function getPopupIFrameID(nIndex)
  291. {
  292.     return gstrPopupIFrameID + nIndex;
  293. }
  294.  
  295. function getPopupIFrameName(nIndex)
  296. {
  297.     return gstrPopupIFrameName + nIndex;
  298. }
  299.  
  300.  
  301. function getPopupTopicStyle(nIndex)
  302. {
  303.     return eval("document.all['" + getPopupTopicID(nIndex) + "']").style;
  304. }
  305.  
  306. function getPopupShadowStyle(nIndex)
  307. {
  308.     return eval("document.all['" + getPopupShadowID(nIndex) + "']").style;
  309. }
  310.  
  311. function getPopupIFrame(nIndex)
  312. {
  313.  
  314.     return eval("document.frames['" + getPopupIFrameName(nIndex) + "']");
  315. }
  316.  
  317. function getPopupDivStyle(nIndex)
  318. {
  319.     return eval("document.all['" + getPopupID(nIndex) + "']").style;
  320. }
  321.  
  322. function getPopupIFrameStyle(nIndex)
  323. {
  324.     return eval("document.all['" + getPopupIFrameName(nIndex) + "'].style");
  325. }
  326.  
  327.  
  328. function findDiv(strURL)
  329. {
  330.     var i = 0;
  331.     for (i = 0; i < arrayPopupURL.length; i ++ ) {
  332.         if (arrayPopupURL[i] == strURL) {
  333.             return i;
  334.         }
  335.     }
  336.     return -1;
  337. }
  338.  
  339. var gnToken = -1;
  340. function takeToken()
  341. {
  342.     gnToken ++;
  343.     if (gnToken > 10000) gnToken = 0;
  344.     return gnToken;
  345. }
  346.  
  347. function IsValidToken(nToken)
  348. {
  349.     return (gnToken == nToken);
  350. }
  351.  
  352. function addDiv(strURL)
  353. {
  354.     var i = 0; 
  355.     for (i = 0; i < arrayPopupURL.length; i ++) {
  356.         if (arrayPopupURL[i] == null) {
  357.             arrayPopupURL[i] = strURL;
  358.             return i;
  359.         }
  360.     }    
  361.     arrayPopupURL[i] = strURL;
  362.     arrayDirty[i] = true;
  363.     return i;
  364. }
  365.  
  366. function setDirty()
  367. {
  368.     var i = 0;
  369.     for (i = 0; i < arrayPopupURL.length; i ++ )
  370.         arrayDirty[i] = true;
  371. }
  372.  
  373. function IsDirty(nIndex)
  374. {
  375.     if (nIndex == -1)
  376.         return true;
  377.     else 
  378.         if (arrayDirty.length > nIndex) 
  379.             return arrayDirty[nIndex];
  380.         else
  381.             return true;
  382. }
  383.  
  384. function hideAll()
  385. {
  386.     var i = 0; 
  387.     for (i = 0; i < arrayPopupURL.length; i ++ )
  388.         getPopupDivStyle(i).visibility = gBsStyVisHide;
  389. }
  390.  
  391. function getCurrentPopupIFrame()
  392. {
  393.     var i = 0;
  394.     for (i = 0; i < arrayPopupURL.length; i ++)
  395.         if (getPopupDivStyle(i).visibility == gBsStyVisShow)
  396.             return getPopupIFrame(i);
  397.     return null;
  398. }
  399.  
  400. function setClear(nIndex)
  401. {
  402.     if (nIndex != -1)
  403.         arrayDirty[nIndex] = false;
  404. }
  405.  
  406. function _BSSCCreatePopupDiv(strURL)
  407. {
  408.     var nIndex = findDiv(strURL);
  409.     if (nIndex == -1 ) {
  410.         nIndex = addDiv(strURL);
  411.         BsPopup_CreateDiv(nIndex);
  412.     }
  413.     else {
  414.         if (IsDirty(nIndex)) {
  415.             if("object" == typeof(getPopupIFrame(nIndex).document))
  416.                 getPopupIFrame(nIndex).document.location.href = strURL;
  417.         }
  418.     }
  419.     return nIndex;
  420.  
  421. }
  422.  
  423. //the browser information itself
  424. function _BSPSBrowserItself()
  425. {
  426.     var agent  = navigator.userAgent.toLowerCase();
  427.     this.major = parseInt(navigator.appVersion);
  428.     this.minor = parseFloat(navigator.appVersion);
  429.     this.ns    = ((agent.indexOf('mozilla') != -1) && ((agent.indexOf('spoofer') == -1) && (agent.indexOf('compatible') == -1)));
  430.     this.ns2   = ((this.ns) && (this.major == 2));
  431.     this.ns3   = ((this.ns) && (this.major == 3));
  432.     this.ns4   = ((this.ns) && (this.major >= 4));
  433.     this.ns6   = ((this.ns) && (this.major >= 5));
  434.     this.ie       = (agent.indexOf("msie") != -1);
  435.     this.ie3   = ((this.ie) && (this.major == 2));
  436.     this.ie4   = ((this.ie) && (this.major >= 4));
  437.     this.op3   = (agent.indexOf("opera") != -1);
  438.  
  439.     if (this.ns4)
  440.     {
  441.         gBsDoc        = "document";
  442.         gBsSty        = "";
  443.         gBsHtm        = ".document";
  444.         gBsStyVisShow    = "show";
  445.         gBsStyVisHide    = "hide";
  446.  
  447.     }
  448.     else if (this.ie4)
  449.     {
  450.         gBsDoc         = "document.all";
  451.         gBsSty         = ".style";
  452.         gBsHtm         = "";
  453.         gBsStyVisShow    = "visible";
  454.         gBsStyVisHide    = "hidden";
  455.     }
  456. }
  457.  
  458. //Here is the browser type 
  459. function _BSPSGetBrowserInfo()
  460. {
  461.     gBsBrowser    = new _BSPSBrowserItself();
  462. }
  463.  
  464. //Get client size info
  465. function _BSPSGetClientSize()
  466. {
  467.     if (gBsBrowser.ns4)
  468.     {
  469.         gBsClientWidth    = innerWidth;
  470.         gBsClientHeight = innerHeight;
  471.  
  472.     }
  473.     else if (gBsBrowser.ie4)
  474.     {
  475.         gBsClientWidth    = document.body.clientWidth;
  476.         gBsClientHeight = document.body.clientHeight;
  477.     }
  478. }
  479.  
  480.  
  481. var gstrPopupID = 'BSSCPopup';
  482. var gstrPopupShadowID = 'BSSCPopupShadow';
  483. var gstrPopupTopicID = 'BSSCPopupTopic';
  484. var gstrPopupIFrameID = 'BSSCPopupIFrame';
  485. var gstrPopupIFrameName = 'BSSCPopupIFrameName';
  486.  
  487. var gstrPopupSecondWindowName = 'BSSCPopup';
  488.  
  489. var gPopupWindow = null;
  490. var gnPopupClickX = 0;
  491. var gnPopupClickY = 0;
  492.  
  493. var gnPopupScreenClickX = 0;
  494. var gnPopupScreenClickY = 0;
  495.  
  496. var gbPopupTimeoutExpired = false;
  497.  
  498.  
  499. function DHTMLPopupSupport()
  500. {
  501.     if ((gbBsIE4) && (!gbBsMac)) {
  502.         return true;
  503.     }
  504.     return false;
  505. }
  506.  
  507.  
  508.  
  509. function BSSCPopup_IsPopup()
  510. {
  511.     if (DHTMLPopupSupport() && (this.name.indexOf(gstrPopupIFrameName) != -1)) {
  512.         return true;
  513.     } else if ((gbBsNS4 || gbBsIE4) && (this.name.indexOf(gstrPopupID) != -1)) {
  514.         return true;
  515.     } else {
  516.         return false;
  517.     }
  518. }
  519.  
  520.  
  521. // If there is a hyperlink in a popup window, display the hyperlink in
  522. // the original window.
  523. if (BSSCPopup_IsPopup() && !gbBsIE4) {
  524.     document.write("<base target=\"_parent\">");
  525. }
  526.  
  527. // Local functions.
  528. function BsPopup_CreateDiv(nIndex)
  529. {
  530.     if(!DHTMLPopupSupport())
  531.         return;
  532.     // DO NOT SET Width and height for the div, otherwize it will make IE4 popup do not work when view the topic alone.
  533.     var strPopupDiv = "<DIV ID='" + getPopupID(nIndex) + "' STYLE='position:absolute; top:-100; left:0; z-index:600; visibility:hidden;'>";
  534.     strPopupDiv += "<DIV ID='" + getPopupShadowID(nIndex) + "' STYLE=\"position:absolute;top:0; left:0;  background-color:#C0C0C0;\"></DIV>";
  535.     strPopupDiv += "<DIV ID='" + getPopupTopicID(nIndex) + "' STYLE=\"position:absolute;top:0; left:0;  background-color:#FFFFFF;border:1px #000000 outset;\">";
  536.     strPopupDiv += "<IFRAME ID='" + getPopupIFrameID(nIndex) + "' name='" + getPopupIFrameName(nIndex) + "' src = '" + getPopupURL(nIndex) + "' frameborder=0 scrolling=auto></IFRAME>";
  537.     strPopupDiv += "</DIV></DIV>";
  538.  
  539.     var objBody = document.all.tags("BODY")[0];
  540.     if( typeof(objBody) != "object" )
  541.         return;
  542.  
  543.     objBody.insertAdjacentHTML("beforeEnd", strPopupDiv);
  544. }
  545.  
  546. function BSSCPopup_Timeout(nIndex, nToken)
  547. {
  548.     if (!IsValidToken(nToken)) return;
  549.  
  550.     if ((getPopupIFrame(nIndex).document.readyState == "complete") &&
  551.         (getPopupIFrame(nIndex).document.body != null)) {
  552.         window.getPopupDivStyle(nIndex).visibility = gBsStyVisShow;
  553.         setClear(nIndex);
  554.         window.gbPopupTimeoutExpired = true;
  555.  
  556.         BSSCPopup_ChangeTargettoParent(getPopupIFrame(nIndex).document);
  557.         getPopupIFrame(nIndex).document.body.onclick = BSSCPopupClicked;
  558.  
  559.         if (!gbOrignalOnMouseDown && document.onmousedown)
  560.             gbOrignalOnMouseDown = document.onmousedown;
  561.  
  562.         document.onmousedown = BSSCPopupParentClicked;
  563.  
  564.     } else {
  565.         setTimeout("BSSCPopup_Timeout(" + nIndex + "," + nToken + ")", 100);
  566.     }
  567. }
  568.  
  569.  
  570. // VH 08/10/00 
  571. // do not change target to parent if the href is using javascript
  572. function BSSCPopup_ChangeTargettoParent(tagsObject)
  573. {
  574.     var collA = tagsObject.all.tags("A");
  575.     BSSCPopup_ChangeTargettoParent2(collA);
  576.  
  577.     var collIMG = tagsObject.all.tags("IMG");
  578.     BSSCPopup_ChangeTargettoParent2(collIMG);
  579. }
  580.  
  581. function BSSCPopup_ChangeTargettoParent2(colls)
  582. {
  583.     var j = 0;
  584.     if (colls != null)  {
  585.         for (j = 0; j < colls.length; j ++ )
  586.         {
  587.             var strtemp = colls[j].href;
  588.             strtemp = strtemp.toLowerCase();
  589.             if (strtemp.indexOf("javascript:") == -1)
  590.             if (colls[j].target == "")
  591.                 colls[j].target = "_parent";
  592.         }
  593.  
  594.     }
  595. }
  596.  
  597. function BSPSPopupTopicWinHelp(strURL)
  598. {
  599.     _BSSCPopup(strURL);
  600.     return;
  601. }
  602.  
  603. function _BSSCPopup(strURL, width, height)
  604. {
  605.     var cuswidth = 0;
  606.     var cusheight = 0;
  607.     if ("undefined" != typeof(width) && "undefined" != typeof(height)) {
  608.         cuswidth = width;
  609.         cusheight= height;
  610.     }
  611.     
  612.     if (DHTMLPopupSupport()) {
  613.         // If we are already in a popup, replace the contents
  614.     //    if (BSSCPopup_IsPopup()) {
  615.     //        parent._BSSCPopup(strURL, cuswidth, cusheight);
  616.     //    } else {
  617.             var nToken = takeToken(); // take  token first.
  618.             var nIndex = _BSSCCreatePopupDiv(strURL);
  619.             window.gbPopupTimeoutExpired = false;
  620.             var ntWidth = gBsClientWidth;
  621.             var ntHeight = gBsClientHeight;
  622.             _BSPSGetClientSize();
  623.             if (ntWidth != gBsClientWidth || ntHeight != gBsClientHeight) {
  624.                 setDirty();
  625.             }
  626.  
  627.  
  628.             if (IsDirty(nIndex)) {
  629.                 if (gbBsMac) {
  630.                     setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight  +")", 400);
  631.                 } else {
  632.                     setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 100);
  633.                 }
  634.             }
  635.             else {
  636.                 MoveDivAndShow(nIndex ,nToken, cuswidth, cusheight);
  637.             }
  638.     //    }
  639.  
  640.     } else {
  641.         _BSSCPopup2(strURL, cuswidth, cusheight);
  642.     }
  643.     return;
  644. }
  645.  
  646. if (gbBsIE55)
  647. {
  648.     var ehlpdhtm_fOldBefureUnload = window.onbeforeunload;
  649.     window.onbeforeunload = window_BUnload;
  650. }
  651.     
  652. function window_BUnload()
  653. {
  654.     for (var i = 0; i < arrayPopupURL.length; i ++)
  655.         document.all(getPopupID(i)).outerHTML = "";
  656.     arrayPopupURL.length = 0;    
  657.     if (ehlpdhtm_fOldBefureUnload)
  658.         ehlpdhtm_fOldBefureUnload();
  659. }
  660.  
  661. function _BSSCPopup2(strURL, width, height)
  662. {
  663.     if (window.name == gstrPopupSecondWindowName) {
  664.         window.location = strURL;
  665.     } else {
  666.         if (!gbBsMac || !gBsBrowser.ns4) {
  667.             BSSCHidePopupWindow();
  668.         }
  669.         var nX = 0;
  670.         var nY = 0;
  671.         var nHeight = 300;
  672.         var nWidth = 400;
  673.         if (width > 0 && height > 0) {
  674.             nHeight = height;
  675.             nWidth = width;
  676.         }
  677.         _BSPSGetClientSize();
  678.  
  679.         nX = window.gnPopupScreenClickX;
  680.         nY = window.gnPopupScreenClickY;
  681.  
  682.         if (nY + nHeight + 40 > screen.availHeight) {
  683.             nY = screen.availHeight - nHeight - 40;
  684.         }
  685.         if (nX + nWidth + 40 > screen.availWidth) {
  686.             nX = screen.availWidth - nWidth - 40;
  687.         }
  688.         // Launch a separate window
  689.         var strParam = "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes";
  690.         if (gBsBrowser.ns) {
  691.             if (gBsBrowser.ns6) {
  692.                 strParam += ",Height=" + nHeight + ",Width=" + nWidth;
  693.                 strParam += ",screenX=" + nX + ",screenY=" + nY;
  694.             }
  695.             else {
  696.                 strParam += ",OuterHeight=" + nHeight + ",OuterWidth=" + nWidth;
  697.                 strParam += ",screenX=" + nX + ",screenY=" + nY;
  698.                 strParam += ",dependent=yes";
  699.             }
  700.         }
  701.         else {
  702.             strParam += ",height=" + nHeight + ",width=" + nWidth;
  703.             strParam += ",left=" + nX + ",top=" + nY;
  704.         }
  705.         window.gPopupWindow = window.open(strURL, gstrPopupSecondWindowName, strParam);
  706.  
  707.         if (gBsBrowser.ns4) {
  708.             window.gPopupWindow.captureEvents(Event.CLICK | Event.BLUE);
  709.             window.gPopupWindow.onclick = NonIEPopup_HandleClick;
  710.             window.gPopupWindow.onblur = NonIEPopup_HandleBlur;
  711.         }
  712.         else if (gBsBrowser.ie4)
  713.         {
  714.             setTimeout("setPopupFocus();", 100);
  715.         }
  716.     }
  717.     return;
  718. }
  719.  
  720. function setPopupFocus()
  721. {
  722.     window.gPopupWindow.focus();
  723. }
  724.  
  725. function NonIEPopup_HandleBlur(e)
  726. {
  727.     window.gPopupWindow.focus();
  728. }
  729.  
  730. function NonIEPopup_HandleClick(e)
  731. {
  732.     // Because navigator will give the event to the handler before the hyperlink, let's
  733.     // first route the event to see if we are clicking on a Popup menu in a popup.
  734.     document.routeEvent(e);
  735.  
  736.     // If a popup menu is active then don't do anything with the click
  737.     if (window.gPopupWindow.gbInPopupMenu) {
  738.         window.gPopupWindow.captureEvents(Event.CLICK);
  739.         window.gPopupWindow.onclick = NonIEPopup_HandleClick;
  740.         return false;
  741.     }
  742.  
  743.     // Close the popup window
  744.     if (e.target.href != null) {
  745.         if (e.target.target == "")
  746.             window.location.href = e.target.href;
  747.         else
  748.             window.open(e.target.href, e.target.target);
  749.             
  750.         if (e.target.href.indexOf("javascript:void(0)") == -1 && e.target.href.indexOf("javascript:null") == -1 && e.target.href.indexOf("BsscPopup") == -1) {
  751.             this.close();
  752.         }
  753.     } else {
  754.         this.close();
  755.     }
  756.     return false;
  757.  
  758. }
  759.  
  760. function BSSCPopup_AfterLoad(nIndex, nToken, cuswidth, cusheight)
  761. {    
  762.     if (typeof(window.getPopupIFrame(nIndex).document) == "unknown") {
  763.         _BSSCPopup2(getPopupURL(nIndex), cuswidth, cusheight);
  764.         return;
  765.     }
  766.     if (!IsValidToken(nToken)) return;
  767.  
  768.     if ((window.getPopupIFrame(nIndex).document.readyState == "complete") &&
  769.         (window.getPopupIFrame(nIndex).document.body != null)) {
  770.             if (window.getPopupIFrame(nIndex).document.location.href.indexOf("about:blank") != -1) { // add this check. IE will use about:blank" as the default vaule for Iframe.
  771.                 window.getPopupIFrame(nIndex).document.location = getPopupURL(nIndex);
  772.                 setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 200);
  773.             }
  774.             else
  775.                 {
  776.                     setAbsPopupURL(nIndex, window.getPopupIFrame(nIndex).document.location.href); // change URL to abs url.
  777.                     BSSCPopup_ResizeAfterLoad(nIndex, nToken, cuswidth, cusheight);
  778.                 }
  779.     } else {
  780.         setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 200);
  781.     }
  782. }
  783.  
  784.  
  785. function BSSCPopup_ResizeAfterLoad(nIndex, nToken, cuswidth, cusheight)
  786. {
  787.     if (window.gbPopupTimeoutExpired) return;
  788.  
  789.     if (!IsValidToken(nToken)) return;
  790.  
  791.     getPopupDivStyle(nIndex).visibility = gBsStyVisHide;
  792.  
  793.     // Determine the width and height for the window
  794.     //var size = new BSSCSize(0, 0);
  795.     //BSSCGetContentSize(window.getPopupIFrame(nIndex), size);
  796.     //var nWidth = size.x;
  797.     //var nHeight = size.y;
  798.  
  799.     _BSPSGetClientSize();
  800.     
  801.     var size = new BSSCSize(0, 0);
  802.  
  803.     if (cuswidth <= 0 || cusheight <= 0)
  804.         BSSCGetContentSize(window.getPopupIFrame(nIndex), size);
  805.     else {
  806.         size.x = cuswidth;
  807.         size.y = cusheight;
  808.     }
  809.  
  810.     // Determine the width and height for the window
  811.     var nWidth = size.x;
  812.     var nHeight = size.y;
  813.         
  814.     if (nWidth < 40 || nHeight < 40) return;  // there must be something terribly wrong.
  815.  
  816.     window.getPopupDivStyle(nIndex).pixelWidth = nWidth;
  817.     window.getPopupDivStyle(nIndex).pixelHeight = nHeight;
  818.  
  819.     window.getPopupShadowStyle(nIndex).pixelWidth = nWidth;
  820.     window.getPopupShadowStyle(nIndex).pixelHeight = nHeight;
  821.     window.getPopupTopicStyle(nIndex).pixelWidth = nWidth;
  822.     window.getPopupTopicStyle(nIndex).pixelHeight = nHeight;
  823.     if (gbBsIE55)
  824.     {
  825.         window.getPopupShadowStyle(nIndex).pixelWidth = nWidth + 2;
  826.         window.getPopupShadowStyle(nIndex).pixelHeight = nHeight + 2;
  827.         window.getPopupTopicStyle(nIndex).pixelWidth = nWidth + 2;
  828.         window.getPopupTopicStyle(nIndex).pixelHeight = nHeight + 2;
  829.     }
  830.  
  831.     window.getPopupIFrameStyle(nIndex).pixelWidth = nWidth;
  832.     window.getPopupIFrameStyle(nIndex).pixelHeight = nHeight;
  833.     if (gbBsIE55)
  834.     {
  835.         window.getPopupIFrameStyle(nIndex).top = 0;
  836.         window.getPopupIFrameStyle(nIndex).left = 0;
  837.     }
  838.     
  839.     var strURL = getPopupURL(nIndex);
  840.     if (strURL.indexOf("#") != -1)
  841.         getPopupIFrame(nIndex).location.href = strURL;  // reload again, this will fix the bookmark misunderstand in IE5.
  842.         
  843.     MoveDivAndShow(nIndex, nToken, cuswidth, cusheight);
  844. }
  845.  
  846. function MoveDivAndShow(nIndex, nToken, cuswidth, cusheight)
  847. {
  848.     if (window.getPopupIFrame(nIndex).document.location.href != getAbsPopupURL(nIndex)) { // if redirect, reload again.
  849.             window.getPopupIFrame(nIndex).document.location = getPopupURL(nIndex);
  850.             setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 200);
  851.             return;
  852.     }
  853.  
  854.     // Determine the position of the window
  855.     var nClickX = window.gnPopupClickX;
  856.     var nClickY = window.gnPopupClickY;
  857.     var nTop = 0;
  858.     var nLeft = 0;
  859.  
  860.     var nWidth = window.getPopupDivStyle(nIndex).pixelWidth;
  861.     var nHeight = window.getPopupDivStyle(nIndex).pixelHeight;
  862.  
  863.     if (nClickY + nHeight + 20 < gBsClientHeight + document.body.scrollTop) {
  864.         nTop = nClickY + 10;
  865.     } else {
  866.         nTop = (document.body.scrollTop + gBsClientHeight) - nHeight - 20;
  867.     }
  868.     if (nClickX + nWidth < gBsClientWidth + document.body.scrollLeft) {
  869.         nLeft = nClickX;
  870.     } else {
  871.         nLeft = (document.body.scrollLeft + gBsClientWidth) - nWidth - 8;
  872.     }
  873.     
  874.     if (nTop < document.body.scrollTop ) nTop  = document.body.scrollTop + 1;
  875.     if (nLeft< document.body.scrollLeft) nLeft = document.body.scrollLeft + 1;
  876.  
  877.  
  878.     window.getPopupDivStyle(nIndex).left = nLeft;
  879.     window.getPopupDivStyle(nIndex).top = nTop;
  880.  
  881.     // Set the location of the background blocks
  882.     window.getPopupShadowStyle(nIndex).left = 6;
  883.     window.getPopupShadowStyle(nIndex).top = 6;
  884.     if (gbBsIE55)
  885.     {
  886.         window.getPopupShadowStyle(nIndex).left = 4;
  887.         window.getPopupShadowStyle(nIndex).top = 4;
  888.     }
  889.  
  890.     if (gbBsMac) {
  891.         // Total hack on the iMac to get the IFrame to position properly
  892.         window.getPopupIFrameStyle(nIndex).pixelLeft = 100;
  893.         window.getPopupIFrameStyle(nIndex).pixelLeft = 0;
  894.         // Explicitly call BSSCOnLoad because the Mac doesn't seem to do it
  895.         window.getPopupIFrame(nIndex).window.BSSCOnLoad();
  896.     }
  897.  
  898.     BSSCPopup_Timeout(nIndex , nToken );
  899.     
  900.     return;
  901. }
  902.  
  903. function    BSSCSize(x, y)
  904. {
  905.     this.x = x;
  906.     this.y = y;
  907. }
  908.  
  909. function BSSCGetContentSize(thisWindow, size)
  910. {
  911.     if (!((gBsBrowser.ie4) || (gBsBrowser.ns4)))
  912.         return;
  913.  
  914.     if (gbBsMac) {
  915.         size.x = 300;
  916.         size.y = 300;
  917.         return;
  918.     }
  919.  
  920.     // Resize the width until it is wide enough to handle the content
  921.     // The trick is to start wide and determine when the scrollHeight changes
  922.     // because then we know a scrollbar is necessary. We can then go back
  923.     // to the next widest size (for no scrollbar)
  924.  
  925.     var ClientRate = gBsClientHeight / gBsClientWidth;
  926.  
  927.     var GoldenSize = new BSSCSize(0,0);
  928.     GoldenSize.x = gBsClientWidth * gBMaxXOfParent;
  929.     GoldenSize.y = gBsClientHeight *gBMaxYOfParent ;
  930.  
  931.     if (ClientRate > gBRateH_W) {
  932.         GoldenSize.y = GoldenSize.x * gBRateH_W;
  933.     }
  934.     else {
  935.         GoldenSize.x = GoldenSize.y / gBRateH_W;
  936.     }
  937.  
  938.     // Try to using parent specified max x.
  939.     var x = 0;
  940.     var maxgoldx = GoldenSize.x;
  941.     var maxx = gBsClientWidth * gBMaxXOfParent;
  942.     
  943.     // This double resize causes the document to re-render (and we need it to)
  944.     if (!gbBsIE5)
  945.         thisWindow.moveTo(10000,10000); // this is used to fix the flash on IE4.
  946.     thisWindow.resizeTo(1, 1);
  947.     thisWindow.resizeTo(1, 1);
  948.     thisWindow.resizeTo(maxgoldx, thisWindow.document.body.scrollHeight + gBscrollHeight);
  949.     thisWindow.resizeTo(maxgoldx, thisWindow.document.body.scrollHeight + gBscrollHeight);
  950.         
  951.     var miny = thisWindow.document.body.scrollHeight + gBscrollHeight;
  952.     
  953.     if (miny > GoldenSize.y) // the popup does not fix in the parent wanted golden area. so try to expand itself as large as it can
  954.     {
  955.         thisWindow.resizeTo(maxx , thisWindow.document.body.scrollHeight + gBscrollHeight);
  956.         thisWindow.resizeTo(maxx , thisWindow.document.body.scrollHeight + gBscrollHeight);
  957.         
  958.         miny =     thisWindow.document.body.scrollHeight + gBscrollHeight;
  959.         maxy = gBsClientHeight * gBMaxYOfParent;
  960.         
  961.         if (miny > maxy) { // the popup must have a scroll, OK let it be.
  962.             miny = maxy;
  963.             size.x = maxx;
  964.             size.y = maxy;
  965.             thisWindow.document.body.scroll = 'yes'; // At this time we do want to show scroll any more. so it will looks better a little.
  966.         }
  967.         else { // popup still can fit in the parent area by someway. now we choose the same h/w rate as parent.
  968.             size.y = miny;
  969.             
  970.             //  downsize from maxx , now I try to using binary divide.
  971.             x = maxx;
  972.             deltax = -maxx/2;
  973.             //j = 0;
  974.             while (true) {
  975.                 x = x + deltax;
  976.                 thisWindow.resizeTo(x, miny);
  977.                 thisWindow.resizeTo(x, miny);
  978.                 diffy = thisWindow.document.body.scrollHeight + gBscrollHeight - x * ClientRate;
  979.                 if (diffy >  gBpermitYDelta ) // it is higher than wanted, so x need to be wide a little bitter
  980.                     deltax = Math.abs(deltax) /2;
  981.                 else if (diffy <  -gBpermitYDelta) // it is shorter than wanted, so x need to be narrow a little bitter
  982.                     deltax = -Math.abs(deltax) /2;
  983.                 else 
  984.                     // the y is close enough to wanted.
  985.                     break;
  986.                 if (Math.abs(deltax) < gBpermitXDelta) // the next change is too slight and it can be ignore.
  987.                     break;
  988.             }
  989.             size.x = thisWindow.document.body.scrollWidth; //+ gBscrollWidth;
  990.             size.y = thisWindow.document.body.scrollHeight;// + gBscrollHeight;    
  991.             thisWindow.document.body.scroll = 'no'; // At this time we do not want to show scroll any more. so it will looks better a little.
  992.             
  993.         // Handle absurd cases just in case IE flakes
  994.     //        if (size.y < 100) {
  995.     //            size.y = 100;
  996.     //        }
  997.         }
  998.     }
  999.     else {
  1000.         // VH 08/06/00 . OK there is another case we did not check before.
  1001.         if (thisWindow.document.body.scrollWidth > maxgoldx) {
  1002.             size.x = maxx; 
  1003.             size.y = miny;    
  1004.             thisWindow.document.body.scroll = 'yes'; // At this time we do want to show scroll any more. so it will looks better a little.
  1005.         }
  1006.         else {
  1007.             //  downsize from maxgoldx , now I try to using binary divide.
  1008.             x = maxgoldx;
  1009.             deltax = -maxgoldx/2;
  1010.             //i = 0;
  1011.             while (true) {
  1012.                 x = x + deltax;
  1013.                 thisWindow.resizeTo(x, miny);
  1014.                 thisWindow.resizeTo(x, miny);
  1015.                 diffy = thisWindow.document.body.scrollHeight + gBscrollHeight - x * gBRateH_W;
  1016.                 if (diffy >  gBpermitYDelta ) // it is higher than wanted, so x need to be wide a little bitter
  1017.                     deltax = Math.abs(deltax) /2;
  1018.                 else if (diffy <  -gBpermitYDelta) // it is shorter than wanted, so x need to be narrow a little bitter
  1019.                     deltax = -Math.abs(deltax) /2;
  1020.                 else 
  1021.                     // the y is close enough to wanted.
  1022.                     break;
  1023.                 if (Math.abs(deltax) < gBpermitXDelta) // the next change is too slight and it can be ignore.
  1024.                     break;
  1025.                 //i ++;
  1026.                 
  1027.             }
  1028.             size.x = thisWindow.document.body.scrollWidth ;//+ gBscrollWidth;
  1029.             size.y = thisWindow.document.body.scrollHeight ;//+ gBscrollHeight;    
  1030.             thisWindow.document.body.scroll = 'no'; // At this time we do not want to show scroll any more. so it will looks better a little.
  1031.         }
  1032.     }
  1033.     
  1034.     // no reload no scrollbar.
  1035.     //size.x = size.x + 16;     //reserve a width for scrollbar (IE 4.0 only)
  1036.  
  1037.     thisWindow.resizeTo(size.x, size.y);
  1038.     thisWindow.resizeTo(size.x, size.y);
  1039.     return;
  1040. }
  1041.  
  1042.  
  1043.  
  1044. function BSSCPopupParentClicked()
  1045. {
  1046.     if (!window.gbPopupTimeoutExpired) {
  1047.         return false;
  1048.     }
  1049.     
  1050.     document.onmousedown = gbOrignalOnMouseDown;
  1051.  
  1052.     // Simply hide the popup
  1053.     hideAll();
  1054.  
  1055.     window.gbPopupTimeoutExpired = false;
  1056.  
  1057.     return true;
  1058. }
  1059.  
  1060.  
  1061. function BSSCPopupClicked()
  1062. {
  1063.     if (!window.gbPopupTimeoutExpired) {
  1064.         return false;
  1065.     }
  1066.  
  1067.  
  1068.     var popupIFrame = getCurrentPopupIFrame();
  1069.     if (popupIFrame == null) {
  1070.         return true;
  1071.     }
  1072.  
  1073. /*
  1074.     if ("undefined" != typeof(popupIFrame.gbInPopupMenu) &&
  1075.         popupIFrame.gbInPopupMenu) {
  1076.         return true;
  1077.     }*/
  1078.  
  1079.     if (!((popupIFrame.window.event != null) &&
  1080.         (popupIFrame.window.event.srcElement != null) &&
  1081.         ((popupIFrame.window.event.srcElement.tagName == "A") ||
  1082.         (popupIFrame.window.event.srcElement.tagName == "IMG")))) {
  1083.         document.onmousedown = gbOrignalOnMouseDown;
  1084.  
  1085.     // Simply hide the popup
  1086.         hideAll();
  1087.  
  1088.         window.gbPopupTimeoutExpired = false;
  1089.  
  1090.         return true;
  1091.     }
  1092. }
  1093.  
  1094.  
  1095. //trace the mouse over's position for hotspot
  1096. function  BSPSPopupOnMouseOver(event)
  1097. {
  1098.     if (gBsBrowser.ie4) {
  1099.         window.gnPopupClickX = event.clientX + document.body.scrollLeft;
  1100.         window.gnPopupClickY = event.clientY + document.body.scrollTop;
  1101.         window.gnPopupScreenClickX = event.screenX;
  1102.         window.gnPopupScreenClickY = event.screenY;
  1103.     } else if (gBsBrowser.ns4) {
  1104.         window.gnPopupClickX = event.pageX - window.pageXOffset;
  1105.         window.gnPopupClickY = event.pageY - window.pageYOffset;
  1106.         window.gnPopupScreenClickX = event.screenX - window.pageXOffset;
  1107.         window.gnPopupScreenClickY = event.screenY - window.pageYOffset;
  1108.     }
  1109. }
  1110.  
  1111.  
  1112. function BSSCHidePopupWindow()
  1113. {
  1114.     if (window.gPopupWindow != null) {
  1115.         if (gBsBrowser.ns4) {
  1116.             if ((typeof window.gPopupWindow != "undefined") && (!window.gPopupWindow.closed)) {
  1117.                 window.gPopupWindow.close();
  1118.                 window.gPopupWindow = null;
  1119.             }
  1120.         }
  1121.     }
  1122.  
  1123.     return;
  1124. }
  1125.  
  1126. // Add the PopupOnClick to the onclick array.
  1127. if (typeof(BsscRegisterOnClick) != "undefined")
  1128. {
  1129.     BsscRegisterOnClick(BsPopupOnClick);
  1130. }
  1131. //End to support previous popup functions
  1132.  
  1133. //Begin to support previous relative topics
  1134. //If webHelp needs Related Topics DHTMLcode, it's supposed to add it here
  1135. var gbPopupMenuTimeoutExpired = false;
  1136. var gbInPopupMenu = false;
  1137. var gbPopupMenuTopicList = null;
  1138. var gOlddocumentClick = null;
  1139.  
  1140. //////////////////////////////////////////////////////////////////////////////////////////
  1141. //
  1142. // Popup Menu code
  1143. //
  1144. //////////////////////////////////////////////////////////////////////////////////////////
  1145.  
  1146. var g_bIsPopupMenuInit = false;
  1147. function _WritePopupMenuLayer()
  1148. {
  1149.     if (!g_bIsPopupMenuInit)
  1150.         {
  1151.       if (gbBsNS4) {
  1152. //Do not try to write ininle styles for NS!  NS can not handle it and will not stop downloading the html page...
  1153.        if (gbBsNS6)
  1154.         document.write("<DIV ID='PopupMenu' STYLE='position:absolute; left:0px; top:0px; z-index:4; visibility:hidden;'></DIV>");
  1155.        else
  1156.            document.write("<DIV CLASS='WebHelpPopupMenu' ID='PopupMenu'></DIV>");
  1157.       } else{
  1158.       document.write("<DIV ID='PopupMenu' STYLE='position:absolute; left:0px; top:0px; z-index:4; visibility:hidden;'></DIV>");
  1159.       if (gbBsIE4) {
  1160.         document.write("<STYLE TYPE='text/css'>");
  1161.         if (gbBsMac) {
  1162.             document.write(".PopupOver {font-family:'Arial'; color:white; background:navy; font-size:10pt; text-decoration:none;}");
  1163.             document.write(".PopupNotOver {font-family:'Arial'; color:black; background:#c0c0c0; font-size:10pt; text-decoration:none;}");
  1164.         } else {
  1165.             document.write(".PopupOver {font-family:'Arial'; color:white; background:navy; font-size:8pt; text-decoration:none;}");
  1166.             document.write(".PopupNotOver {font-family:'Arial'; color:black; background:#c0c0c0; font-size:8pt; text-decoration:none;}");
  1167.         }
  1168.         document.write("</STYLE>");
  1169.        }
  1170.           }
  1171.       g_bIsPopupMenuInit = true;
  1172.     }
  1173. }
  1174.  
  1175. //Define variable arguments as: strTitle, strUrl
  1176. function MTE() 
  1177. {
  1178.     this.strTitle = MTE.arguments[0];
  1179.     if (MTE.arguments.length > 1)
  1180.         this.strURL = MTE.arguments[1];
  1181.     else
  1182.         this.strURL = this.strTitle;
  1183. }
  1184.  
  1185. // If the topic list is set, it is an array of TopicEntry objects (defined in WebHelp3.js)
  1186. function PopupMenu_SetTopicList(aPopupTopicArray)
  1187. {
  1188.     gbPopupMenuTopicList = aPopupTopicArray;
  1189. }
  1190.  
  1191.  
  1192. //Seek for the bsscright frame 
  1193. function _SeekFrameByName( cRoot, strName )
  1194. {
  1195.     if( cRoot == null )    return null;
  1196.     if( cRoot.frames == null )    return null;
  1197.     if( cRoot.frames[strName] != null )    return cRoot.frames[strName];
  1198.     for (var i=0; i<cRoot.frames.length; i++)
  1199.     {
  1200.         var cObj = null;
  1201.         if (!gbBsNS6) 
  1202.             cObj = _SeekFrameByName( cRoot.frames(i).document, strName );
  1203.         else
  1204.             cObj = _SeekFrameByName( cRoot.frames[i], strName );
  1205.         if( cObj != null )        return cObj;
  1206.     };
  1207.     return null;
  1208. }
  1209. function _GetFrameByName( cRoot, strName )
  1210. {
  1211.     if( cRoot == null )    return null;
  1212.     var cRet = _SeekFrameByName(cRoot, strName);
  1213.     if( cRet != null )    return cRet;
  1214.     if (cRoot.parent != cRoot)
  1215.         return _GetFrameByName( cRoot.parent, strName );
  1216.     else
  1217.         return null;
  1218. }
  1219.  
  1220. function _PopupMenu_Invoke(fn_arguments)
  1221. {
  1222.     // Make sure we have reasonable arguments
  1223.     var argLen = fn_arguments.length;
  1224.     if (argLen < 3) {
  1225.         return false;
  1226.     }
  1227.  
  1228.     // Check to see if we only have one target
  1229.     var strTarget = "";
  1230.     var targetDoc = null;
  1231.     if (fn_arguments[1] == '') {
  1232.         if (BSSCPopup_IsPopup()) {
  1233.             targetDoc = parent;
  1234.             strTarget = "TARGET= _parent";
  1235.         }
  1236.         else
  1237.             targetDoc = window.document;
  1238.     } else {
  1239.         targetDoc = _GetFrameByName( parent, fn_arguments[1] );
  1240.  
  1241.         strTarget = "TARGET='" + fn_arguments[1] + "'";
  1242.     }
  1243.  
  1244.     if ((!gbBsIE4 && !gbBsNS4) || ((gbBsMac) && (gbBsIE4) && (window.event.srcElement.tagName == "AREA"))) {
  1245.     
  1246.         var argLen     = fn_arguments.length;
  1247.  
  1248.         // Create the window that the hyperlinks will go into
  1249.         var nHeight = argLen * 15;
  1250.         var nWidth = 400;
  1251.         var strParam = "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=auto";
  1252.         strParam += ",height=" + nHeight + ",width=200";
  1253.         strParam += ",resizable";
  1254.  
  1255.         // Create a temporary window first to ensure the real popup comes up on top
  1256.         var wndTemp = window.open("", "temp", strParam);
  1257.  
  1258.         // Create the real popup window
  1259.         var wndPopupLinks = window.open("", "popuplinks", strParam);
  1260.  
  1261.         // Close the temporary
  1262.         wndTemp.close();
  1263.  
  1264.         wndPopupLinks.document.open("text/html");
  1265.         wndPopupLinks.document.write("<html><head></head>");
  1266.         wndPopupLinks.document.write("<body onBlur=\'self.focus();\'>");
  1267.         var strParaLine = "";
  1268.         for (var i = 0; i < (argLen - 2) / 2; i++) {
  1269.             strParaLine = "";
  1270.             strParaLine += "<a href=\"javascript:";
  1271.             if (gbBsIE) {
  1272.                 strParaLine += "onBlur=null; ";
  1273.             }
  1274.             strParaLine += "opener.location=\'";
  1275.             strParaLine += fn_arguments[2 * i + 3];
  1276.             strParaLine += "\';close();\"";
  1277.             strParaLine += strTarget;
  1278.  
  1279.             strParaLine += ">";
  1280.             strParaLine += fn_arguments[2 * i + 2];
  1281.             strParaLine += "</a>";
  1282.             strParaLine += "<br>";
  1283.             wndPopupLinks.document.write(strParaLine);
  1284.         }
  1285.         wndPopupLinks.document.write("</body></html>");
  1286.         wndPopupLinks.document.close();
  1287.         window.gbInPopupMenu = true;
  1288.         if (!gbBsIE) {
  1289.             wndPopupLinks.focus();
  1290.         }
  1291.  
  1292.         return false;
  1293.     }
  1294.  
  1295.  
  1296.     if (((argLen < 5) && ((isNaN(fn_arguments[2])) || (gbPopupMenuTopicList == null))) ||
  1297.         ((argLen < 4) && ((!isNaN(fn_arguments[2])) && (gbPopupMenuTopicList != null)))) {
  1298.         // Get the place that we will be putting the topic into
  1299.         var strURL = "";
  1300.         if (isNaN(fn_arguments[2]) ||  (gbPopupMenuTopicList == null)) {
  1301.             strURL = fn_arguments[3];
  1302.         }
  1303.         else     {
  1304.             strURL = gbPopupMenuTopicList[fn_arguments[2]].strURL;
  1305.         }
  1306.  
  1307.         if (targetDoc != null) {
  1308.             targetDoc.location.href = strURL;
  1309.         }
  1310.         else {
  1311.             if (fn_arguments[1] != null && typeof(fn_arguments[1]) != "undefined")
  1312.                 window.open(strURL, fn_arguments[1]);
  1313.             else
  1314.                 window.open(strURL);
  1315.         }        
  1316.         window.gbInPopupMenu = true;
  1317.         return false;
  1318.     }
  1319.     
  1320.     var strMenu = "";
  1321.     if (gbBsNS4) {
  1322.         strMenu = '<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=3 BGCOLOR="#c0c0c0">';
  1323.     } else {
  1324.         strMenu = '<TABLE STYLE="border:2px outset white;" CELLSPACING=0';
  1325.         if (gbBsMac) {
  1326.             strMenu += ' CELLPADDING=4';
  1327.         } else {
  1328.             strMenu += ' CELLPADDING=2';
  1329.         }    
  1330.         strMenu += ' BGCOLOR=#c0c0c0>';
  1331.     }
  1332.     // Add each of the items
  1333.     var i = 2;
  1334.     while (i <= argLen - 1) {
  1335.         strMenu += '<TR><TD><NOBR>'
  1336.         // If the destination is a number then look it up in the topic list
  1337.         if (isNaN(fn_arguments[i]) ||  (gbPopupMenuTopicList == null)) {
  1338.             strMenu += '<DIV STYLE="padding-left:3pt; padding-right:3pt;"><A HREF="' + fn_arguments[i + 1] + '"' + strTarget;
  1339.         } else {
  1340.             strMenu += '<DIV STYLE="padding-left:3pt; padding-right:3pt;"><A HREF="' + gbPopupMenuTopicList[fn_arguments[i]].strURL + '"' + strTarget;
  1341.         }
  1342.         strMenu += ' onclick="PopupMenu_HandleClick(event);"';
  1343.         strMenu += ' onmouseover="PopupMenu_Over(event);"';
  1344.         strMenu += ' onmouseout="PopupMenu_Out(event);"';
  1345.         strMenu += '>';
  1346.         if (isNaN(fn_arguments[i]) || (gbPopupMenuTopicList == null)) {
  1347.             strMenu += '<SPAN CLASS="PopupNotOver">' + fn_arguments[i] + '</SPAN>';
  1348.         } else {
  1349.             strMenu += '<SPAN CLASS="PopupNotOver">' + gbPopupMenuTopicList[fn_arguments[i]].strTitle + '</SPAN>';
  1350.         }
  1351.         strMenu += '</A></DIV></NOBR></TD></TR>';
  1352.  
  1353.         if (isNaN(fn_arguments[i]) || (gbPopupMenuTopicList == null)) {
  1354.             i += 2;
  1355.         } else {
  1356.             i += 1;
  1357.         }
  1358.     }
  1359.     strMenu += "</TABLE>";
  1360.  
  1361.     if (gbBsMac) {
  1362.     // totally hack. because ie5 in mac need something. </TABLE> is one of them. mac is mad.
  1363.         strMenu +="<TABLE></TABLE>";
  1364.     }
  1365.  
  1366.     var layerPopup = null;
  1367.     var stylePopup = null;
  1368.     var nEventX = 0;
  1369.     var nEventY = 0;
  1370.     var nWindowWidth = 0;
  1371.     if (gbBsIE4) {
  1372.  
  1373.         layerPopup = document.all["PopupMenu"];
  1374.         layerPopup.innerHTML = strMenu;
  1375.         stylePopup = layerPopup.style;
  1376.  
  1377.         _BSPSGetClientSize();
  1378.  
  1379.         // Get the position of the item causing the event (relative to its parent)
  1380.         nEventX = window.event.clientX;
  1381.         nEventY = window.event.clientY;
  1382.  
  1383.         if (nEventY + layerPopup.scrollHeight + 10 < gBsClientHeight) {
  1384.             nEventY += document.body.scrollTop + 10;
  1385.         } else {
  1386.             nEventY = (document.body.scrollTop + gBsClientHeight) - layerPopup.scrollHeight - 20;
  1387.         }
  1388.         stylePopup.top = nEventY;
  1389.         
  1390.         var nPopupWidth = layerPopup.scrollWidth;
  1391.         if (gbBsMac) {
  1392.             nPopupWidth = 80; // we have no idea how to get the dynamic width of the popup.
  1393.         }
  1394.         if (nEventX + nPopupWidth + 20 > gBsClientWidth) {
  1395.             if (gBsClientWidth - nPopupWidth < 5) {
  1396.                 stylePopup.left = 5;
  1397.             } else {
  1398.                 stylePopup.left = gBsClientWidth - nPopupWidth - 5;
  1399.             }
  1400.         } else {
  1401.             stylePopup.left = nEventX + document.body.scrollLeft + 20;
  1402.         }
  1403.  
  1404.         stylePopup.visibility = "visible";
  1405.         if (!gOlddocumentClick && document.onclick)
  1406.             gOlddocumentClick = document.onclick;
  1407.         document.onclick = PopupMenu_HandleClick;
  1408.  
  1409.     } else if (gbBsNS6) {
  1410.         layerPopup = document.getElementById("PopupMenu");
  1411.         layerPopup.style.visibility = "hidden";
  1412.     
  1413.         var e = fn_arguments[0];
  1414.         nEventX = e.pageX;
  1415.         nEventY = e.pageY;
  1416.         _BSPSGetClientSize();
  1417.         layerPopup.innerHTML = strMenu;
  1418.  
  1419.         if (nEventY + layerPopup.offsetHeight + 20  <  window.pageYOffset + gBsClientHeight) {
  1420.             nEventY += 20;
  1421.         } else {
  1422.             nEventY = gBsClientHeight + window.pageYOffset - layerPopup.offsetHeight - 20;
  1423.         }
  1424.  
  1425.         if (nEventX + layerPopup.offsetWidth + 20 > gBsClientWidth + window.pageXOffset) {
  1426.             if (gBsClientWidth + window.pageXOffset - layerPopup.offsetWidth < 20) {
  1427.                 nEventX = 5;
  1428.             } else {
  1429.                 nEventX = gBsClientWidth + window.pageXOffset - layerPopup.offsetWidth - 20;
  1430.             }
  1431.         } else {
  1432.             nEventX += 20;
  1433.         }
  1434.         layerPopup.style.top = nEventY;
  1435.         layerPopup.style.left = nEventX;
  1436.         // set again to avoid the stupid frash in netscape 6.
  1437.         layerPopup.innerHTML = strMenu;
  1438.         layerPopup.style.visibility = "visible";
  1439.         //window.captureEvents(Event.MOUSEDOWN);
  1440.         if (!gOlddocumentClick && document.onclick)
  1441.             gOlddocumentClick = document.onclick;
  1442.         window.onclick = PopupMenu_HandleClick;
  1443.     }
  1444.     else if (gbBsNS4) {
  1445.         layerPopup = document.layers.PopupMenu;
  1446.         layerPopup.visibility = "hide";
  1447.         stylePopup = layerPopup.document;
  1448.         stylePopup.write(strMenu);
  1449.         stylePopup.close();
  1450.         var e = fn_arguments[0];
  1451.         nEventX = e.pageX;
  1452.         nEventY = e.pageY;
  1453.         _BSPSGetClientSize();
  1454.         if (nEventY + layerPopup.clip.height + 20 < window.pageYOffset + gBsClientHeight) {
  1455.             nEventY += 20;
  1456.         } else {
  1457.             nEventY = gBsClientHeight + window.pageYOffset- layerPopup.clip.height - 20;
  1458.         }
  1459.         layerPopup.top = nEventY;
  1460.  
  1461.         if (nEventX + layerPopup.clip.width + 20 > gBsClientWidth + window.pageXOffset) {
  1462.             if (gBsClientWidth + window.pageXOffset - layerPopup.clip.width < 20) {
  1463.                 nEventX = 5;
  1464.             } else {
  1465.                 nEventX = gBsClientWidth + window.pageXOffset - layerPopup.clip.width - 20;
  1466.             }
  1467.         } else {
  1468.             nEventX += 20;
  1469.         }
  1470.  
  1471.         layerPopup.left = nEventX;
  1472.  
  1473.         layerPopup.visibility = "show";
  1474.  
  1475.         window.captureEvents(Event.MOUSEDOWN);
  1476.         if (!gOlddocumentClick && document.onmousedown)
  1477.             gOlddocumentClick = document.onmousedown;
  1478.         window.onmousedown = PopupMenu_HandleClick;
  1479.     }
  1480.  
  1481.     window.gbInPopupMenu = true;
  1482.     window.gbPopupMenuTimeoutExpired = false;
  1483.     setTimeout("PopupMenu_Timeout();", 100);
  1484.     return false;
  1485. }
  1486.  
  1487.  
  1488. function PopupMenu_Timeout()
  1489. {
  1490.     window.gbPopupMenuTimeoutExpired = true;
  1491. }
  1492.  
  1493. function PopupMenu_Over(e)
  1494. {
  1495.     if (gbBsIE4) {
  1496.         e.srcElement.className = "PopupOver";
  1497.     } else if (gbBsNS4) {
  1498. //        this.bgColor = "red";
  1499. //        e.target.document.className = "PopupOver";
  1500.     }
  1501.     return;
  1502. }
  1503.  
  1504. function PopupMenu_Out(e)
  1505. {
  1506.     if (gbBsIE4) {
  1507.         e.srcElement.className = "PopupNotOver";
  1508.     } else if (gbBsNS4) {
  1509.         this.bgColor = "#f0f0f0";
  1510.     }
  1511.     return;
  1512. }
  1513.  
  1514.  
  1515. function PopupMenu_HandleClick(e)
  1516. {
  1517.     if (window.gbPopupMenuTimeoutExpired) {
  1518.  
  1519.         window.gbInPopupMenu = false;
  1520.  
  1521.         if (gbBsNS4 && !gbBsNS6) {
  1522.             window.releaseEvents(Event.MOUSEDOWN);
  1523.         }
  1524.  
  1525.         var layerPopup = null;
  1526.         var stylePopup = null;
  1527.         if (gbBsIE4) {
  1528.             layerPopup = document.all["PopupMenu"];
  1529.             stylePopup = layerPopup.style;
  1530.             stylePopup.visibility = "hidden";
  1531.         } else if (gbBsNS6) {
  1532.             layerPopup = document.getElementById("PopupMenu");
  1533.             layerPopup.style.visibility = "hidden";
  1534.         } else if (gbBsNS4) {
  1535.             layerPopup = document.layers.PopupMenu;
  1536.             layerPopup.visibility = "hide";
  1537.         }
  1538.     
  1539.         if (gOlddocumentClick)
  1540.         {
  1541.             if (gbBsNS4 && !gbBsNS6)
  1542.                 document.onmousedown = gOlddocumentClick;
  1543.             else
  1544.                 document.onclick = gOlddocumentClick;
  1545.         }
  1546.     }
  1547.     return;
  1548. }
  1549.  
  1550. // This function should be deleted when all old projects are cleaned up
  1551. function BSPSWritePopupFrameForIE4()
  1552. {
  1553.     return false;
  1554. }
  1555.  
  1556. /////////////////////////////////////////////////////////////////////
  1557. function BSSCPopup_ClickMac()
  1558. {
  1559.     if ((!DHTMLPopupSupport()) && (gbBsIE4))
  1560.     {    
  1561.         var bClickOnAnchor = false;
  1562.         var el;
  1563.         if ((window.event != null) &&
  1564.             (window.event.srcElement != null))
  1565.         {
  1566.             el = window.event.srcElement;
  1567.             while (el != null)
  1568.             {
  1569.                 if ((el.tagName == "A") || (el.tagName == "AREA"))     {
  1570.                     bClickOnAnchor = true;
  1571.                     break;
  1572.                 }
  1573.                 if (el.tagName == "BODY") {
  1574.                     break;
  1575.                 }
  1576.                 el = el.parentElement;
  1577.             }
  1578.         }
  1579.         if (BSSCPopup_IsPopup())
  1580.         {
  1581.             if (!bClickOnAnchor) {
  1582.                 parent.window.gPopupWindow = null;
  1583.                 self.close();
  1584.             }
  1585.         }
  1586.         else
  1587.         {
  1588.             bClosePopupWindow = true;
  1589.             if ((bClickOnAnchor) &&
  1590.                 (el.href) &&
  1591.                 ((el.href.indexOf("javascript:BSSCPopup") != -1) || (el.href.indexOf("javascript:null") != -1) || (el.href.indexOf("javascript:void(0)") != -1)))
  1592.             {
  1593.                 bClosePopupWindow = false;
  1594.             }
  1595.             if (bClosePopupWindow)
  1596.             {
  1597.                 if (window.gPopupWindow != null && !window.gPopupWindow.closed )
  1598.                 {
  1599.                     window.gPopupWindow.close();
  1600.                 }
  1601.             }
  1602.         }
  1603.     }
  1604.  }
  1605.  
  1606. //////////////////////////////////////////////////////////////////////
  1607.  
  1608. _BSPSGetBrowserInfo();
  1609.  
  1610.  
  1611. function BsPopupOnClick()
  1612. {
  1613.     if (!gbBsIE4)
  1614.         return;
  1615.  
  1616.     BSSCPopup_ClickMac();
  1617. }
  1618.  
  1619. function _BSSCOnError(message)
  1620. {
  1621.     if(-1 != message.indexOf("denied") 
  1622.         || -1 != message.indexOf("Object required"))
  1623.      return true;
  1624. }
  1625.  
  1626. //End to support previous relative topics
  1627.  
  1628. /// Section End  - Popup and Related Topic (JavaScript 1.0)
  1629.  
  1630. /// Section Begin - Embedded Stub (JavaScript 1.0)
  1631.  
  1632. var s_strAgent = navigator.userAgent.toLowerCase();
  1633. var s_nVer       = parseInt(navigator.appVersion);
  1634.  
  1635. var s_bIE  = (s_strAgent.indexOf('msie') != -1);
  1636. var s_bNS  = (s_strAgent.indexOf('mozilla') != -1) && ((s_strAgent.indexOf('spoofer') == -1) && (s_strAgent.indexOf('compatible') == -1));
  1637. var s_bOpera    = (s_strAgent.indexOf('opera') != -1);
  1638.  
  1639. var s_bIE3Before = ((s_bIE) && (s_nVer <= 2));
  1640. var s_bNS3Before = ((s_bNS) && (s_nVer <= 3));
  1641.  
  1642. var s_bNS2        = ((s_bNS) && (s_nVer <= 2));
  1643. var s_bNS3        = ((s_bNS) && (s_nVer == 3));
  1644. var s_bIE300301    = ((s_bIE) && (s_nVer == 2) && ((s_strAgent.indexOf("3.00") != -1)||(s_strAgent.indexOf("3.0a") != -1)||(s_strAgent.indexOf("3.0b")!=-1)||(s_strAgent.indexOf("3.01")!=-1)));
  1645. var s_bIE302    = ((s_bIE) && (s_nVer == 2) && (s_strAgent.indexOf("3.02") != -1));
  1646.  
  1647.  
  1648. function HasExtJs()
  1649. {
  1650.     if (s_bIE3Before) { return false;}
  1651.     if (s_bNS3Before) {    return false;}
  1652.     if (typeof (BsGeneralOnLoad) == "undefined"){ return false; }
  1653.     return true;
  1654. }
  1655.  
  1656.  
  1657. function BSSCCreatePopupDiv()
  1658. {
  1659.     return;
  1660. }
  1661.  
  1662.  
  1663. function WritePopupMenuLayer()
  1664. {
  1665.     if (HasExtJs()) {_WritePopupMenuLayer();}
  1666. }
  1667.  
  1668. function BSSCPopup(strURL, width, height)
  1669. {
  1670.     if (HasExtJs())    { 
  1671.         _BSSCPopup(strURL, width, height);
  1672.     }else{
  1673.         //Create a temporary window first to ensure the real popup comes up on top
  1674.         var wndTemp = null;
  1675.         if (!s_bNS3) {
  1676.             wndTemp = window.open("", "temp", "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes,height=3,width=4");
  1677.         }
  1678.         // Create the real popup window
  1679.         var wndPopup = window.open(strURL, "BSSCPopup", "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes,height=300,width=400");
  1680.         // Close the temporary
  1681.         if (!s_bNS3) {
  1682.             wndTemp.close();
  1683.         } else {
  1684.             wndPopup.focus();
  1685.         }
  1686.     }
  1687. }
  1688.  
  1689. var gbWndTemp = null, gbWndPopupLinks = null;
  1690. var gbstrParaTotal = "";
  1691.  
  1692. function PopupMenu_Invoke()
  1693. {
  1694.     if (HasExtJs()) {
  1695.         return _PopupMenu_Invoke(PopupMenu_Invoke.arguments);
  1696.     }
  1697.     if (s_bNS3Before || s_bIE3Before )    {
  1698.         var argLen     = PopupMenu_Invoke.arguments.length;
  1699.         if (argLen < 5) {
  1700.             window.document.location.href = PopupMenu_Invoke.arguments[3];
  1701.             return false;
  1702.         }
  1703.         gbWndTemp = null;
  1704.         gbWndPopupLinks = null;
  1705.         gbstrParaTotal = "";
  1706.         for (var i = 0; i < (argLen - 2) / 2; i++) {
  1707.             var strParaLine = "";
  1708.             if (s_bNS2 || s_bOpera){
  1709.                 strParaLine += "<a href=\"";
  1710.                 strParaLine += PopupMenu_Invoke.arguments[2 * i + 3];
  1711.                 strParaLine += "\">"
  1712.                 strParaLine += PopupMenu_Invoke.arguments[2 * i + 2];
  1713.                 strParaLine += "</a>";
  1714.             } else {
  1715.                 strParaLine += "<a href=\"javascript:";
  1716.                 strParaLine += "gotoUrl(\'";
  1717.                 strParaLine += PopupMenu_Invoke.arguments[2 * i + 3];
  1718.                 strParaLine += "\');\"";
  1719.                 if (PopupMenu_Invoke.arguments[1] != '') {
  1720.                     strParaLine += " TARGET='" + PopupMenu_Invoke.arguments[1] + "'";
  1721.                 }
  1722.                 strParaLine += ">";
  1723.                 strParaLine += PopupMenu_Invoke.arguments[2 * i + 2];
  1724.                 strParaLine += "</a>";
  1725.             }
  1726.             strParaLine += "<br>";
  1727.             gbstrParaTotal += strParaLine;
  1728.         }
  1729.         var nHeight = argLen * 15;
  1730.         var nWidth = 400;
  1731.         var strParam = "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=auto";
  1732.         strParam += ",height=" + nHeight + ",width=200,resizable";
  1733.         
  1734.         //Create a temporary window first to ensure the real popup comes up on top
  1735.         //var wndTemp = null;
  1736.         if (!s_bNS3) {
  1737.             gbWndTemp = window.open("", "temp", "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes,height=3,width=4");
  1738.         } 
  1739.         gbWndPopupLinks = window.open("", "popuplinks", strParam);
  1740.  
  1741.         setTimeout("Wait_PopupMenuReady()", 100);
  1742.     }
  1743.     return true;
  1744. }
  1745.  
  1746. function Wait_PopupMenuReady() 
  1747. {
  1748.     if (gbWndPopupLinks != null && "object" == typeof(gbWndPopupLinks.document)) {
  1749.         PopupMenu_InvokeReady();
  1750.     }
  1751.     else 
  1752.         setTimeout("Wait_PopupMenuReady()", 100);
  1753. }
  1754.  
  1755.  
  1756. function PopupMenu_InvokeReady()
  1757. {
  1758.     if (gbWndPopupLinks != null) {
  1759.         gbWndPopupLinks.document.open("text/html");
  1760.         gbWndPopupLinks.document.write("<html><head>");
  1761.         if (s_bNS2 || s_bOpera) {
  1762.             gbWndPopupLinks.document.write("<base href=\"" + location +"\">");
  1763.         } else {
  1764.             //YJ: IE301,302 and NS3.x works fine
  1765.             gbWndPopupLinks.document.write("<");
  1766.             gbWndPopupLinks.document.write("script>");
  1767.             gbWndPopupLinks.document.write("function gotoUrl(aUrl) {opener.window.location=aUrl; close();}");
  1768.             gbWndPopupLinks.document.write("<");
  1769.             gbWndPopupLinks.document.write("/script>");
  1770.         }
  1771.         gbWndPopupLinks.document.write("</head><body onBlur=\'self.focus();\'>");
  1772.         gbWndPopupLinks.document.write(gbstrParaTotal);
  1773.         gbWndPopupLinks.document.write("</body></html>");
  1774.         gbWndPopupLinks.document.close();
  1775.  
  1776.         // Close the temporary
  1777.         if (!s_bNS3 && gbWndTemp != null) {
  1778.             gbWndTemp.close();
  1779.         }else {
  1780.             gbWndPopupLinks.focus();
  1781.         }
  1782.  
  1783.         return true;
  1784.     }
  1785.     return false;
  1786. }
  1787.  
  1788. /// Section End - Embedded Stub (JavaScript 1.0)
  1789.  
  1790. //// Segment End -- (JavaScript 1.0)
  1791.  
  1792.