home *** CD-ROM | disk | FTP | other *** search
/ 212.85.102.23 / 2014.12.212.85.102.23.tar / 212.85.102.23 / 5d2.rar / SOFTWARE / CWDVC / ENGLISH / CAMSETUI.chm / ehlpdhtm.js < prev    next >
Text File  |  2007-07-19  |  119KB  |  3,916 lines

  1. // eHelp« Corporation Dynamic HTML JavaScript 
  2. // Copyright⌐ 1998-2000 eHelp« Corporation.All rights reserved.
  3. // Version=4.45
  4.  
  5. // Warning:Do not modify this file.It is generated by RoboHELP« and changes will be overwritten.
  6.  
  7. //// Segment Begin -- (JavaScript 1.0)
  8. /// Section Begin - General (JavaScript 1.0)
  9.  
  10. //{{HH_SYMBOL_SECTION
  11. var HH_ChmFilename = "";
  12. var HH_WindowName = "";
  13. var HH_GlossaryFont = "";
  14. var HH_Glossary = "";
  15. var HH_Avenue = "";
  16. var HH_ActiveX = false;
  17. //}}HH_SYMBOL_SECTION
  18.  
  19. //Begin to support previous generic parameters
  20. //Get the information about the browser.
  21. var gstrBsAgent     = navigator.userAgent.toLowerCase();
  22. var gnBsVer               = parseInt(navigator.appVersion);
  23.  
  24. var gbBsIE          = (gstrBsAgent.indexOf('msie') != -1);
  25. var gbBsNS          = (gstrBsAgent.indexOf('mozilla') != -1) && ((gstrBsAgent.indexOf('spoofer') == -1) && (gstrBsAgent.indexOf('compatible') == -1));
  26. var gbBsOpera        = (gstrBsAgent.indexOf('opera') != -1);
  27.  
  28. var gbBsIE3Before     = ((gbBsIE) && (gnBsVer <= 2));
  29. var gbBsNS3Before     = ((gbBsNS) && (gnBsVer <= 3));
  30.  
  31. var gbBsNS2            = ((gbBsNS) && (gnBsVer <= 2));
  32. var gbBsNS3            = ((gbBsNS) && (gnBsVer == 3));
  33. 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)));
  34. var gbBsIE302        = ((gbBsIE) && (gnBsVer == 2) && (gstrBsAgent.indexOf("3.02") != -1));
  35.  
  36. var gbBsNS4            = ((gbBsNS) && (gnBsVer >= 4));
  37. var gbBsIE4            = ((gbBsIE) && (gnBsVer >= 4));
  38. var gbBsIE5            = ((gbBsIE) && (gnBsVer >= 5));
  39. var gbBsIE55        = false;
  40.  
  41. gbBsIE = (navigator.appName.indexOf("Microsoft") != -1);
  42. if (parseInt(navigator.appVersion) >= 4) {
  43.  
  44.     gbBsIE4 = (navigator.appName.indexOf("Microsoft") != -1);
  45.  
  46.     if (gbBsIE4) {
  47.         if (gstrBsAgent.indexOf("msie 5.0") != -1) {
  48.             gbBsIE5 = true;
  49.         }
  50.         if (gstrBsAgent.indexOf("msie 5.5") != -1) { // curently IE 5.5 has some buggy stuff. we need do some remedy to our code.
  51.             gbBsIE55 = true;
  52.         }else{
  53.             gbBsIE55 = true;
  54.         }
  55.     }
  56. }
  57.  
  58. var gbBsMac            = (gstrBsAgent.indexOf('mac') != -1);
  59. var gbBsWindows        = ((gstrBsAgent.indexOf('win') != -1) || (gstrBsAgent.indexOf('16bit') != -1));
  60. var gbBsOp3            = (gstrBsAgent.indexOf('opera') != -1);
  61.  
  62. // Utilities functions.
  63. function BsscHasExtJs()
  64. {
  65.     if( gbBsIE3Before || gbBsNS3Before)
  66.         return false;
  67.     return true;
  68. }
  69.  
  70. // Register event handler
  71. var gBsOnLoads             = new Array();    // An array holds all the onload event handler.
  72. var gBsOnClicks         = new Array();    // An array holds all the onClick event handler.
  73. var gBsOnUnLoads         = new Array();    // An array holds all the OnUnLoad event handler.
  74. var gBsOnMouseOvers     = new Array();    // An array holds all the OnMouseOver event handler.
  75. var gBsOnMouseOuts         = new Array();    // An array holds all the OnMouseOut event handler.
  76.  
  77. var gbOrignalOnMouseDown = null;
  78.  
  79. function BsscRegisterOnLoad(funcHandler)
  80. {
  81.     var nLength = gBsOnLoads.length;
  82.     gBsOnLoads[nLength] = funcHandler;
  83. }
  84.  
  85. function BsscRegisterOnClick(funcHandler)
  86. {
  87.     var nLength = gBsOnClicks.length;
  88.     gBsOnClicks[nLength] = funcHandler;
  89. }
  90.  
  91. function BsscRegisterOnUnLoad(funcHandler)
  92. {
  93.     var nLength = gBsOnUnLoads.length;
  94.     gBsOnUnLoads[nLength] = funcHandler;
  95. }
  96.  
  97. function BsscRegisterOnMouseOver(funcHandler)
  98. {
  99.     var nLength = gBsOnMouseOvers.length;
  100.     gBsOnMouseOvers[nLength] = funcHandler;
  101. }
  102.  
  103. function BsscRegisterOnMouseOut(funcHandler)
  104. {
  105.     var nLength = gBsOnMouseOuts.length;
  106.     gBsOnMouseOuts[nLength] = funcHandler;
  107. }
  108.  
  109.  
  110. function BsGeneralOnLoad()
  111. {
  112.     if (!gbBsIE4 && !gbBsNS4)
  113.         return;
  114.  
  115.     // Make everything visible in navigator
  116.     if (gbBsNS4) {
  117.         // Make some special effects items visible
  118.         for (var iLayer = 0; iLayer < document.layers.length; iLayer++) {
  119.             document.layers[iLayer].visibility = "show";
  120.             document.layers[iLayer].left = 0;
  121.         }
  122.     }
  123. }
  124.  
  125. // If resize the netscape browser, need to reload it.
  126. function BsReDo()
  127. {
  128.   if (innerWidth != origWidth || innerHeight != origHeight)
  129.      location.reload();
  130. }
  131. // End of the local functions.
  132.  
  133. // The following functions are used by the html files.
  134. function BSSCOnLoad()
  135. {
  136.     if( !BsscHasExtJs() )
  137.         return;
  138.     for (var nElement = gBsOnLoads.length - 1; nElement >= 0; nElement--)
  139.         gBsOnLoads[nElement]();
  140. }
  141.  
  142. function BSSCOnClick()
  143. {
  144.     if (!BsscHasExtJs()) return;
  145.         
  146.     for (var nElement = gBsOnClicks.length - 1; nElement >= 0; nElement--)
  147.         gBsOnClicks[nElement]();
  148. }
  149.  
  150. function BSSCOnUnload()
  151. {
  152.     if (!BsscHasExtJs()) return;
  153.     for (var nElement = gBsOnUnLoads.length - 1; nElement >= 0; nElement--)
  154.     {
  155.         gBsOnUnLoads[nElement]();
  156.     }
  157. }
  158.  
  159. function BSSCOnMouseOver()
  160. {
  161.     if (!BsscHasExtJs()) return;
  162.     for (var nElement = gBsOnMouseOvers.length - 1; nElement >= 0; nElement--)
  163.     {
  164.         gBsOnMouseOvers[nElement]();
  165.     }
  166. }
  167.  
  168. function BSSCOnMouseOut()
  169. {
  170.     if (!BsscHasExtJs()) return;
  171.     for (var nElement = gBsOnMouseOuts.length - 1; nElement >= 0; nElement--)
  172.     {
  173.         gBsOnMouseOuts[nElement]();
  174.     }
  175. }
  176. // End of invocation of the event handle functions.
  177.  
  178.  
  179. // Add the GereralOnLoad to the onload array.
  180. if (typeof(BsscRegisterOnLoad) != "undefined")
  181. {
  182.     BsscRegisterOnLoad(BsGeneralOnLoad);
  183. }
  184.  
  185. if (gbBsNS4) {
  186.     origWidth = innerWidth;
  187.     origHeight = innerHeight;
  188.     onresize = BsReDo;
  189. }
  190. //End to support previous generic parameters
  191.  
  192. //Begin to support previous HHActiveX invoking
  193. function BsHHActivateComponents()
  194. {
  195.     if( HH_ActiveX && (HH_ChmFilename != "") && ((self == top) || (self == top.frames[0])))
  196.     {
  197.         var objBody = document.all.tags("BODY")[0];
  198.         if( typeof(objBody) == "object" )
  199.         {
  200.             objBody.insertAdjacentHTML("beforeEnd", '<OBJECT ID="HHComponentActivator" CLASSID="CLSID:399CB6C4-7312-11D2-B4D9-00105A0422DF" width=0 height=0></OBJECT>');
  201.             if (HHComponentActivator.object)
  202.                 HHComponentActivator.Activate(HH_ChmFilename, HH_WindowName, HH_GlossaryFont, HH_Glossary, HH_Avenue);
  203.         }
  204.     }
  205. }
  206.  
  207. function BsHHActivXOnLoad()
  208. {    
  209.     if( gbBsIE4 )
  210.         BsHHActivateComponents(); 
  211. }
  212.  
  213. if( typeof(BsscRegisterOnLoad) != "undefined" )
  214. {
  215.     BsscRegisterOnLoad(BsHHActivXOnLoad);
  216. }
  217. //End to support previous HHActiveX invoking
  218.  
  219.  
  220. /// Section End - General (JavaScript 1.0)
  221.  
  222. /// Section Begin  - Popup and Related Topic (JavaScript 1.0)
  223.  
  224. //Begin to support previous popup functions
  225. //////////////////////////////////////////////////////////////////////////////////////////////
  226. //
  227. //    Begin DHTML Popup Functions
  228. //
  229. //////////////////////////////////////////////////////////////////////////////////////////////
  230. //variables used to isolate the browser type
  231. var gBsDoc            = null;            
  232. var gBsSty            = null;
  233. var gBsHtm            = null;
  234. var gBsStyVisShow    = null;
  235. var gBsStyVisHide    = null;
  236. var gBsClientWidth    = 640;
  237. var gBsClientHeight = 480;
  238. var gBsBrowser        = null;
  239.  
  240. // here is the varible for judge popup windows size. these parameter is for IE5.0, it may need adjust for others.
  241. var gBRateH_W        = 0.618; // 1.618 Golden cut.
  242. var gBMaxXOfParent    = 0.8; 
  243. var gBMaxYOfParent    = 0.8;
  244. var gBscrollHeight   = 16;
  245. var gBscrollWidth   =  16;
  246. var gBpermitXDelta    = 3;
  247. var gBpermitYDelta    = 3;
  248.  
  249.  
  250. var arrayPopupURL = new Array();
  251. var arrayAbsPopupURL = new Array();
  252.  
  253. var arrayDirty = new Array();
  254.  
  255. function setAbsPopupURL(nIndex, strURL)
  256. {
  257.     arrayAbsPopupURL[nIndex] = strURL;
  258. }
  259.  
  260. function getAbsPopupURL(nIndex)
  261. {
  262.     if (nIndex == -1 || arrayAbsPopupURL.length <= nIndex) return null;
  263.     else 
  264.         return arrayAbsPopupURL[nIndex];
  265. }
  266.  
  267. function getPopupURL(nIndex)
  268. {
  269.     if (nIndex == -1 || arrayPopupURL.length <= nIndex) return null;
  270.     else 
  271.         return arrayPopupURL[nIndex];
  272. }
  273.  
  274. function getPopupID(nIndex)
  275. {
  276.     return gstrPopupID + nIndex;
  277. }
  278.  
  279. function getPopupShadowID(nIndex)
  280. {
  281.     return gstrPopupShadowID + nIndex;
  282. }
  283.  
  284. function getPopupTopicID(nIndex)
  285. {
  286.     return gstrPopupTopicID + nIndex;
  287. }
  288.  
  289. function getPopupIFrameID(nIndex)
  290. {
  291.     return gstrPopupIFrameID + nIndex;
  292. }
  293.  
  294. function getPopupIFrameName(nIndex)
  295. {
  296.     return gstrPopupIFrameName + nIndex;
  297. }
  298.  
  299.  
  300. function getPopupTopicStyle(nIndex)
  301. {
  302.     return eval("document.all['" + getPopupTopicID(nIndex) + "']").style;
  303. }
  304.  
  305. function getPopupShadowStyle(nIndex)
  306. {
  307.     return eval("document.all['" + getPopupShadowID(nIndex) + "']").style;
  308. }
  309.  
  310. function getPopupIFrame(nIndex)
  311. {
  312.  
  313.     return eval("document.frames['" + getPopupIFrameName(nIndex) + "']");
  314. }
  315.  
  316. function getPopupDivStyle(nIndex)
  317. {
  318.     return eval("document.all['" + getPopupID(nIndex) + "']").style;
  319. }
  320.  
  321. function getPopupIFrameStyle(nIndex)
  322. {
  323.     return eval("document.all['" + getPopupIFrameName(nIndex) + "'].style");
  324. }
  325.  
  326.  
  327. function findDiv(strURL)
  328. {
  329.     var i = 0;
  330.     for (i = 0; i < arrayPopupURL.length; i ++ ) {
  331.         if (arrayPopupURL[i] == strURL) {
  332.             return i;
  333.         }
  334.     }
  335.     return -1;
  336. }
  337.  
  338. var gnToken = -1;
  339. function takeToken()
  340. {
  341.     gnToken ++;
  342.     if (gnToken > 10000) gnToken = 0;
  343.     return gnToken;
  344. }
  345.  
  346. function IsValidToken(nToken)
  347. {
  348.     return (gnToken == nToken);
  349. }
  350.  
  351. function addDiv(strURL)
  352. {
  353.     var i = 0; 
  354.     for (i = 0; i < arrayPopupURL.length; i ++) {
  355.         if (arrayPopupURL[i] == null) {
  356.             arrayPopupURL[i] = strURL;
  357.             return i;
  358.         }
  359.     }    
  360.     arrayPopupURL[i] = strURL;
  361.     arrayDirty[i] = true;
  362.     return i;
  363. }
  364.  
  365. function setDirty()
  366. {
  367.     var i = 0;
  368.     for (i = 0; i < arrayPopupURL.length; i ++ )
  369.         arrayDirty[i] = true;
  370. }
  371.  
  372. function IsDirty(nIndex)
  373. {
  374.     if (nIndex == -1)
  375.         return true;
  376.     else 
  377.         if (arrayDirty.length > nIndex) 
  378.             return arrayDirty[nIndex];
  379.         else
  380.             return true;
  381. }
  382.  
  383. function hideAll()
  384. {
  385.     var i = 0; 
  386.     for (i = 0; i < arrayPopupURL.length; i ++ )
  387.         getPopupDivStyle(i).visibility = gBsStyVisHide;
  388. }
  389.  
  390. function getCurrentPopupIFrame()
  391. {
  392.     var i = 0;
  393.     for (i = 0; i < arrayPopupURL.length; i ++)
  394.         if (getPopupDivStyle(i).visibility == gBsStyVisShow)
  395.             return getPopupIFrame(i);
  396.     return null;
  397. }
  398.  
  399. function setClear(nIndex)
  400. {
  401.     if (nIndex != -1)
  402.         arrayDirty[nIndex] = false;
  403. }
  404.  
  405. function _BSSCCreatePopupDiv(strURL)
  406. {
  407.     var nIndex = findDiv(strURL);
  408.     if (nIndex == -1 ) {
  409.         nIndex = addDiv(strURL);
  410.         BsPopup_CreateDiv(nIndex);
  411.     }
  412.     else {
  413.         if (IsDirty(nIndex)) {
  414.             if("object" == typeof(getPopupIFrame(nIndex).document))
  415.                 getPopupIFrame(nIndex).document.location.href = strURL;
  416.         }
  417.     }
  418.     return nIndex;
  419.  
  420. }
  421.  
  422. //the browser information itself
  423. function _BSPSBrowserItself()
  424. {
  425.     var agent  = navigator.userAgent.toLowerCase();
  426.     this.major = parseInt(navigator.appVersion);
  427.     this.minor = parseFloat(navigator.appVersion);
  428.     this.ns    = ((agent.indexOf('mozilla') != -1) && ((agent.indexOf('spoofer') == -1) && (agent.indexOf('compatible') == -1)));
  429.     this.ns2   = ((this.ns) && (this.major == 2));
  430.     this.ns3   = ((this.ns) && (this.major == 3));
  431.     this.ns4   = ((this.ns) && (this.major >= 4));
  432.     this.ie       = (agent.indexOf("msie") != -1);
  433.     this.ie3   = ((this.ie) && (this.major == 2));
  434.     this.ie4   = ((this.ie) && (this.major >= 4));
  435.     this.op3   = (agent.indexOf("opera") != -1);
  436.  
  437.     if (this.ns4)
  438.     {
  439.         gBsDoc        = "document";
  440.         gBsSty        = "";
  441.         gBsHtm        = ".document";
  442.         gBsStyVisShow    = "show";
  443.         gBsStyVisHide    = "hide";
  444.  
  445.     }
  446.     else if (this.ie4)
  447.     {
  448.         gBsDoc         = "document.all";
  449.         gBsSty         = ".style";
  450.         gBsHtm         = "";
  451.         gBsStyVisShow    = "visible";
  452.         gBsStyVisHide    = "hidden";
  453.     }
  454. }
  455.  
  456. //Here is the browser type 
  457. function _BSPSGetBrowserInfo()
  458. {
  459.     gBsBrowser    = new _BSPSBrowserItself();
  460. }
  461.  
  462. //Get client size info
  463. function _BSPSGetClientSize()
  464. {
  465.     if (gBsBrowser.ns4)
  466.     {
  467.         gBsClientWidth    = innerWidth;
  468.         gBsClientHeight = innerHeight;
  469.  
  470.     }
  471.     else if (gBsBrowser.ie4)
  472.     {
  473.         gBsClientWidth    = document.body.clientWidth;
  474.         gBsClientHeight = document.body.clientHeight;
  475.     }
  476. }
  477.  
  478.  
  479. var gstrPopupID = 'BSSCPopup';
  480. var gstrPopupShadowID = 'BSSCPopupShadow';
  481. var gstrPopupTopicID = 'BSSCPopupTopic';
  482. var gstrPopupIFrameID = 'BSSCPopupIFrame';
  483. var gstrPopupIFrameName = 'BSSCPopupIFrameName';
  484.  
  485. var gstrPopupSecondWindowName = 'BSSCPopup';
  486.  
  487. var gPopupWindow = null;
  488. var gnPopupClickX = 0;
  489. var gnPopupClickY = 0;
  490.  
  491. var gnPopupScreenClickX = 0;
  492. var gnPopupScreenClickY = 0;
  493.  
  494. var gbPopupTimeoutExpired = false;
  495.  
  496.  
  497. function DHTMLPopupSupport()
  498. {
  499.     if ((gbBsIE4) && (!gbBsMac)) {
  500.         return true;
  501.     }
  502.     return false;
  503. }
  504.  
  505.  
  506.  
  507. function BSSCPopup_IsPopup()
  508. {
  509.     if (DHTMLPopupSupport() && (this.name.indexOf(gstrPopupIFrameName) != -1)) {
  510.         return true;
  511.     } else if ((gbBsNS4 || gbBsIE4) && (this.name.indexOf(gstrPopupID) != -1)) {
  512.         return true;
  513.     } else {
  514.         return false;
  515.     }
  516. }
  517.  
  518.  
  519. // If there is a hyperlink in a popup window, display the hyperlink in
  520. // the original window.
  521. if (BSSCPopup_IsPopup() && !gbBsIE4) {
  522.     document.write("<base target=\"_parent\">");
  523. }
  524.  
  525. // Local functions.
  526. function BsPopup_CreateDiv(nIndex)
  527. {
  528.     if(!DHTMLPopupSupport())
  529.         return;
  530.     // DO NOT SET Width and height for the div, otherwize it will make IE4 popup do not work when view the topic alone.
  531.     var strPopupDiv = "<DIV ID='" + getPopupID(nIndex) + "' STYLE='position:absolute; top:-100; left:0; z-index:600; visibility:hidden;'>";
  532.     strPopupDiv += "<DIV ID='" + getPopupShadowID(nIndex) + "' STYLE=\"position:absolute;top:0; left:0;  background-color:#C0C0C0;\"></DIV>";
  533.     strPopupDiv += "<DIV ID='" + getPopupTopicID(nIndex) + "' STYLE=\"position:absolute;top:0; left:0;  background-color:#FFFFFF;border:1px #000000 outset;\">";
  534.     strPopupDiv += "<IFRAME ID='" + getPopupIFrameID(nIndex) + "' name='" + getPopupIFrameName(nIndex) + "' src = '" + getPopupURL(nIndex) + "' frameborder=0 scrolling=auto></IFRAME>";
  535.     strPopupDiv += "</DIV></DIV>";
  536.  
  537.     var objBody = document.all.tags("BODY")[0];
  538.     if( typeof(objBody) != "object" )
  539.         return;
  540.  
  541.     objBody.insertAdjacentHTML("beforeEnd", strPopupDiv);
  542. }
  543.  
  544. function BSSCPopup_Timeout(nIndex, nToken)
  545. {
  546.     if (!IsValidToken(nToken)) return;
  547.  
  548.     if ((getPopupIFrame(nIndex).document.readyState == "complete") &&
  549.         (getPopupIFrame(nIndex).document.body != null)) {
  550.         window.getPopupDivStyle(nIndex).visibility = gBsStyVisShow;
  551.         setClear(nIndex);
  552.         window.gbPopupTimeoutExpired = true;
  553.  
  554.         BSSCPopup_ChangeTargettoParent(getPopupIFrame(nIndex).document);
  555.         getPopupIFrame(nIndex).document.body.onclick = BSSCPopupClicked;
  556.  
  557.         if (gbOrignalOnMouseDown == null)
  558.             gbOrignalOnMouseDown = document.onmousedown;
  559.  
  560.         document.onmousedown = BSSCPopupParentClicked;
  561.  
  562.     } else {
  563.         setTimeout("BSSCPopup_Timeout(" + nIndex + "," + nToken + ")", 100);
  564.     }
  565. }
  566.  
  567.  
  568. // VH 08/10/00 
  569. // do not change target to parent if the href is using javascript
  570. function BSSCPopup_ChangeTargettoParent(tagsObject)
  571. {
  572.     var collA = tagsObject.all.tags("A");
  573.     BSSCPopup_ChangeTargettoParent2(collA);
  574.  
  575.     var collIMG = tagsObject.all.tags("IMG");
  576.     BSSCPopup_ChangeTargettoParent2(collIMG);
  577. }
  578.  
  579. function BSSCPopup_ChangeTargettoParent2(colls)
  580. {
  581.     var j = 0;
  582.     if (colls != null)  {
  583.         for (j = 0; j < colls.length; j ++ )
  584.         {
  585.             var strtemp = colls[j].href;
  586.             strtemp = strtemp.toLowerCase();
  587.             if (strtemp.indexOf("javascript:") == -1)
  588.                 colls[j].target = "_parent";
  589.         }
  590.  
  591.     }
  592. }
  593.  
  594. function BSPSPopupTopicWinHelp(strURL)
  595. {
  596.     _BSSCPopup(strURL);
  597.     return;
  598. }
  599.  
  600. function _BSSCPopup(strURL, width, height)
  601. {
  602.     var cuswidth = 0;
  603.     var cusheight = 0;
  604.     if ("undefined" != typeof(width) && "undefined" != typeof(height)) {
  605.         cuswidth = width;
  606.         cusheight= height;
  607.     }
  608.     
  609.     if (DHTMLPopupSupport()) {
  610.         // If we are already in a popup, replace the contents
  611.     //    if (BSSCPopup_IsPopup()) {
  612.     //        parent._BSSCPopup(strURL, cuswidth, cusheight);
  613.     //    } else {
  614.             var nToken = takeToken(); // take  token first.
  615.             var nIndex = _BSSCCreatePopupDiv(strURL);
  616.             window.gbPopupTimeoutExpired = false;
  617.             var ntWidth = gBsClientWidth;
  618.             var ntHeight = gBsClientHeight;
  619.             _BSPSGetClientSize();
  620.             if (ntWidth != gBsClientWidth || ntHeight != gBsClientHeight) {
  621.                 setDirty();
  622.             }
  623.  
  624.  
  625.             if (IsDirty(nIndex)) {
  626.                 if (gbBsMac) {
  627.                     setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight  +")", 400);
  628.                 } else {
  629.                     setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 100);
  630.                 }
  631.             }
  632.             else {
  633.                 MoveDivAndShow(nIndex ,nToken, cuswidth, cusheight);
  634.             }
  635.     //    }
  636.  
  637.     } else {
  638.         _BSSCPopup2(strURL, cuswidth, cusheight);
  639.     }
  640.     return;
  641. }
  642.  
  643.  
  644. function _BSSCPopup2(strURL, width, height)
  645. {
  646.     if (window.name == gstrPopupSecondWindowName) {
  647.         window.location = strURL;
  648.     } else {
  649.         if (!gbBsMac || !gBsBrowser.ns4) {
  650.             BSSCHidePopupWindow();
  651.         }
  652.         var nX = 0;
  653.         var nY = 0;
  654.         var nHeight = 300;
  655.         var nWidth = 400;
  656.         if (width > 0 && height > 0) {
  657.             nHeight = height;
  658.             nWidth = width;
  659.         }
  660.         _BSPSGetClientSize();
  661.  
  662.         nX = window.gnPopupScreenClickX;
  663.         nY = window.gnPopupScreenClickY;
  664.  
  665.         if (nY + nHeight + 40 > screen.availHeight) {
  666.             nY = screen.availHeight - nHeight - 40;
  667.         }
  668.         if (nX + nWidth + 40 > screen.availWidth) {
  669.             nX = screen.availWidth - nWidth - 40;
  670.         }
  671.         // Launch a separate window
  672.         var strParam = "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes";
  673.         if (gBsBrowser.ns) {
  674.             strParam += ",OuterHeight=" + nHeight + ",OuterWidth=" + nWidth;
  675.             strParam += ",screenX=" + nX + ",screenY=" + nY;
  676.             strParam += ",dependent=yes";
  677.         }
  678.         else {
  679.             strParam += ",height=" + nHeight + ",width=" + nWidth;
  680.             strParam += ",left=" + nX + ",top=" + nY;
  681.         }
  682.         window.gPopupWindow = window.open(strURL, gstrPopupSecondWindowName, strParam);
  683.         if (gBsBrowser.ns4) {
  684.             window.gPopupWindow.captureEvents(Event.CLICK | Event.BLUE);
  685.             window.gPopupWindow.onclick = NonIEPopup_HandleClick;
  686.             window.gPopupWindow.onblur = NonIEPopup_HandleBlur;
  687.         }
  688.         else if (gBsBrowser.ie4)
  689.         {
  690.             setTimeout("setPopupFocus();", 100);
  691.         }
  692.     }
  693.     return;
  694. }
  695.  
  696. function setPopupFocus()
  697. {
  698.     window.gPopupWindow.focus();
  699. }
  700.  
  701. function NonIEPopup_HandleBlur(e)
  702. {
  703.     window.gPopupWindow.focus();
  704. }
  705.  
  706. function NonIEPopup_HandleClick(e)
  707. {
  708.     // Because navigator will give the event to the handler before the hyperlink, let's
  709.     // first route the event to see if we are clicking on a Popup menu in a popup.
  710.     document.routeEvent(e);
  711.  
  712.     // If a popup menu is active then don't do anything with the click
  713.     if (window.gPopupWindow.gbInPopupMenu) {
  714.         window.gPopupWindow.captureEvents(Event.CLICK);
  715.         window.gPopupWindow.onclick = NonIEPopup_HandleClick;
  716.         return false;
  717.     }
  718.  
  719.     // Close the popup window
  720.     if (e.target.href != null) {
  721.         window.location.href = e.target.href;
  722.         if (e.target.href.indexOf("javascript:void(0)") == -1 && e.target.href.indexOf("javascript:null") == -1 && e.target.href.indexOf("BsscPopup") == -1) {
  723.             this.close();
  724.         }
  725.     } else {
  726.         this.close();
  727.     }
  728.     return false;
  729.  
  730. }
  731.  
  732. function BSSCPopup_AfterLoad(nIndex, nToken, cuswidth, cusheight)
  733. {    
  734.     if (typeof(window.getPopupIFrame(nIndex).document) == "unknown") {
  735.         _BSSCPopup2(getPopupURL(nIndex), cuswidth, cusheight);
  736.         return;
  737.     }
  738.     if (!IsValidToken(nToken)) return;
  739.  
  740.     if ((window.getPopupIFrame(nIndex).document.readyState == "complete") &&
  741.         (window.getPopupIFrame(nIndex).document.body != null)) {
  742.             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.
  743.                 window.getPopupIFrame(nIndex).document.location = getPopupURL(nIndex);
  744.                 setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 200);
  745.             }
  746.             else
  747.                 {
  748.  
  749.                     setAbsPopupURL(nIndex, window.getPopupIFrame(nIndex).document.location.href); // change URL to abs url.
  750.                     BSSCPopup_ResizeAfterLoad(nIndex, nToken, cuswidth, cusheight);
  751.                 }
  752.     } else {
  753.         setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 200);
  754.     }
  755. }
  756.  
  757.  
  758. function BSSCPopup_ResizeAfterLoad(nIndex, nToken, cuswidth, cusheight)
  759. {
  760.     if (window.gbPopupTimeoutExpired) return;
  761.  
  762.     if (!IsValidToken(nToken)) return;
  763.  
  764.     getPopupDivStyle(nIndex).visibility = gBsStyVisHide;
  765.  
  766.     // Determine the width and height for the window
  767.     //var size = new BSSCSize(0, 0);
  768.     //BSSCGetContentSize(window.getPopupIFrame(nIndex), size);
  769.     //var nWidth = size.x;
  770.     //var nHeight = size.y;
  771.  
  772.     _BSPSGetClientSize();
  773.     
  774.     var size = new BSSCSize(0, 0);
  775.  
  776.     if (cuswidth <= 0 || cusheight <= 0)
  777.         BSSCGetContentSize(window.getPopupIFrame(nIndex), size);
  778.     else {
  779.         size.x = cuswidth;
  780.         size.y = cusheight;
  781.     }
  782.  
  783.     // Determine the width and height for the window
  784.     var nWidth = size.x;
  785.     var nHeight = size.y;
  786.         
  787.     if (nWidth < 40 || nHeight < 40) return;  // there must be something terribly wrong.
  788.  
  789.     window.getPopupDivStyle(nIndex).pixelWidth = nWidth;
  790.     window.getPopupDivStyle(nIndex).pixelHeight = nHeight;
  791.  
  792.     window.getPopupShadowStyle(nIndex).pixelWidth = nWidth;
  793.     window.getPopupShadowStyle(nIndex).pixelHeight = nHeight;
  794.     window.getPopupTopicStyle(nIndex).pixelWidth = nWidth;
  795.     window.getPopupTopicStyle(nIndex).pixelHeight = nHeight;
  796.     if (gbBsIE55)
  797.     {
  798.         window.getPopupShadowStyle(nIndex).pixelWidth = nWidth + 2;
  799.         window.getPopupShadowStyle(nIndex).pixelHeight = nHeight + 2;
  800.         window.getPopupTopicStyle(nIndex).pixelWidth = nWidth + 2;
  801.         window.getPopupTopicStyle(nIndex).pixelHeight = nHeight + 2;
  802.     }
  803.  
  804.     window.getPopupIFrameStyle(nIndex).pixelWidth = nWidth;
  805.     window.getPopupIFrameStyle(nIndex).pixelHeight = nHeight;
  806.     if (gbBsIE55)
  807.     {
  808.         window.getPopupIFrameStyle(nIndex).top = 0;
  809.         window.getPopupIFrameStyle(nIndex).left = 0;
  810.     }
  811.     
  812.     var strURL = getPopupURL(nIndex);
  813.     if (strURL.indexOf("#") != -1)
  814.         getPopupIFrame(nIndex).location.href = strURL;  // reload again, this will fix the bookmark misunderstand in IE5.
  815.         
  816.     MoveDivAndShow(nIndex, nToken, cuswidth, cusheight);
  817. }
  818.  
  819. function MoveDivAndShow(nIndex, nToken, cuswidth, cusheight)
  820. {
  821.     if (window.getPopupIFrame(nIndex).document.location.href != getAbsPopupURL(nIndex)) { // if redirect, reload again.
  822.             window.getPopupIFrame(nIndex).document.location = getPopupURL(nIndex);
  823.             setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 200);
  824.             return;
  825.     }
  826.  
  827.     // Determine the position of the window
  828.     var nClickX = window.gnPopupClickX;
  829.     var nClickY = window.gnPopupClickY;
  830.     var nTop = 0;
  831.     var nLeft = 0;
  832.  
  833.     var nWidth = window.getPopupDivStyle(nIndex).pixelWidth;
  834.     var nHeight = window.getPopupDivStyle(nIndex).pixelHeight;
  835.  
  836.     if (nClickY + nHeight + 20 < gBsClientHeight + document.body.scrollTop) {
  837.         nTop = nClickY + 10;
  838.     } else {
  839.         nTop = (document.body.scrollTop + gBsClientHeight) - nHeight - 20;
  840.     }
  841.     if (nClickX + nWidth < gBsClientWidth + document.body.scrollLeft) {
  842.         nLeft = nClickX;
  843.     } else {
  844.         nLeft = (document.body.scrollLeft + gBsClientWidth) - nWidth - 8;
  845.     }
  846.     
  847.     if (nTop < document.body.scrollTop ) nTop  = document.body.scrollTop + 1;
  848.     if (nLeft< document.body.scrollLeft) nLeft = document.body.scrollLeft + 1;
  849.  
  850.  
  851.     window.getPopupDivStyle(nIndex).left = nLeft;
  852.     window.getPopupDivStyle(nIndex).top = nTop;
  853.  
  854.     // Set the location of the background blocks
  855.     window.getPopupShadowStyle(nIndex).left = 6;
  856.     window.getPopupShadowStyle(nIndex).top = 6;
  857.     if (gbBsIE55)
  858.     {
  859.         window.getPopupShadowStyle(nIndex).left = 4;
  860.         window.getPopupShadowStyle(nIndex).top = 4;
  861.     }
  862.  
  863.     if (gbBsMac) {
  864.         // Total hack on the iMac to get the IFrame to position properly
  865.         window.getPopupIFrameStyle(nIndex).pixelLeft = 100;
  866.         window.getPopupIFrameStyle(nIndex).pixelLeft = 0;
  867.         // Explicitly call BSSCOnLoad because the Mac doesn't seem to do it
  868.         window.getPopupIFrame(nIndex).window.BSSCOnLoad();
  869.     }
  870.  
  871.     BSSCPopup_Timeout(nIndex , nToken );
  872.     
  873.     return;
  874. }
  875.  
  876. function    BSSCSize(x, y)
  877. {
  878.     this.x = x;
  879.     this.y = y;
  880. }
  881.  
  882. function BSSCGetContentSize(thisWindow, size)
  883. {
  884.     if (!((gBsBrowser.ie4) || (gBsBrowser.ns4)))
  885.         return;
  886.  
  887.     if (gbBsMac) {
  888.         size.x = 300;
  889.         size.y = 300;
  890.         return;
  891.     }
  892.  
  893.     // Resize the width until it is wide enough to handle the content
  894.     // The trick is to start wide and determine when the scrollHeight changes
  895.     // because then we know a scrollbar is necessary. We can then go back
  896.     // to the next widest size (for no scrollbar)
  897.  
  898.     var ClientRate = gBsClientHeight / gBsClientWidth;
  899.  
  900.     var GoldenSize = new BSSCSize(0,0);
  901.     GoldenSize.x = gBsClientWidth * gBMaxXOfParent;
  902.     GoldenSize.y = gBsClientHeight *gBMaxYOfParent ;
  903.  
  904.     if (ClientRate > gBRateH_W) {
  905.         GoldenSize.y = GoldenSize.x * gBRateH_W;
  906.     }
  907.     else {
  908.         GoldenSize.x = GoldenSize.y / gBRateH_W;
  909.     }
  910.  
  911.     // Try to using parent specified max x.
  912.     var x = 0;
  913.     var maxgoldx = GoldenSize.x;
  914.     var maxx = gBsClientWidth * gBMaxXOfParent;
  915.     
  916.     // This double resize causes the document to re-render (and we need it to)
  917.     thisWindow.moveTo(10000,10000); // this is used to fix the flash on IE4.
  918.     thisWindow.resizeTo(1, 1);
  919.     thisWindow.resizeTo(1, 1);
  920.     thisWindow.resizeTo(maxgoldx, thisWindow.document.body.scrollHeight + gBscrollHeight);
  921.     thisWindow.resizeTo(maxgoldx, thisWindow.document.body.scrollHeight + gBscrollHeight);
  922.         
  923.     var miny = thisWindow.document.body.scrollHeight + gBscrollHeight;
  924.     
  925.     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
  926.     {
  927.         thisWindow.resizeTo(maxx , thisWindow.document.body.scrollHeight + gBscrollHeight);
  928.         thisWindow.resizeTo(maxx , thisWindow.document.body.scrollHeight + gBscrollHeight);
  929.         
  930.         miny =     thisWindow.document.body.scrollHeight + gBscrollHeight;
  931.         maxy = gBsClientHeight * gBMaxYOfParent;
  932.         
  933.         if (miny > maxy) { // the popup must have a scroll, OK let it be.
  934.             miny = maxy;
  935.             size.x = maxx;
  936.             size.y = maxy;
  937.             thisWindow.document.body.scroll = 'yes'; // At this time we do want to show scroll any more. so it will looks better a little.
  938.         }
  939.         else { // popup still can fit in the parent area by someway. now we choose the same h/w rate as parent.
  940.             size.y = miny;
  941.             
  942.             //  downsize from maxx , now I try to using binary divide.
  943.             x = maxx;
  944.             deltax = -maxx/2;
  945.             //j = 0;
  946.             while (true) {
  947.                 x = x + deltax;
  948.                 thisWindow.resizeTo(x, miny);
  949.                 thisWindow.resizeTo(x, miny);
  950.                 diffy = thisWindow.document.body.scrollHeight + gBscrollHeight - x * ClientRate;
  951.                 if (diffy >  gBpermitYDelta ) // it is higher than wanted, so x need to be wide a little bitter
  952.                     deltax = Math.abs(deltax) /2;
  953.                 else if (diffy <  -gBpermitYDelta) // it is shorter than wanted, so x need to be narrow a little bitter
  954.                     deltax = -Math.abs(deltax) /2;
  955.                 else 
  956.                     // the y is close enough to wanted.
  957.                     break;
  958.                 if (Math.abs(deltax) < gBpermitXDelta) // the next change is too slight and it can be ignore.
  959.                     break;
  960.             }
  961.             size.x = thisWindow.document.body.scrollWidth; //+ gBscrollWidth;
  962.             size.y = thisWindow.document.body.scrollHeight;// + gBscrollHeight;    
  963.             thisWindow.document.body.scroll = 'no'; // At this time we do not want to show scroll any more. so it will looks better a little.
  964.             
  965.         // Handle absurd cases just in case IE flakes
  966.     //        if (size.y < 100) {
  967.     //            size.y = 100;
  968.     //        }
  969.         }
  970.     }
  971.     else {
  972.         // VH 08/06/00 . OK there is another case we did not check before.
  973.         if (thisWindow.document.body.scrollWidth > maxgoldx) {
  974.             size.x = maxx; 
  975.             size.y = miny;    
  976.             thisWindow.document.body.scroll = 'yes'; // At this time we do want to show scroll any more. so it will looks better a little.
  977.         }
  978.         else {
  979.             //  downsize from maxgoldx , now I try to using binary divide.
  980.             x = maxgoldx;
  981.             deltax = -maxgoldx/2;
  982.             //i = 0;
  983.             while (true) {
  984.                 x = x + deltax;
  985.                 thisWindow.resizeTo(x, miny);
  986.                 thisWindow.resizeTo(x, miny);
  987.                 diffy = thisWindow.document.body.scrollHeight + gBscrollHeight - x * gBRateH_W;
  988.                 if (diffy >  gBpermitYDelta ) // it is higher than wanted, so x need to be wide a little bitter
  989.                     deltax = Math.abs(deltax) /2;
  990.                 else if (diffy <  -gBpermitYDelta) // it is shorter than wanted, so x need to be narrow a little bitter
  991.                     deltax = -Math.abs(deltax) /2;
  992.                 else 
  993.                     // the y is close enough to wanted.
  994.                     break;
  995.                 if (Math.abs(deltax) < gBpermitXDelta) // the next change is too slight and it can be ignore.
  996.                     break;
  997.                 //i ++;
  998.                 
  999.             }
  1000.             size.x = thisWindow.document.body.scrollWidth ;//+ gBscrollWidth;
  1001.             size.y = thisWindow.document.body.scrollHeight ;//+ gBscrollHeight;    
  1002.             thisWindow.document.body.scroll = 'no'; // At this time we do not want to show scroll any more. so it will looks better a little.
  1003.         }
  1004.     }
  1005.     
  1006.     // no reload no scrollbar.
  1007.     //size.x = size.x + 16;     //reserve a width for scrollbar (IE 4.0 only)
  1008.  
  1009.     thisWindow.resizeTo(size.x, size.y);
  1010.     thisWindow.resizeTo(size.x, size.y);
  1011.     return;
  1012. }
  1013.  
  1014.  
  1015.  
  1016. function BSSCPopupParentClicked()
  1017. {
  1018.     if (!window.gbPopupTimeoutExpired) {
  1019.         return false;
  1020.     }
  1021.     
  1022.     document.onmousedown = gbOrignalOnMouseDown;
  1023.  
  1024.     // Simply hide the popup
  1025.     hideAll();
  1026.  
  1027.     window.gbPopupTimeoutExpired = false;
  1028.  
  1029.     return true;
  1030. }
  1031.  
  1032.  
  1033. function BSSCPopupClicked()
  1034. {
  1035.     if (!window.gbPopupTimeoutExpired) {
  1036.         return false;
  1037.     }
  1038.  
  1039.  
  1040.     var popupIFrame = getCurrentPopupIFrame();
  1041.     if (popupIFrame == null) {
  1042.         return true;
  1043.     }
  1044.  
  1045. /*
  1046.     if ("undefined" != typeof(popupIFrame.gbInPopupMenu) &&
  1047.         popupIFrame.gbInPopupMenu) {
  1048.         return true;
  1049.     }*/
  1050.  
  1051.     if (!((popupIFrame.window.event != null) &&
  1052.         (popupIFrame.window.event.srcElement != null) &&
  1053.         ((popupIFrame.window.event.srcElement.tagName == "A") ||
  1054.         (popupIFrame.window.event.srcElement.tagName == "IMG")))) {
  1055.         document.onmousedown = gbOrignalOnMouseDown;
  1056.  
  1057.     // Simply hide the popup
  1058.         hideAll();
  1059.  
  1060.         window.gbPopupTimeoutExpired = false;
  1061.  
  1062.         return true;
  1063.     }
  1064. }
  1065.  
  1066.  
  1067. //trace the mouse over's position for hotspot
  1068. function  BSPSPopupOnMouseOver(event)
  1069. {
  1070.     if (gBsBrowser.ie4) {
  1071.         window.gnPopupClickX = event.clientX + document.body.scrollLeft;
  1072.         window.gnPopupClickY = event.clientY + document.body.scrollTop;
  1073.         window.gnPopupScreenClickX = event.screenX;
  1074.         window.gnPopupScreenClickY = event.screenY;
  1075.     } else if (gBsBrowser.ns4) {
  1076.         window.gnPopupClickX = event.pageX - window.pageXOffset;
  1077.         window.gnPopupClickY = event.pageY - window.pageYOffset;
  1078.         window.gnPopupScreenClickX = event.screenX - window.pageXOffset;
  1079.         window.gnPopupScreenClickY = event.screenY - window.pageYOffset;
  1080.     }
  1081. }
  1082.  
  1083.  
  1084. function BSSCHidePopupWindow()
  1085. {
  1086.     if (window.gPopupWindow != null) {
  1087.         if (gBsBrowser.ns4) {
  1088.             if ((typeof window.gPopupWindow != "undefined") && (!window.gPopupWindow.closed)) {
  1089.                 window.gPopupWindow.close();
  1090.                 window.gPopupWindow = null;
  1091.             }
  1092.         }
  1093.     }
  1094.  
  1095.     return;
  1096. }
  1097.  
  1098. // Add the PopupOnClick to the onclick array.
  1099. if (typeof(BsscRegisterOnClick) != "undefined")
  1100. {
  1101.     BsscRegisterOnClick(BsPopupOnClick);
  1102. }
  1103. //End to support previous popup functions
  1104.  
  1105. //Begin to support previous relative topics
  1106. //If webHelp needs Related Topics DHTMLcode, it's supposed to add it here
  1107. var gbPopupMenuTimeoutExpired = false;
  1108. var gbInPopupMenu = false;
  1109. var gbPopupMenuTopicList = null;
  1110.  
  1111. //////////////////////////////////////////////////////////////////////////////////////////
  1112. //
  1113. // Popup Menu code
  1114. //
  1115. //////////////////////////////////////////////////////////////////////////////////////////
  1116.  
  1117. var g_bIsPopupMenuInit = false;
  1118. function _WritePopupMenuLayer()
  1119. {
  1120.     if (!g_bIsPopupMenuInit)
  1121.         {
  1122.       if (gbBsNS4) {
  1123. //Do not try to write ininle styles for NS!  NS can not handle it and will not stop downloading the html page...
  1124.        document.write("<DIV CLASS='WebHelpPopupMenu' ID='PopupMenu'></DIV>");
  1125.       } else{
  1126.       document.write("<DIV ID='PopupMenu' STYLE='position:absolute; left:0px; top:0px; z-index:4; visibility:hidden;'></DIV>");
  1127.       if (gbBsIE4) {
  1128.         document.write("<STYLE TYPE='text/css'>");
  1129.         if (gbBsMac) {
  1130.             document.write(".PopupOver {font-family:'Arial'; color:white; background:navy; font-size:10pt; text-decoration:none;}");
  1131.             document.write(".PopupNotOver {font-family:'Arial'; color:black; background:#c0c0c0; font-size:10pt; text-decoration:none;}");
  1132.         } else {
  1133.             document.write(".PopupOver {font-family:'Arial'; color:white; background:navy; font-size:8pt; text-decoration:none;}");
  1134.             document.write(".PopupNotOver {font-family:'Arial'; color:black; background:#c0c0c0; font-size:8pt; text-decoration:none;}");
  1135.         }
  1136.         document.write("</STYLE>");
  1137.        }
  1138.           }
  1139.       g_bIsPopupMenuInit = true;
  1140.     }
  1141. }
  1142.  
  1143. //Define variable arguments as: strTitle, strUrl
  1144. function MTE() 
  1145. {
  1146.     this.strTitle = MTE.arguments[0];
  1147.     if (MTE.arguments.length > 1)
  1148.         this.strURL = MTE.arguments[1];
  1149.     else
  1150.         this.strURL = this.strTitle;
  1151. }
  1152.  
  1153. // If the topic list is set, it is an array of TopicEntry objects (defined in WebHelp3.js)
  1154. function PopupMenu_SetTopicList(aPopupTopicArray)
  1155. {
  1156.     gbPopupMenuTopicList = aPopupTopicArray;
  1157. }
  1158.  
  1159. //Seek for the bsscright frame 
  1160. function _SeekFrameByName( cRoot, strName )
  1161. {
  1162.     if( cRoot == null )    return null;
  1163.     if( cRoot.frames == null )    return null;
  1164.     if( cRoot.frames[strName] != null )    return cRoot.frames[strName];
  1165.     for (var i=0; i<cRoot.frames.length; i++)
  1166.     {
  1167.         var cObj = _SeekFrameByName( cRoot.frames(i).document, strName );
  1168.         if( cObj != null )        return cObj;
  1169.     };
  1170.     return null;
  1171. }
  1172. function _GetFrameByName( cRoot, strName )
  1173. {
  1174.     if( cRoot == null )    return null;
  1175.     var cRet = _SeekFrameByName(cRoot, strName);
  1176.     if( cRet != null )    return cRet;
  1177.     if (cRoot.parent != cRoot)
  1178.         return _GetFrameByName( cRoot.parent, strName );
  1179.     else
  1180.         return null;
  1181. }
  1182.  
  1183. //var gbOriPopupMenuClick = null;
  1184.  
  1185. function _PopupMenu_Invoke(fn_arguments)
  1186. {
  1187.     // Make sure we have reasonable arguments
  1188.     var argLen = fn_arguments.length;
  1189.     if (argLen < 3) {
  1190.         return false;
  1191.     }
  1192.  
  1193.     // Check to see if we only have one target
  1194.     var strTarget = "";
  1195.     var targetDoc = null;
  1196.     if (fn_arguments[1] == '') {
  1197.         if (BSSCPopup_IsPopup()) {
  1198.             targetDoc = parent;
  1199.             strTarget = "TARGET= _parent";
  1200.         }
  1201.         else
  1202.             targetDoc = window.document;
  1203.     } else {
  1204.         targetDoc = _GetFrameByName( parent, fn_arguments[1] );
  1205.  
  1206.         strTarget = "TARGET='" + fn_arguments[1] + "'";
  1207.     }
  1208.  
  1209.     if ((!gbBsIE4 && !gbBsNS4) || ((gbBsMac) && (gbBsIE4) && (window.event.srcElement.tagName == "AREA"))) {
  1210.     
  1211.         var argLen     = fn_arguments.length;
  1212.  
  1213.         // Create the window that the hyperlinks will go into
  1214.         var nHeight = argLen * 15;
  1215.         var nWidth = 400;
  1216.         var strParam = "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=auto";
  1217.         strParam += ",height=" + nHeight + ",width=200";
  1218.         strParam += ",resizable";
  1219.  
  1220.         // Create a temporary window first to ensure the real popup comes up on top
  1221.         var wndTemp = window.open("", "temp", strParam);
  1222.  
  1223.         // Create the real popup window
  1224.         var wndPopupLinks = window.open("", "popuplinks", strParam);
  1225.  
  1226.         // Close the temporary
  1227.         wndTemp.close();
  1228.  
  1229.         wndPopupLinks.document.open("text/html");
  1230.         wndPopupLinks.document.write("<html><head></head>");
  1231.         wndPopupLinks.document.write("<body onBlur=\'self.focus();\'>");
  1232.         var strParaLine = "";
  1233.         for (var i = 0; i < (argLen - 2) / 2; i++) {
  1234.             strParaLine = "";
  1235.             strParaLine += "<a href=\"javascript:";
  1236.             if (gbBsIE) {
  1237.                 strParaLine += "onBlur=null; ";
  1238.             }
  1239.             strParaLine += "opener.location=\'";
  1240.             strParaLine += fn_arguments[2 * i + 3];
  1241.             strParaLine += "\';close();\"";
  1242.             strParaLine += strTarget;
  1243.  
  1244.             strParaLine += ">";
  1245.             strParaLine += fn_arguments[2 * i + 2];
  1246.             strParaLine += "</a>";
  1247.             strParaLine += "<br>";
  1248.             wndPopupLinks.document.write(strParaLine);
  1249.         }
  1250.         wndPopupLinks.document.write("</body></html>");
  1251.         wndPopupLinks.document.close();
  1252.         window.gbInPopupMenu = true;
  1253.         if (!gbBsIE) {
  1254.             wndPopupLinks.focus();
  1255.         }
  1256.  
  1257.         return false;
  1258.     }
  1259.  
  1260.  
  1261.     if (((argLen < 5) && ((isNaN(fn_arguments[2])) || (gbPopupMenuTopicList == null))) ||
  1262.         ((argLen < 4) && ((!isNaN(fn_arguments[2])) && (gbPopupMenuTopicList != null)))) {
  1263.         // Get the place that we will be putting the topic into
  1264.         var strURL = "";
  1265.         if (isNaN(fn_arguments[2]) ||  (gbPopupMenuTopicList == null)) {
  1266.             strURL = fn_arguments[3];
  1267.         }
  1268.         else     {
  1269.             strURL = gbPopupMenuTopicList[fn_arguments[2]].strURL;
  1270.         }
  1271.  
  1272.         if (targetDoc != null) {
  1273.             targetDoc.location.href = strURL;
  1274.         }
  1275.         else {
  1276.             window.open(strURL);
  1277.         }        
  1278.         window.gbInPopupMenu = true;
  1279.         return false;
  1280.     }
  1281.     
  1282.     var strMenu = "";
  1283.     if (gbBsNS4) {
  1284.         strMenu = '<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=3 BGCOLOR="#c0c0c0">';
  1285.     } else {
  1286.         strMenu = '<TABLE STYLE="border:2px outset white;" CELLSPACING=0';
  1287.         if (gbBsMac) {
  1288.             strMenu += ' CELLPADDING=4';
  1289.         } else {
  1290.             strMenu += ' CELLPADDING=2';
  1291.         }    
  1292.         strMenu += ' BGCOLOR=#c0c0c0>';
  1293.     }
  1294.     // Add each of the items
  1295.     var i = 2;
  1296.     while (i <= argLen - 1) {
  1297.         strMenu += '<TR><TD><NOBR>'
  1298.         // If the destination is a number then look it up in the topic list
  1299.         if (isNaN(fn_arguments[i]) ||  (gbPopupMenuTopicList == null)) {
  1300.             strMenu += '<DIV STYLE="padding-left:3pt; padding-right:3pt;"><A HREF="' + fn_arguments[i + 1] + '"' + strTarget;
  1301.         } else {
  1302.             strMenu += '<DIV STYLE="padding-left:3pt; padding-right:3pt;"><A HREF="' + gbPopupMenuTopicList[fn_arguments[i]].strURL + '"' + strTarget;
  1303.         }
  1304.         strMenu += ' onclick="PopupMenu_HandleClick(event);"';
  1305.         strMenu += ' onmouseover="PopupMenu_Over(event);"';
  1306.         strMenu += ' onmouseout="PopupMenu_Out(event);"';
  1307.         strMenu += '>';
  1308.         if (isNaN(fn_arguments[i]) || (gbPopupMenuTopicList == null)) {
  1309.             strMenu += '<SPAN CLASS="PopupNotOver">' + fn_arguments[i] + '</SPAN>';
  1310.         } else {
  1311.             strMenu += '<SPAN CLASS="PopupNotOver">' + gbPopupMenuTopicList[fn_arguments[i]].strTitle + '</SPAN>';
  1312.         }
  1313.         strMenu += '</A></DIV></NOBR></TD></TR>';
  1314.  
  1315.         if (isNaN(fn_arguments[i]) || (gbPopupMenuTopicList == null)) {
  1316.             i += 2;
  1317.         } else {
  1318.             i += 1;
  1319.         }
  1320.     }
  1321.     strMenu += "</TABLE>";
  1322.  
  1323.     if (gbBsMac) {
  1324.     // totally hack. because ie5 in mac need something. </TABLE> is one of them. mac is mad.
  1325.         strMenu +="<TABLE></TABLE>";
  1326.     }
  1327.  
  1328.     var layerPopup = null;
  1329.     var stylePopup = null;
  1330.     var nEventX = 0;
  1331.     var nEventY = 0;
  1332.     var nWindowWidth = 0;
  1333.     if (gbBsIE4) {
  1334.  
  1335.         layerPopup = document.all["PopupMenu"];
  1336.         layerPopup.innerHTML = strMenu;
  1337.         stylePopup = layerPopup.style;
  1338.  
  1339.         _BSPSGetClientSize();
  1340.  
  1341.         // Get the position of the item causing the event (relative to its parent)
  1342.         nEventX = window.event.clientX;
  1343.         nEventY = window.event.clientY;
  1344.  
  1345.         if (nEventY + layerPopup.scrollHeight + 10 < gBsClientHeight) {
  1346.             nEventY += document.body.scrollTop + 10;
  1347.         } else {
  1348.             nEventY = (document.body.scrollTop + gBsClientHeight) - layerPopup.scrollHeight - 20;
  1349.         }
  1350.         stylePopup.top = nEventY;
  1351.         
  1352.         var nPopupWidth = layerPopup.scrollWidth;
  1353.         if (gbBsMac) {
  1354.             nPopupWidth = 80; // we have no idea how to get the dynamic width of the popup.
  1355.         }
  1356.         if (nEventX + nPopupWidth + 20 > gBsClientWidth) {
  1357.             if (gBsClientWidth - nPopupWidth < 5) {
  1358.                 stylePopup.left = 5;
  1359.             } else {
  1360.                 stylePopup.left = gBsClientWidth - nPopupWidth - 5;
  1361.             }
  1362.         } else {
  1363.             stylePopup.left = nEventX + document.body.scrollLeft + 20;
  1364.         }
  1365.  
  1366.         stylePopup.visibility = "visible";
  1367.         document.onclick = PopupMenu_HandleClick;
  1368.         
  1369.     } else if (gbBsNS4) {
  1370.         layerPopup = document.layers.PopupMenu;
  1371.         layerPopup.visibility = "hide";
  1372.         stylePopup = layerPopup.document;
  1373.         stylePopup.write(strMenu);
  1374.         stylePopup.close();
  1375.         var e = fn_arguments[0];
  1376.         nEventX = e.pageX;
  1377.         nEventY = e.pageY;
  1378.         _BSPSGetClientSize();
  1379.         if (nEventY + layerPopup.clip.height + 20 < window.pageYOffset + gBsClientHeight) {
  1380.             nEventY += 20;
  1381.         } else {
  1382.             nEventY = gBsClientHeight + window.pageYOffset- layerPopup.clip.height - 20;
  1383.         }
  1384.         layerPopup.top = nEventY;
  1385.  
  1386.         if (nEventX + layerPopup.clip.width + 20 > gBsClientWidth + window.pageXOffset) {
  1387.             if (gBsClientWidth + window.pageXOffset - layerPopup.clip.width < 20) {
  1388.                 nEventX = 5;
  1389.             } else {
  1390.                 nEventX = gBsClientWidth + window.pageXOffset - layerPopup.clip.width - 20;
  1391.             }
  1392.         } else {
  1393.             nEventX += 20;
  1394.         }
  1395.  
  1396.         layerPopup.left = nEventX;
  1397.  
  1398.         layerPopup.visibility = "show";
  1399.  
  1400. //        window.captureEvents(Event.CLICK | Event.MOUSEDOWN);
  1401.         window.captureEvents(Event.MOUSEDOWN);
  1402. //        window.onclick = PopupMenu_HandleClick;
  1403.         window.onmousedown = PopupMenu_HandleClick;
  1404.     }
  1405.  
  1406.     window.gbInPopupMenu = true;
  1407.     window.gbPopupMenuTimeoutExpired = false;
  1408.     setTimeout("PopupMenu_Timeout();", 100);
  1409.     return false;
  1410. }
  1411.  
  1412.  
  1413. function PopupMenu_Timeout()
  1414. {
  1415.     window.gbPopupMenuTimeoutExpired = true;
  1416. }
  1417.  
  1418. function PopupMenu_Over(e)
  1419. {
  1420.     if (gbBsIE4) {
  1421.         e.srcElement.className = "PopupOver";
  1422.     } else if (gbBsNS4) {
  1423. //        this.bgColor = "red";
  1424. //        e.target.document.className = "PopupOver";
  1425.     }
  1426.     return;
  1427. }
  1428.  
  1429. function PopupMenu_Out(e)
  1430. {
  1431.     if (gbBsIE4) {
  1432.         e.srcElement.className = "PopupNotOver";
  1433.     } else if (gbBsNS4) {
  1434.         this.bgColor = "#f0f0f0";
  1435.     }
  1436.     return;
  1437. }
  1438.  
  1439.  
  1440. function PopupMenu_HandleClick(e)
  1441. {
  1442.     if (!window.gbPopupMenuTimeoutExpired) {
  1443.         return;
  1444.     }
  1445.  
  1446.     window.gbInPopupMenu = false;
  1447.  
  1448.     if (gbBsNS4) {
  1449. //        window.releaseEvents(Event.CLICK);
  1450.         window.releaseEvents(Event.MOUSEDOWN);
  1451.     }
  1452.  
  1453.     var layerPopup = null;
  1454.     var stylePopup = null;
  1455.     if (gbBsIE4) {
  1456.         layerPopup = document.all["PopupMenu"];
  1457.         stylePopup = layerPopup.style;
  1458.         stylePopup.visibility = "hidden";
  1459.     } else if (gbBsNS4) {
  1460.         layerPopup = document.layers.PopupMenu;
  1461.         layerPopup.visibility = "hide";
  1462.     }
  1463.  
  1464. //    if (gbOriPopupMenuClick!= null)
  1465. //        document.onclick = gbOriPopupMenuClick;
  1466.  
  1467.     return;
  1468. }
  1469.  
  1470. // This function should be deleted when all old projects are cleaned up
  1471. function BSPSWritePopupFrameForIE4()
  1472. {
  1473.     return false;
  1474. }
  1475.  
  1476. /////////////////////////////////////////////////////////////////////
  1477. function BSSCPopup_ClickMac()
  1478. {
  1479.     if ((!DHTMLPopupSupport()) && (gbBsIE4))
  1480.     {    
  1481.         var bClickOnAnchor = false;
  1482.         var el;
  1483.         if ((window.event != null) &&
  1484.             (window.event.srcElement != null))
  1485.         {
  1486.             el = window.event.srcElement;
  1487.             while (el != null)
  1488.             {
  1489.                 if ((el.tagName == "A") || (el.tagName == "AREA"))     {
  1490.                     bClickOnAnchor = true;
  1491.                     break;
  1492.                 }
  1493.                 if (el.tagName == "BODY") {
  1494.                     break;
  1495.                 }
  1496.                 el = el.parentElement;
  1497.             }
  1498.         }
  1499.         if (BSSCPopup_IsPopup())
  1500.         {
  1501.             if (!bClickOnAnchor) {
  1502.                 parent.window.gPopupWindow = null;
  1503.                 self.close();
  1504.             }
  1505.         }
  1506.         else
  1507.         {
  1508.             bClosePopupWindow = true;
  1509.             if ((bClickOnAnchor) &&
  1510.                 (el.href) &&
  1511.                 ((el.href.indexOf("javascript:BSSCPopup") != -1) || (el.href.indexOf("javascript:null") != -1) || (el.href.indexOf("javascript:void(0)") != -1)))
  1512.             {
  1513.                 bClosePopupWindow = false;
  1514.             }
  1515.             if (bClosePopupWindow)
  1516.             {
  1517.                 if (window.gPopupWindow != null && !window.gPopupWindow.closed )
  1518.                 {
  1519.                     window.gPopupWindow.close();
  1520.                 }
  1521.             }
  1522.         }
  1523.     }
  1524.  }
  1525.  
  1526. //////////////////////////////////////////////////////////////////////
  1527.  
  1528. _BSPSGetBrowserInfo();
  1529.  
  1530.  
  1531. function BsPopupOnClick()
  1532. {
  1533.     if (!gbBsIE4)
  1534.         return;
  1535.  
  1536.     BSSCPopup_ClickMac();
  1537. }
  1538.  
  1539. function _BSSCOnError(message)
  1540. {
  1541.     if(-1 != message.indexOf("denied") 
  1542.         || -1 != message.indexOf("Object required"))
  1543.      return true;
  1544. }
  1545.  
  1546. //End to support previous relative topics
  1547.  
  1548. /// Section End  - Popup and Related Topic (JavaScript 1.0)
  1549.  
  1550. /// Section Begin - Embedded Stub (JavaScript 1.0)
  1551.  
  1552. var s_strAgent = navigator.userAgent.toLowerCase();
  1553. var s_nVer       = parseInt(navigator.appVersion);
  1554.  
  1555. var s_bIE  = (s_strAgent.indexOf('msie') != -1);
  1556. var s_bNS  = (s_strAgent.indexOf('mozilla') != -1) && ((s_strAgent.indexOf('spoofer') == -1) && (s_strAgent.indexOf('compatible') == -1));
  1557. var s_bOpera    = (s_strAgent.indexOf('opera') != -1);
  1558.  
  1559. var s_bIE3Before = ((s_bIE) && (s_nVer <= 2));
  1560. var s_bNS3Before = ((s_bNS) && (s_nVer <= 3));
  1561.  
  1562. var s_bNS2        = ((s_bNS) && (s_nVer <= 2));
  1563. var s_bNS3        = ((s_bNS) && (s_nVer == 3));
  1564. 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)));
  1565. var s_bIE302    = ((s_bIE) && (s_nVer == 2) && (s_strAgent.indexOf("3.02") != -1));
  1566.  
  1567.  
  1568. function HasExtJs()
  1569. {
  1570.     if (s_bIE3Before) { return false;}
  1571.     if (s_bNS3Before) {    return false;}
  1572.     if (typeof (BsGeneralOnLoad) == "undefined"){ return false; }
  1573.     return true;
  1574. }
  1575.  
  1576.  
  1577. function BSSCCreatePopupDiv()
  1578. {
  1579.     return;
  1580. }
  1581.  
  1582.  
  1583. function WritePopupMenuLayer()
  1584. {
  1585.     if (HasExtJs()) {_WritePopupMenuLayer();}
  1586. }
  1587.  
  1588. function BSSCPopup(strURL, width, height)
  1589. {
  1590.     if (HasExtJs())    { 
  1591.         _BSSCPopup(strURL, width, height);
  1592.     }else{
  1593.         //Create a temporary window first to ensure the real popup comes up on top
  1594.         var wndTemp = null;
  1595.         if (!s_bNS3) {
  1596.             wndTemp = window.open("", "temp", "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes,height=3,width=4");
  1597.         }
  1598.         // Create the real popup window
  1599.         var wndPopup = window.open(strURL, "BSSCPopup", "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes,height=300,width=400");
  1600.         // Close the temporary
  1601.         if (!s_bNS3) {
  1602.             wndTemp.close();
  1603.         } else {
  1604.             wndPopup.focus();
  1605.         }
  1606.     }
  1607. }
  1608.  
  1609. var gbWndTemp = null, gbWndPopupLinks = null;
  1610. var gbstrParaTotal = "";
  1611.  
  1612. function PopupMenu_Invoke()
  1613. {
  1614.     if (HasExtJs()) {
  1615.         return _PopupMenu_Invoke(PopupMenu_Invoke.arguments);
  1616.     }
  1617.     if (s_bNS3Before || s_bIE3Before )    {
  1618.         var argLen     = PopupMenu_Invoke.arguments.length;
  1619.         if (argLen < 5) {
  1620.             window.document.location.href = PopupMenu_Invoke.arguments[3];
  1621.             return false;
  1622.         }
  1623.         gbWndTemp = null;
  1624.         gbWndPopupLinks = null;
  1625.         gbstrParaTotal = "";
  1626.         for (var i = 0; i < (argLen - 2) / 2; i++) {
  1627.             var strParaLine = "";
  1628.             if (s_bNS2 || s_bOpera){
  1629.                 strParaLine += "<a href=\"";
  1630.                 strParaLine += PopupMenu_Invoke.arguments[2 * i + 3];
  1631.                 strParaLine += "\">"
  1632.                 strParaLine += PopupMenu_Invoke.arguments[2 * i + 2];
  1633.                 strParaLine += "</a>";
  1634.             } else {
  1635.                 strParaLine += "<a href=\"javascript:";
  1636.                 strParaLine += "gotoUrl(\'";
  1637.                 strParaLine += PopupMenu_Invoke.arguments[2 * i + 3];
  1638.                 strParaLine += "\');\"";
  1639.                 if (PopupMenu_Invoke.arguments[1] != '') {
  1640.                     strParaLine += " TARGET='" + PopupMenu_Invoke.arguments[1] + "'";
  1641.                 }
  1642.                 strParaLine += ">";
  1643.                 strParaLine += PopupMenu_Invoke.arguments[2 * i + 2];
  1644.                 strParaLine += "</a>";
  1645.             }
  1646.             strParaLine += "<br>";
  1647.             gbstrParaTotal += strParaLine;
  1648.         }
  1649.         var nHeight = argLen * 15;
  1650.         var nWidth = 400;
  1651.         var strParam = "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=auto";
  1652.         strParam += ",height=" + nHeight + ",width=200,resizable";
  1653.         
  1654.         //Create a temporary window first to ensure the real popup comes up on top
  1655.         //var wndTemp = null;
  1656.         if (!s_bNS3) {
  1657.             gbWndTemp = window.open("", "temp", "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes,height=3,width=4");
  1658.         } 
  1659.         gbWndPopupLinks = window.open("", "popuplinks", strParam);
  1660.  
  1661.         setTimeout("Wait_PopupMenuReady()", 100);
  1662.     }
  1663.     return true;
  1664. }
  1665.  
  1666. function Wait_PopupMenuReady() 
  1667. {
  1668.     if (gbWndPopupLinks != null && "object" == typeof(gbWndPopupLinks.document)) {
  1669.         PopupMenu_InvokeReady();
  1670.     }
  1671.     else 
  1672.         setTimeout("Wait_PopupMenuReady()", 100);
  1673. }
  1674.  
  1675.  
  1676. function PopupMenu_InvokeReady()
  1677. {
  1678.     if (gbWndPopupLinks != null) {
  1679.         gbWndPopupLinks.document.open("text/html");
  1680.         gbWndPopupLinks.document.write("<html><head>");
  1681.         if (s_bNS2 || s_bOpera) {
  1682.             gbWndPopupLinks.document.write("<base href=\"" + location +"\">");
  1683.         } else {
  1684.             //YJ: IE301,302 and NS3.x works fine
  1685.             gbWndPopupLinks.document.write("<");
  1686.             gbWndPopupLinks.document.write("script>");
  1687.             gbWndPopupLinks.document.write("function gotoUrl(aUrl) {opener.window.location=aUrl; close();}");
  1688.             gbWndPopupLinks.document.write("<");
  1689.             gbWndPopupLinks.document.write("/script>");
  1690.         }
  1691.         gbWndPopupLinks.document.write("</head><body onBlur=\'self.focus();\'>");
  1692.         gbWndPopupLinks.document.write(gbstrParaTotal);
  1693.         gbWndPopupLinks.document.write("</body></html>");
  1694.         gbWndPopupLinks.document.close();
  1695.  
  1696.         // Close the temporary
  1697.         if (!s_bNS3 && gbWndTemp != null) {
  1698.             gbWndTemp.close();
  1699.         }else {
  1700.             gbWndPopupLinks.focus();
  1701.         }
  1702.  
  1703.         return true;
  1704.     }
  1705.     return false;
  1706. }
  1707.  
  1708. /// Section End - Embedded Stub (JavaScript 1.0)
  1709.  
  1710. //// Segment End -- (JavaScript 1.0)
  1711.  
  1712. //// Segment Begin -- (JavaScript 1.2)
  1713. /// Section Begin  - kadov DHTM (JavaScript 1.2)
  1714.  
  1715. //Begin to support extended and dropdown text effects.
  1716. function kadovIsParagraph(el)
  1717. {
  1718.     return( el.tagName == "P" || el.tagName.indexOf("H") == 0 ) ? true : false;
  1719. }
  1720.  
  1721. function kadovInitEachChild(el)
  1722. {    
  1723.     for(var i=0; i<el.children.length; i++)
  1724.     {
  1725.         var child = el.children[i];
  1726.         if( child.tagName == "SCRIPT" || child.tagName == "!" )
  1727.             continue;
  1728.  
  1729.         if( child.id != "" )
  1730.         {
  1731.             // to wipe out the onload effects
  1732.             var onLoadEffect = child.style.getAttribute( "x-on-pageload" );
  1733.             if( (onLoadEffect != null) && (onLoadEffect > "") )
  1734.                 child.style.setAttribute( "x-on-pageload", "" );
  1735.             
  1736.             var href = child.getAttribute("href")
  1737.             if( href != null && href > "" && href.indexOf( "BSSCPopup" ) >= 0 )
  1738.                 kadovFilePopupInit(child.id); // Init for Popup
  1739.             else if( child.className == "dropspot" || child.className == "expandspot" || 
  1740.                      child.className == "glossterm" )
  1741.                 kadovTextPopupInit(child.id);// Init for Expanding/Glossary or DropDown text
  1742.             else if( child.className == "trigger")
  1743.                 kadovInitTrigger(child.id);// Init for Trigger
  1744.             else
  1745.             {
  1746.                 kadovInitEffects(child.id);// Init for DHTML effects
  1747.                 CEngine.SetOneTargetInitialState( child.id );
  1748.             }
  1749.         }
  1750.         
  1751.         if( (child.tagName == "IMG") && (child.getAttribute("dynsrc") > "") )
  1752.             child.start = "mouseover";// to start a AVI file. fileopen doesn't work
  1753.  
  1754.         kadovInitEachChild(child);
  1755.     }
  1756. }
  1757.  
  1758. function kadovRetrieveTextInner(el)
  1759. {    
  1760.     var x = "";
  1761.     if( (!el) || (el.tagName == "!") || (el.tagName == "SCRIPT" ))
  1762.         return x;
  1763.  
  1764.     if( kadovIsParagraph(el) )
  1765.     {
  1766.         var strNewID = " ";
  1767.         if( el.id != "" )
  1768.             strNewID += "id=" + el.id + "_NewSpan ";
  1769.         x = "<span" + strNewID + "style='" + el.style.cssText + "'>" + el.innerHTML + "</span>";
  1770.     }
  1771.     else
  1772.     {
  1773.         for(var i=0; i<el.children.length; i++)
  1774.             x += kadovRetrieveTextInner( el.children[i] );
  1775.     }
  1776.     return x;
  1777. }
  1778.  
  1779. function kadovRetrieveCleanHTML( strRawHTML, strTagOpen, strTagClose, nDistance )
  1780. {    
  1781.     var nTagOpen = strRawHTML.indexOf( strTagOpen, 0 );
  1782.     if( nTagOpen < 0 )
  1783.         return strRawHTML;
  1784.  
  1785.     var nTagClose = strRawHTML.indexOf( strTagClose, nTagOpen);
  1786.     if( nTagClose < nTagOpen )
  1787.         return strRawHTML;
  1788.         
  1789.     if( typeof(nDistance) == "number" && nDistance > 0 )
  1790.         if( (nTagClose - nTagOpen) != nDistance )
  1791.             return strRawHTML;
  1792.         
  1793.     var strCleanOnce = strRawHTML.substring(0, nTagOpen) + strRawHTML.substr(nTagClose + strTagClose.length) ;
  1794.     return     kadovRetrieveCleanHTML( strCleanOnce, strTagOpen, strTagClose );
  1795. }
  1796.  
  1797. function kadovAdjustObjectTag(strRawHTML, nStartPos)
  1798. {// adjust object tag for related topics HTML control, because innerHTML misses out the item settings
  1799.     
  1800.     //Is there any DTC?
  1801.     var strDTCTagOpen = '<!--Metadata type="DesignerControl" startspan';
  1802.     var strDTCTagClose = '<!--Metadata type="DesignerControl" endspan-->';
  1803.     var nDTCTagOpen = strRawHTML.indexOf( strDTCTagOpen, nStartPos );
  1804.     if( nDTCTagOpen < 0 )
  1805.         return strRawHTML;
  1806.     var nDTCTagClose = strRawHTML.indexOf( strDTCTagClose, nDTCTagOpen );
  1807.     if( nDTCTagClose < nDTCTagOpen)
  1808.         return strRawHTML; // no Design Time Controls;
  1809.         
  1810.     //Is the DTC HTML Help Control?
  1811.     var strRTObjTagOpen = 'classid=clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11';
  1812.     var strRTObjTagClose = '</OBJECT>';
  1813.     var nRTObjTagOpen = strRawHTML.indexOf( strRTObjTagOpen, nDTCTagOpen );
  1814.     if( nRTObjTagOpen < nDTCTagOpen )
  1815.         return strRawHTML;
  1816.     var nRTObjTagClose = strRawHTML.indexOf( strRTObjTagClose, nRTObjTagOpen );
  1817.     if( nRTObjTagClose < nRTObjTagOpen )
  1818.         return strRawHTML; // is not a HTML help control
  1819.         
  1820.     // Is it a related Topics html help control?
  1821.     var strRTObjLabel = '<PARAM NAME=\"Command\" VALUE=\"Related Topics';
  1822.     if( strRawHTML.indexOf(strRTObjLabel, nRTObjTagOpen) < 0 )
  1823.         return strRawHTML;
  1824.     
  1825.     // does the commented object tag contain a items parameters        
  1826.     var strRTItemsOpen = '<param name=Items value="';
  1827.     var strRTItemsClose = '$$**$$" >';
  1828.     var nRTItemsOpen = strRawHTML.indexOf(strRTItemsOpen, nDTCTagOpen);
  1829.     if( nRTItemsOpen < nDTCTagOpen )
  1830.         return strRawHTML;
  1831.     var nRTItemsClose = strRawHTML.indexOf(strRTItemsClose, nRTItemsOpen);
  1832.     if( nRTItemsClose < nRTItemsOpen )
  1833.         return strRawHTML;
  1834.         
  1835.     // found a items string
  1836.     var strItems = strRawHTML.substring( nRTItemsOpen + strRTItemsOpen.length, nRTItemsClose);
  1837.     if( strItems.length < 1 )
  1838.         return strRawHTML;
  1839.     
  1840.     // to reconstruct the item(s) param tag(s)
  1841.     var strItemsArray = strItems.split('$$**$$');
  1842.     if( strItemsArray.length < 1 )
  1843.         return strRawHTML;
  1844.     var strRunTimeItemParam = "";
  1845.     for( var i = 0; i < strItemsArray.length; i++ )
  1846.     {
  1847.         strRunTimeItemParam += '<PARAM  NAME="Item' + (i+1);
  1848.         strRunTimeItemParam += '"' + '  VALUE="';
  1849.         strRunTimeItemParam += strItemsArray[i];
  1850.         strRunTimeItemParam += '">';
  1851.     }
  1852.     
  1853.     // to insert the reconstructed item params into runtime object tag
  1854.     var strAdjustedHTML = strRawHTML.substring(0,nRTObjTagClose) + strRunTimeItemParam + strRawHTML.substring(nRTObjTagClose, strRawHTML.length);
  1855.     return kadovAdjustObjectTag(strAdjustedHTML, nDTCTagClose + strDTCTagClose.length);
  1856. }
  1857.  
  1858. function kadovTextPopupOnLoad( el )
  1859. {
  1860.     if( !CCSSP.bIsWinOS )
  1861.         return;
  1862.  
  1863.     if( typeof(el) == "string" )
  1864.         el = document.all.item(el);
  1865.  
  1866.     var src = el.getAttribute( "x-use-popup" );
  1867.     if(!src)
  1868.         return;
  1869.  
  1870.     var name = src;
  1871.     if( src.substr(0,1) == "#" ) 
  1872.         name = src.substr(1, src.length-1);
  1873.     var srcDiv = document.all.item(name);
  1874.     if( !srcDiv )
  1875.         return 1;
  1876.  
  1877.     var type = el.getAttribute( "x-popup-type" );
  1878.     var setup = el.getAttribute( "x-tmp-setup" );
  1879.     var newId = name;
  1880.     if( newId.indexOf( "_tmp") <= 0 )
  1881.         newId += "_tmp";
  1882.  
  1883.     if( !setup )
  1884.     {
  1885.         el.setAttribute( "x-tmp-setup", 1 );
  1886.     
  1887.         if( type == "pulldown"  )
  1888.         {
  1889.             var strAdjust = kadovAdjustObjectTag(srcDiv.innerHTML,0);
  1890.             var strCleanHTML = kadovRetrieveCleanHTML(strAdjust, "<!--", "-->");
  1891.             strCleanHTML = kadovRetrieveCleanHTML(strCleanHTML, "<SCRIPT", "/SCRIPT>");
  1892.  
  1893.             //work around the bug in HH.exe that highlight the phrases when use Search tab
  1894.             //this approach is just removing the <FONT...> tag inserted by Microsoft in the runtime
  1895.             strCleanHTML = kadovRetrieveCleanHTML(strCleanHTML, "<FONT color=#", "\">", 52);
  1896.             
  1897.             var strStyle = " style='display:none; position:relative;";
  1898.             var newDiv = "<div class=droptext id=" + newId + strStyle + "'>" + strCleanHTML + "</div>";
  1899.  
  1900.             srcDiv.outerHTML = ""; // empty the original DIV tag
  1901.             var elParentPra = kadovFindParentParagraph(el);
  1902.             if( elParentPra )
  1903.                 elParentPra.insertAdjacentHTML( "AfterEnd", newDiv );
  1904.         }
  1905.         else if( type == "expanding"  )
  1906.         {
  1907.             var inner = kadovRetrieveTextInner(srcDiv);
  1908.             if( inner == "" )
  1909.                 inner = srcDiv.innerHTML;
  1910.             var strAdjust = kadovAdjustObjectTag(inner,0);
  1911.             var strCleanHTML = kadovRetrieveCleanHTML(strAdjust, "<!--", "-->");
  1912.             strCleanHTML = kadovRetrieveCleanHTML(strCleanHTML, "<SCRIPT", "/SCRIPT>");
  1913.             var strClassName = (el.className == "glossterm") ? "glosstext" : "expandtext";
  1914.             var newSpan = "<span class=" + strClassName + " style='display: none;' id=" + newId + "> " + strCleanHTML + "</span>";
  1915.             srcDiv.outerHTML = ""; // empty the original DIV tag
  1916.             el.insertAdjacentHTML( "AfterEnd", newSpan );
  1917.         }
  1918.     }
  1919. }
  1920.  
  1921. function kadovTextPopup( el )
  1922. {
  1923.     if( (!CCSSP.bIsWinOS) || (window.event == null) )
  1924.         return;
  1925.     window.event.cancelBubble = true;
  1926.  
  1927.     if( typeof(el) == "string" )
  1928.         el = document.all.item(el);
  1929.  
  1930.     var src = el.getAttribute( "x-use-popup" );
  1931.     if(!src)
  1932.         return 1;
  1933.  
  1934.     var name = src;
  1935.     if( src.substr(0,1) == "#" ) 
  1936.         name = src.substr(1, src.length-1) + "_tmp";
  1937.     var srcDiv = document.all.item(name);
  1938.     if( !srcDiv )
  1939.         return 1;
  1940.  
  1941.     var type = el.getAttribute( "x-popup-type" );
  1942.     var setup = el.getAttribute( "x-tmp-setup" );
  1943.     if( srcDiv )
  1944.     {
  1945.         if( srcDiv.style.display == "" )
  1946.             srcDiv.style.display = "none";
  1947.         else
  1948.         {
  1949.             srcDiv.style.display = "";
  1950.             if( typeof(srcDiv.bInitialized) == "undefined" )
  1951.             {
  1952.                 srcDiv.bInitialized = true;
  1953.                 kadovInitEffects(name);
  1954.                 kadovInitEachChild(srcDiv);
  1955.             }
  1956.         }
  1957.     }
  1958. }
  1959.  
  1960. function kadovFindParentParagraph( el )
  1961. {
  1962.     if( typeof(el) == "string" )
  1963.         el = document.all.item(el);
  1964.     if( (!el) || el.tagName == "BODY" )
  1965.         return null;
  1966.     if( kadovIsParagraph(el.parentElement) )
  1967.         return el.parentElement;
  1968.     else
  1969.         return kadovFindParentParagraph( el.parentElement );
  1970. }
  1971.  
  1972. //Begin HTML code invoked function
  1973. function kadovRegisterEventHandler( obj, strEvent, strEventHandler )
  1974. {
  1975.     if( !gbBsIE4 )
  1976.         return;
  1977.     CCSSP.RegisterEventHandler( obj, strEvent, strEventHandler );
  1978. }
  1979.  
  1980. function kadovTextPopupInit( el )
  1981. {
  1982.     if( (!gbBsIE4) || (!CCSSP.bIsWinOS) )
  1983.         return;
  1984.         
  1985.     if( typeof(el) == "string" )
  1986.         el = document.all.item(el);
  1987.     if( el != null )
  1988.     {
  1989.         CCSSP.RegisterEventHandler( el, "onclick", "kadovTextPopup(" + el.id +");" );
  1990.         CCSSP.RegisterEventHandler( window, "onload", "kadovTextPopupOnLoad(" + el.id +");" );
  1991.     }
  1992. }
  1993. //End HTML code invoked function
  1994.  
  1995. //End to support extended and dropdown text effects.
  1996.  
  1997. //Begin to convert iWrite format to RoboEditor Format for DHTML effects
  1998. function kadovInitTriggersInHead( )
  1999. {
  2000.   if( Object.xDelayedInitElements )
  2001.   {
  2002.      var x = Object.xDelayedInitElements;
  2003.      for(i=0; i<x.length; i++)
  2004.          kadovInitTrigger( x[i] );
  2005.   }
  2006. }
  2007.  
  2008. //Begin HTML code invoked function
  2009. function kadovFilePopupInit( el )
  2010. {
  2011.     if( !gbBsIE4 )
  2012.         return;
  2013.     if( typeof(el) == "string" )
  2014.         el = document.all.item(el);
  2015.  
  2016.     if( el != null )
  2017.         CCSSP.RegisterEventHandler( el, "onmouseover", "BSPSPopupOnMouseOver(event);" );
  2018. }
  2019.  
  2020. function kadovInitTrigger( element )
  2021. {
  2022.     if( !gbBsIE4 )
  2023.         return;
  2024.     var srcElement = element;
  2025.     if( typeof(srcElement) == "string" )
  2026.     {
  2027.         srcElement = document.all.item(element,0);
  2028.         if(srcElement == null)
  2029.             return;
  2030.     }
  2031.     
  2032.     if( !kadovIsParentVisible(srcElement) )
  2033.         return;
  2034.  
  2035.     var targets = srcElement.getAttribute( "x-targets" );
  2036.     var arrOneTarget = targets.split( "," );
  2037.     for( var i = 0; i < arrOneTarget.length; i ++ )
  2038.         bsscFXInit( element, arrOneTarget[i], null, null, null, null );
  2039. }
  2040.  
  2041. function kadovIsParentVisible( el )
  2042. {
  2043.     if( typeof(el) == "string" )
  2044.         el = document.all.item(el);
  2045.     if( (!el) || el.tagName == "BODY" )
  2046.         return true;
  2047.     if( el.style.display == 'none' ) //el.visibility == 'hidden' || 
  2048.         return false;
  2049.     else
  2050.         return kadovIsParentVisible( el.parentElement );
  2051. }
  2052.  
  2053. function kadovInitEffects( element )
  2054. {
  2055.     if( !gbBsIE4 )
  2056.         return;
  2057.     var srcElement = element;
  2058.     if( typeof(srcElement) == "string" )
  2059.     {
  2060.         srcElement = document.all.item(element,0);
  2061.         if(srcElement == null)
  2062.             return;
  2063.     }
  2064.     
  2065.     if( !kadovIsParentVisible(srcElement) )
  2066.         return;
  2067.     
  2068.     kadovInitEffect( srcElement, "x-on-hover" );
  2069.     kadovInitEffect( srcElement, "x-on-pageclick" );
  2070.     kadovInitEffect( srcElement, "x-on-pageload" );
  2071.     kadovInitEffect( srcElement, "x-on-trigger-1" );
  2072.     kadovInitEffect( srcElement, "x-on-trigger-2" );
  2073. }
  2074. //End HTML code invoked function
  2075.  
  2076. function kadovInitEffect( element, prop )
  2077. {
  2078.     var values = null;
  2079.     if( element.getAttribute( "currentStyle" ) )
  2080.         values = element.currentStyle.getAttribute( prop );
  2081.     else 
  2082.         values = element.style.getAttribute( prop );
  2083.     if( !values )
  2084.         return;
  2085.  
  2086.     var functions = new Array();
  2087.     var nIdx = 0, nStart = 0;
  2088.     var nNext = values.indexOf( "\)", 0);
  2089.     while( nNext >= 0 && nNext < values.length )
  2090.     {
  2091.         functions[nIdx] = values.substr( nStart, nNext-nStart+1);
  2092.         nStart = nNext + 1;
  2093.         nIdx++;
  2094.         nNext = values.indexOf( "\)", nStart);
  2095.     }
  2096.         
  2097.     for( var i=0; i<functions.length; i++)
  2098.     {
  2099.         var id = element.getAttribute( "id" );
  2100.         var translatedProp = kadovTranslateProp(prop);
  2101.  
  2102.         var lp = functions[i].indexOf( "(" );
  2103.         var fnname = functions[i].substring(0, lp);
  2104.         var srcargs = functions[i].substring(lp+1, functions[i].length-1);
  2105.         
  2106.         var nClickTimes = 1;
  2107.         var arrForClickCount = srcargs.split( "," );
  2108.         for( var j = 0; j < arrForClickCount.length; j++ )
  2109.         {// to locate and get the "clicks=99" settings
  2110.             var nPageClick = arrForClickCount[j].indexOf("clicks");
  2111.             if( nPageClick >= 0 )
  2112.             {
  2113.                 nPageClick = arrForClickCount[j].indexOf("=");
  2114.                 if( nPageClick > 0 )
  2115.                 {
  2116.                     nClickTimes = arrForClickCount[j].substring( nPageClick + 1, arrForClickCount[j].length) * 1;
  2117.                     break;
  2118.                 }
  2119.             }
  2120.         }
  2121.         var args = srcargs;
  2122.         if( j < arrForClickCount.length )
  2123.         {// to strip out the "clicks=99" from the arguments string
  2124.             args = "";
  2125.             for( var k = 0; k < arrForClickCount.length; k ++ )
  2126.             {
  2127.                 if( k != j )
  2128.                 {
  2129.                     args += arrForClickCount[k];
  2130.                     if( k < arrForClickCount.length - 1 )
  2131.                         args += ",";
  2132.                 }
  2133.             }
  2134.         }
  2135.         bsscFXInit( null, id, translatedProp, fnname, args, nClickTimes );
  2136.     }
  2137. }
  2138.  
  2139. function kadovTranslateProp( prop )
  2140. {
  2141.     switch( prop )
  2142.     {
  2143.     case "x-on-hover" :     return "bsschover";
  2144.     case "x-on-pageclick" : return "bsscpageclick";
  2145.     case "x-on-pageload" :  return "bsscpageload";
  2146.     case "x-on-trigger-1" : return "bssctrigger1";
  2147.     case "x-on-trigger-2" : return "bssctrigger2";
  2148.     }
  2149.     return null;
  2150. }
  2151. //End to convert iWrite format to RoboEditor Format for DHTML effects
  2152.  
  2153. //Begin the definition of one entry to DHTML effects
  2154. function bsscFXInit( trigger_ID, target_ID, event_type, 
  2155.     action_type, action_setting, event_addional )
  2156. {
  2157.     if( !CCSSP.bIsWinOS || typeof(target_ID) != "string" )//MUST have a target_ID
  2158.         return; // we don't support Navigator yet
  2159.     
  2160.     if( typeof(event_type) == "string" )
  2161.         event_type = event_type.toLowerCase();
  2162.     if( typeof(action_type) == "string" )
  2163.         action_type = action_type.toLowerCase();
  2164.     if( typeof(action_setting) == "string" )
  2165.          action_setting = action_setting.toLowerCase();
  2166.     
  2167.     // to get the target element then add it to the target list
  2168.     var eleTarget = CCSSP.GetObject( target_ID );
  2169.     if( (eleTarget != null) && (event_type != null) && (action_type != null) )
  2170.     {
  2171.         CEngine.AddOneTarget( target_ID, eleTarget );
  2172.         CEngine.BuildTargetObject(target_ID, event_type, action_type, action_setting, event_addional);
  2173.     }
  2174.     
  2175.     // to validate the trigger_ID parameter
  2176.     if( typeof(trigger_ID) == "string" && trigger_ID != "" )
  2177.         CEngine.BuildTriggerObject( trigger_ID, target_ID );
  2178. }    
  2179. //End the definition of one entry to DHTML effects
  2180.  
  2181.  
  2182. /// Section End  - kadov DHTM (JavaScript 1.2)
  2183.  
  2184.  
  2185. /// Section Begin  - CCSSP DHTM (JavaScript 1.2)
  2186.  
  2187. //Begin JavaScript libary for cross-platform positioning object.
  2188. function CCSSP(){} // constructor of CCSSP class
  2189.  
  2190. CCSSP.strAgent = navigator.userAgent.toLowerCase(); 
  2191. CCSSP.nAppVersion = parseInt(navigator.appVersion);
  2192.  
  2193. CCSSP.bIsWinOS = ((CCSSP.strAgent.indexOf("win") >= 0) || (CCSSP.strAgent.indexOf("16bit") >= 0));
  2194. CCSSP.bIsMacOS = (CCSSP.strAgent.indexOf("mac") >= 0);
  2195.  
  2196. CCSSP.bIsIE = (navigator.appName.indexOf("Microsoft") >= 0);
  2197. CCSSP.bIsIE4 = (CCSSP.bIsIE && (CCSSP.nAppVersion >= 4));
  2198. CCSSP.bIsIE5 = (CCSSP.bIsIE4 && (CCSSP.strAgent.indexOf("msie 5") != -1) )
  2199.  
  2200. CCSSP.bIsNav = (navigator.appName.indexOf("Netscape") >= 0);
  2201. CCSSP.bIsNav4 = (CCSSP.bIsNav && (CCSSP.nAppVersion >= 4));
  2202.  
  2203. CCSSP.GetObject = function( obj )
  2204. {//convert object name string or reference into a valid object reference
  2205.     if( typeof(obj) == "object" )
  2206.         return obj;
  2207.     else if( typeof(obj) == "string" && obj != "")
  2208.     {
  2209.         if( CCSSP.bIsNav4 )
  2210.             return eval("document." + obj);
  2211.         else
  2212.             return eval("document.all." + obj);
  2213.     }
  2214.     else
  2215.         return null;
  2216. }
  2217.  
  2218. CCSSP.MoveObjectTo = function(obj, x, y)
  2219. {//positioning an object at a specific pixel coordinate
  2220.     if( CCSSP.bIsNav4 )
  2221.         obj.moveTo(x,y);
  2222.     else
  2223.     {
  2224.         obj.style.pixelLeft = x;
  2225.         obj.style.pixelTop = y;
  2226.     }
  2227. }
  2228.  
  2229. CCSSP.MoveObjectBy = function(obj, dx, dy)
  2230. {//moveing a object by x and/or y pixel
  2231.     if( CCSSP.bIsNav4 )
  2232.         obj.moveBy(dx,dy);
  2233.     else
  2234.     {
  2235.         obj.style.pixelLeft += dx;
  2236.         obj.style.pixelTop += dy;
  2237.     }
  2238. }
  2239.  
  2240. CCSSP.SetObjectBGColor = function(obj, color)
  2241. {//set the background color of an object
  2242.     if( CCSSP.bIsNav4 )
  2243.         obj.bgColor = color;
  2244.     else
  2245.         obj.style.backgroundColor = color;
  2246. }
  2247.  
  2248. CCSSP.ShowObject = function(obj, bShow)
  2249. {// set the object to be visible or invisible
  2250.     if( CCSSP.bIsNav4 )
  2251.         obj.visibility = (bShow == true) ? 'show' : 'hide';
  2252.     else
  2253.         obj.style.visibility = (bShow == true) ? 'visible' : 'hidden';// when hidden, it still occupy some space.
  2254. }
  2255.  
  2256. CCSSP.GetObjectLeft = function(obj)
  2257. {// retrieve the x coordinate of a posionable object
  2258.     if( CCSSP.bIsNav4 )
  2259.         return obj.left;
  2260.     else
  2261.         return obj.style.pixelLeft;
  2262. }
  2263.  
  2264. CCSSP.GetObjectTop = function(obj)
  2265. {// retrieve the y coordinate of a posionable object
  2266.     if( CCSSP.bIsNav4 )
  2267.         return obj.top;
  2268.     else
  2269.         return obj.style.pixelTop;
  2270. }
  2271.  
  2272. CCSSP.GetObjectContainLeft = function(obj)
  2273. {// retrieve the x coordinate of a posionable object relative to it's parent element
  2274.     if( CCSSP.bIsNav4 )
  2275.         return obj.pageX;
  2276.     else
  2277.     {
  2278.         if( obj == document.body )
  2279.             return obj.clientLeft;
  2280.         else
  2281.             return obj.offsetLeft;
  2282.     }
  2283. }
  2284.  
  2285. CCSSP.GetObjectWindowLeft = function(obj)
  2286. {// retrieve the x coordinate of a posionable object relative to browser window
  2287.     if( CCSSP.bIsNav4 )
  2288.         return obj.pageX;
  2289.     else
  2290.     {
  2291.         var nOffsetWindowLeft = 0;
  2292.         for(var element = obj; element; element = element.offsetParent)
  2293.             nOffsetWindowLeft += CCSSP.GetObjectContainLeft(element);
  2294.         return nOffsetWindowLeft;
  2295.     }
  2296. }
  2297.  
  2298. CCSSP.GetObjectContainTop = function(obj)
  2299. {// retrieve the y coordinate of a posionable object relative to it's parent element
  2300.     if( CCSSP.bIsNav4 )
  2301.         return obj.pageY;
  2302.     else
  2303.     {
  2304.         if( obj == document.body )
  2305.             return obj.clientTop;
  2306.         else
  2307.             return obj.offsetTop;
  2308.     }
  2309. }
  2310.  
  2311. CCSSP.GetObjectWindowTop = function(obj)
  2312. {// retrieve the y coordinate of a posionable object relative to browser window
  2313.     if( CCSSP.bIsNav4 )
  2314.         return obj.pageY;
  2315.     else
  2316.     {
  2317.         var nOffsetWindowTop = 0;
  2318.         for(var element = obj; element; element = element.offsetParent)
  2319.             nOffsetWindowTop += CCSSP.GetObjectContainTop(element);
  2320.         return nOffsetWindowTop;
  2321.     }
  2322. }
  2323.  
  2324. CCSSP.GetObjectHeight = function(obj)
  2325. {// retrieve the height of a posionable object
  2326.     if( CCSSP.bIsNav4 )
  2327.         return obj.clip.height;
  2328.     else
  2329.         return obj.offsetHeight;
  2330. }
  2331.  
  2332. CCSSP.GetObjectWidth = function(obj)
  2333. {// retrieve the width of a posionable object
  2334.     if( CCSSP.bIsNav4 )
  2335.         return obj.clip.width;
  2336.     else
  2337.         return obj.offsetWidth;
  2338. }
  2339.  
  2340. CCSSP.RegisterEventHandler = function( srcObj, rawEventName, funcHandler )
  2341. { // to add the "funcHandler" as the "rawEventName" 's handler to the "srcObj" object,the original event handler will be combined
  2342.     var oldHandler = "";
  2343.     var oldInlineHandler = srcObj[rawEventName.toLowerCase()];
  2344.     if( oldInlineHandler != null )
  2345.     {
  2346.         var functionDefinition = oldInlineHandler.toString();
  2347.         var bodyStart = functionDefinition.indexOf( "{" );
  2348.         var bodyEnd = functionDefinition.lastIndexOf( "}" );
  2349.         if( bodyStart > 0 || bodyEnd > bodyStart )
  2350.             oldHandler = functionDefinition.substr( bodyStart + 1, bodyEnd - bodyStart - 2 );
  2351.     }
  2352.     else if( CCSSP.bIsIE4 )
  2353.     { //search for <SCRIPT> tag which define the event handler
  2354.         for( var i = 0; i < document.scripts.length; i++ ) 
  2355.         {
  2356.             var script = document.scripts[i];
  2357.             if( (script.htmlFor == srcObj.id || script.htmlFor == srcObj ) && script.event == rawEventName )
  2358.             {
  2359.                 oldHandler = script.innerHTML;
  2360.                 break;
  2361.             }
  2362.         }
  2363.     }
  2364.     
  2365.     if( oldHandler.indexOf(funcHandler) >= 0 )
  2366.         return;// to prevent register the funtion twice.
  2367.  
  2368.     if( CCSSP.bIsNav4 ) // only "onload, onresize, onfocus" apply to window
  2369.     {// other raw events will apply to layer
  2370.         var noOn = rawEventName.substring(2, rawEventName.length);
  2371.         if( typeof(noOn) == "string" && noOn.length > 3 )
  2372.             srcObj.captureEvents( Event[noOn.toUpperCase()] );
  2373.     }
  2374.  
  2375.     var newHandler = oldHandler;
  2376.     if( newHandler.length == 0 )
  2377.         newHandler = funcHandler;
  2378.     else
  2379.         newHandler += "; " + funcHandler;
  2380.     srcObj[rawEventName.toLowerCase()] = new Function( newHandler );
  2381. }
  2382.  
  2383. CCSSP.GetWindowHeight = function()
  2384. {// retrieve the height of available content in browser window
  2385.     if( CCSSP.bIsNav4 )
  2386.         return window.innerHeight;
  2387.     else
  2388.         return document.body.clientHeight;
  2389. }
  2390.  
  2391. CCSSP.GetWindowBottom = function()
  2392. {// retrieve the bottom postion of browser window
  2393.     if( CCSSP.bIsNav4 )
  2394.         return window.outerHeight + window.pageYOffset;
  2395.     else
  2396.         return document.body.clientHeight + document.body.scrollTop;
  2397. }
  2398.  
  2399. CCSSP.GetWindowWidth = function()
  2400. {// retrieve the width of available content in browser window
  2401.     if( CCSSP.bIsNav4 )
  2402.         return window.innerWidth;
  2403.     else
  2404.         return document.body.clientWidth;
  2405. }
  2406.  
  2407. CCSSP.GetWindowRight = function()
  2408. {// retrieve the right postion of browser window
  2409.     if( CCSSP.bIsNav4 )
  2410.         return window.outerWidth + window.pageXOffset;
  2411.     else
  2412.         return document.body.clientWidth + document.body.scrollLeft;
  2413. }
  2414.  
  2415. CCSSP.TrimString = function( objString, subtrim )
  2416. {// to trim the "subtrim" in the beginning and ending of a string object
  2417.     if( typeof(subtrim) != "string" || subtrim == null )
  2418.         return objString;
  2419.     var strHead = objString.substring(0, 1);
  2420.     var strRear = objString.substring(objString.length-1, objString.length);
  2421.     if( strHead != subtrim && strRear != subtrim )
  2422.         return objString;
  2423.     
  2424.     var spacePos = objString.indexOf(subtrim);
  2425.     if( spacePos < 0 )
  2426.         return objString;
  2427.     else if( spacePos == objString.length - 1 )
  2428.         return objString.substring(0, spacePos);
  2429.     else
  2430.     {
  2431.         var newString = objString.substring( spacePos + 1, objString.length);
  2432.         return CCSSP.TrimString( newString, subtrim );
  2433.     }
  2434. }
  2435.  
  2436. CCSSP.TrimSpace = function( objString )
  2437. {
  2438.     var Trim1 = CCSSP.TrimString( objString, " ");
  2439.     return CCSSP.TrimString( Trim1, "\'");
  2440. }
  2441.  
  2442. CCSSP.GetEventElement = function( navEventObject )
  2443. {// to get the element who fired the current event
  2444.     if( CCSSP.bIsNav4 )
  2445.         return navEventObject.target;
  2446.     else
  2447.         return event.srcElement;
  2448. }
  2449.  
  2450. CCSSP.PrepareFilter = function( Obj )
  2451. {//to prepare for making the filter work
  2452.     Obj.style.filter = "";
  2453.     if( Obj.style.width != "" || Obj.style.height != "" || Obj.style.position == "absolute" )
  2454.         return;
  2455.     Obj.style.height = CCSSP.GetObjectHeight(Obj);
  2456. }
  2457.  
  2458. CCSSP.IsDescendant = function( progenitor, progeny )
  2459. {
  2460.     if( typeof(progeny) == "undefined" || progeny == null )
  2461.         return false;
  2462.     else if( progeny == progenitor )
  2463.         return true; 
  2464.     else if( progeny.id == progenitor.id ) 
  2465.         return true; 
  2466.     else if( progeny.parentElement == progenitor.parentElement )
  2467.         return false;
  2468.     else
  2469.         return CCSSP.IsDescendant( progenitor, progeny.parentElement );
  2470. }
  2471.  
  2472. CCSSP.IsTextTag = function( Obj )
  2473. {
  2474.     if( typeof( Obj.tagName ) == "undefined" )
  2475.         return false;
  2476.     return( Obj.tagName.indexOf("H") == 0 || Obj.tagName == "P" || 
  2477.             Obj.tagName == "FONT" || Obj.tagName == "SPAN" );
  2478. }
  2479.  
  2480. //End JavaScript libary for cross-platform positioning object.
  2481.  
  2482. /// Section End  - CCSSP DHTM (JavaScript 1.2)
  2483.  
  2484. /// Section Begin  - CCSSP DHTM 1 (JavaScript 1.2)
  2485.  
  2486. //Begin the definition of class CTrigger
  2487. function CTrigger( TriggerElement )
  2488. {
  2489.     // object : the trigger element. Never be null. 
  2490.     this.eleTrigger = TriggerElement;
  2491.     
  2492.     // number : the click counter number: only 3 values: 0,1,2;
  2493.     this.nCounter = 0; 
  2494.     
  2495.     //object as associative array of string:
  2496.     // the associate target ID strings; one element at least.            
  2497.     this.objStrTarget = new Object();
  2498.     this.eleTrigger.style.cursor = "hand";
  2499.     if( this.eleTrigger.tagName == "AREA" && this.eleTrigger.getAttribute("href") == "" )
  2500.         this.eleTrigger.setAttribute("href", "#") // to make a hand cursor for image map
  2501. }
  2502.  
  2503. CTrigger.prototype.AddTargetID = function( strTargetID )
  2504. {// add one target ID string to the objStrTarget
  2505.     if( typeof(strTargetID) != "string" )
  2506.         return ;
  2507.     if( typeof(this.objStrTarget[strTargetID]) != "string" )
  2508.         this.objStrTarget[strTargetID] = strTargetID;
  2509. }
  2510.  
  2511. CTrigger.prototype.OnTriggerClick = function()
  2512. {// to activate all asociated target
  2513.     var strEventType = ( (this.nCounter++)% 2 == 0 ) ? 
  2514.         "bssctrigger1" : "bssctrigger2";
  2515.         
  2516.     // to enumerate associative target element's ID string
  2517.     for( var strTargetID in this.objStrTarget ) 
  2518.         CEngine.SendEventToOneTarget( strTargetID, strEventType );
  2519. }
  2520. //End the definition of class CTrigger
  2521.  
  2522. //Begin the definition of class CTarget
  2523. function CTarget( TargetElement )
  2524. {
  2525.     // object : the target element. Never be null.
  2526.     this.eleTarget = TargetElement;
  2527.     this.objManager = new Object(); // object: the event manager
  2528.  
  2529. CTarget.nPageClickCounter = 0;// static class property.
  2530.  
  2531. CTarget.prototype.GetAgencyObject = function(str_action_type,action_setting )
  2532. {// return the action agency ( effect )object's refernece 
  2533.     switch( str_action_type )
  2534.     {
  2535.     case "show":return new CAgencyShow( this.eleTarget, true ) ;
  2536.     case "hide":return new CAgencyShow( this.eleTarget, false ) ;
  2537.  
  2538.     case "flyin" : 
  2539.         return new CAgencyFly(this.eleTarget, action_setting, true);
  2540.     case "flyout" : 
  2541.         return new CAgencyFly(this.eleTarget, action_setting, false);
  2542.     case "spiralin" : 
  2543.         return new CAgencySpiral(this.eleTarget, action_setting, true);
  2544.     case "spiralout" : 
  2545.         return new CAgencySpiral(this.eleTarget, action_setting, false);
  2546.     case "zoomin" :
  2547.         return new CAgencyZoom(this.eleTarget, action_setting, true);
  2548.     case "zoomout" : 
  2549.         return new CAgencyZoom(this.eleTarget, action_setting, false);
  2550.     case "elastic" : 
  2551.         return new CAgencyElastic(this.eleTarget, action_setting);
  2552.         
  2553.     case "fadein" : 
  2554.         return (CCSSP.bIsIE4)? new CAgencyAlpha(this.eleTarget, action_setting, true) : null;
  2555.     case "fadeout" :
  2556.         return (CCSSP.bIsIE4)? new CAgencyAlpha(this.eleTarget, action_setting, false) : null;
  2557.     case "rockrollstatic" :
  2558.     case "rockroll" :
  2559.         return (CCSSP.bIsIE4)? new CAgencyWave(this.eleTarget, action_setting, false) : null;
  2560.  
  2561.     case "glow":
  2562.         return (CCSSP.bIsIE4)? new CAgencyGlow(this.eleTarget,action_setting) : null;
  2563.     case "dropshadow":
  2564.         return (CCSSP.bIsIE4)? new CAgencyDropShadow(this.eleTarget,action_setting) : null;
  2565.     case "transition" :
  2566.         return (CCSSP.bIsIE4)? new CAgencyRevealTrans(this.eleTarget,action_setting) : null;
  2567.     case "blur" :
  2568.         return (CCSSP.bIsIE4)? new CAgencyBlur(this.eleTarget,action_setting) : null;
  2569.  
  2570.     case "fliph" : // all these 4 do NOT need any parameters
  2571.     case "flipv" :
  2572.     case "invert":
  2573.     case "gray" :
  2574.         return (CCSSP.bIsIE4)? new CAgencyChangeFilter(this.eleTarget, str_action_type) : null;
  2575.     
  2576.     case "fontchange": // the effects below change the style on the fly, so won't work in Navigator
  2577.         return (CCSSP.bIsIE4)? new CAgencyFontChange(this.eleTarget,action_setting) : null;
  2578.     case "boderchange": 
  2579.     case "stylechange":
  2580.         return (CCSSP.bIsIE4)? new CAgencyChangeStyle(this.eleTarget,action_setting) : null;
  2581.  
  2582.     default: return null;
  2583.     }
  2584. }
  2585.  
  2586. CTarget.prototype.SetEventManager = function( 
  2587.     one_event_type,str_action_type,action_setting,event_additional)
  2588. {// to set the event manager with specified action 
  2589.     if( typeof( one_event_type ) != "string" ||    
  2590.         typeof( str_action_type ) != "string"||
  2591.         typeof( action_setting ) != "string" )
  2592.         return false;
  2593.     if( typeof(this.objManager[one_event_type]) == "undefined" )
  2594.     {
  2595.         this.objManager[one_event_type] = new Object();
  2596.         this.objManager[one_event_type].length = 0;
  2597.     }
  2598.     
  2599.     var eventAgency = this.GetAgencyObject(str_action_type,action_setting);
  2600.     if( eventAgency != null )
  2601.     {
  2602.         var ct = this.objManager[one_event_type].length ++;
  2603.         this.objManager[one_event_type][ct] = eventAgency;
  2604.         
  2605.         if( one_event_type == "bsscpageclick" )
  2606.         {// to deal with the "number of pageclick" stuff
  2607.             if( typeof(event_additional) == "number" )
  2608.                 this.objManager[one_event_type][ct].nPageClick = event_additional;
  2609.             else // set the default number 
  2610.                 this.objManager[one_event_type][ct].nPageClick = 1;
  2611.             
  2612.             if( (typeof(this.objManager.nMinPageClickIndex) == "undefined") ||
  2613.                 (this.objManager[one_event_type][ct].nPageClick < 
  2614.                     this.objManager[one_event_type][this.objManager.nMinPageClickIndex].nPageClick) )
  2615.                 this.objManager.nMinPageClickIndex = ct;
  2616.         }
  2617.         
  2618.         //hide the object blindly,SetState function will take care of the final correct state
  2619.         if( ((one_event_type == "bsscpageclick") && 
  2620.              (this.objManager[one_event_type][ct].nPageClick == 1)) ||
  2621.             one_event_type == "bsscpageload" ||
  2622.             one_event_type == "bssctrigger1" )
  2623.             CCSSP.ShowObject( this.eleTarget, false );
  2624.         
  2625.         if( one_event_type == "bssctrigger1" || one_event_type == "bssctrigger2" )
  2626.             if( typeof( this.strTriggerEvent ) == "undefined" )
  2627.                 this.strTriggerEvent = ( one_event_type == "bssctrigger1" ) ? "bssctrigger2" : "bssctrigger1";
  2628.             
  2629.         return true;
  2630.     }
  2631.     return false;
  2632. }
  2633.  
  2634. CTarget.prototype.OnEvent = function( strBsscEvent )
  2635. {// response to the event ( bssc format )
  2636.     if( typeof(this.objManager[strBsscEvent]) == "object" )
  2637.     { // to get the event agency from the event manager
  2638.         var eventAgency = this.objManager[strBsscEvent];
  2639.         for( var i = 0; i < eventAgency.length; i++ )
  2640.         {
  2641.             if( strBsscEvent == "bsscpageclick" && 
  2642.                  eventAgency[i].nPageClick != CTarget.nPageClickCounter )
  2643.                  continue;
  2644.             else if( strBsscEvent == "bsschover" && event.type == "mouseout" )
  2645.                 eventAgency[i].EndEffect();
  2646.             else // to invoke the unified function in effect object    
  2647.                 eventAgency[i].UpdateEffect(); 
  2648.         }
  2649.     }
  2650. }
  2651.  
  2652. CTarget.prototype.SetState = function( strBsscEvent )
  2653. {
  2654.     if( typeof(this.objManager[strBsscEvent]) != "object" )
  2655.         return false;
  2656.  
  2657.     // to get the event agency from the event manager
  2658.     var eventAgency = this.objManager[strBsscEvent];
  2659.     
  2660.     if( strBsscEvent == "bsscpageclick" )
  2661.     {// we only set the initial state for the minium number of pageclick 
  2662.         eventAgency[this.objManager.nMinPageClickIndex].PrepareEffect();
  2663.         return true;
  2664.     }
  2665.     else
  2666.     {
  2667.         for( var i = 0; i < eventAgency.length; i++ )
  2668.             eventAgency[i].PrepareEffect(); // to invoke the unified function in effect object     
  2669.         if( i > 0 )
  2670.             return true;
  2671.         else
  2672.             return false;
  2673.     }
  2674. }
  2675. //End the definition of class CTarget
  2676.  
  2677. //Begin the definition of CEngine class
  2678. function CEngine(){}// all properities are going be "class" properities
  2679.  
  2680. // object : as associative array of trigger objects
  2681. CEngine.objTrigger = new Object();
  2682. // object : as associative array of target objects 
  2683. CEngine.objTarget = new Object(); 
  2684.  
  2685. // Array : each element is a CAgencyXXX animation object
  2686. CEngine.arrAnimation = new Array();
  2687. CEngine.PerformAnimation = function( nIndex )
  2688. {// animation : update effects function
  2689.     CEngine.arrAnimation[nIndex].UpdateEffect();
  2690. }
  2691.  
  2692. CEngine.AddOneTrigger = function(TriggerID,TriggerElement)
  2693. {// add one Trigger object into the trigger array
  2694.     if( typeof(TriggerID) != "string" || TriggerElement == null ||
  2695.         typeof(TriggerElement) != "object" )
  2696.         return;
  2697.     if( typeof(CEngine.objTrigger[TriggerID] ) != "object" )
  2698.         CEngine.objTrigger[TriggerID] = new CTrigger(TriggerElement);
  2699. }
  2700.     
  2701. CEngine.AddOneTarget = function(TargetID, TargetElement)
  2702. {// add one Target object into the target array
  2703.     if( typeof(TargetID) != "string" || TargetElement == null ||
  2704.         typeof(TargetElement) != "object" )
  2705.         return;
  2706.     if( typeof(CEngine.objTarget[TargetID]) != "object" )
  2707.         CEngine.objTarget[TargetID] = new CTarget( TargetElement );
  2708. }
  2709.  
  2710. CEngine.SendEventToOneTarget = function(strTargetID, strBsscEvent )
  2711. {// to activate one target object
  2712.     if( typeof(CEngine.objTarget[strTargetID]) == "object" ) 
  2713.     {
  2714.         if( strBsscEvent == "bssctrigger1" || strBsscEvent == "bssctrigger2" )
  2715.         {//now, the "bssctrigger1" and "bssctrigger2" work like a toggle
  2716.             if( strBsscEvent == CEngine.objTarget[strTargetID].strTriggerEvent )
  2717.                 strBsscEvent = (strBsscEvent == "bssctrigger1") ? "bssctrigger2" : "bssctrigger1";
  2718.             CEngine.objTarget[strTargetID].strTriggerEvent = strBsscEvent;
  2719.         }
  2720.         CEngine.objTarget[strTargetID].OnEvent( strBsscEvent );
  2721.     }
  2722. }
  2723.  
  2724. CEngine.SendEventToAllTarget = function( strBsscEvent )
  2725. { //to activate all target associative to the BSSC event
  2726.     for( var strTargetID in CEngine.objTarget ) //to enumerate all target
  2727.         CEngine.SendEventToOneTarget( strTargetID, strBsscEvent );
  2728. }
  2729.  
  2730. CEngine.SetOneTargetInitialState = function( strTargetID )
  2731. {// only invoked after ALL effects for the target have been set
  2732.     if( typeof(CEngine.objTarget[strTargetID]) == "object" ) 
  2733.     {// to get target object
  2734.         var objTarget = CEngine.objTarget[strTargetID];
  2735.         if( objTarget.SetState( "bsscpageload" ) == false )
  2736.         {
  2737.             objTarget.SetState( "bsscpageclick" );
  2738.             objTarget.SetState( "bssctrigger1" );
  2739.         }
  2740.     }
  2741. }
  2742.  
  2743. CEngine.AdjustPageClickCounter = function()
  2744. {
  2745.     var nAdjustedClickCounter = CTarget.nPageClickCounter;
  2746.     var bAdjusted = false;
  2747.     for( var strTargetID in CEngine.objTarget ) //to enumerate all target
  2748.     {// try to find the minum pageCliclConter greater than CTarget.nPageClickCounter
  2749.         var objEventPageClick = CEngine.objTarget[strTargetID].objManager.bsscpageclick;
  2750.         if( objEventPageClick != null )
  2751.         {
  2752.             for( var i = 0; i < objEventPageClick.length; i++ )
  2753.             {
  2754.                 var nOtherPageClick = objEventPageClick[i].nPageClick;
  2755.                 if( nOtherPageClick == CTarget.nPageClickCounter )
  2756.                     return;
  2757.                 if( nOtherPageClick > CTarget.nPageClickCounter )
  2758.                 {
  2759.                     if( !bAdjusted )
  2760.                     {
  2761.                         nAdjustedClickCounter = nOtherPageClick;
  2762.                         bAdjusted = true;
  2763.                     }
  2764.                     else if( nOtherPageClick < nAdjustedClickCounter )
  2765.                         nAdjustedClickCounter = nOtherPageClick;
  2766.                 }
  2767.             }
  2768.         }
  2769.     }
  2770.     CTarget.nPageClickCounter = nAdjustedClickCounter;
  2771. }
  2772.  
  2773. CEngine.OnPageLoad = function()
  2774. {     
  2775.     // first, to set all target's initial state
  2776.     for( var strTargetID in CEngine.objTarget )
  2777.         CEngine.SetOneTargetInitialState( strTargetID );
  2778.     
  2779.     // to invoke all target's onpageload handler
  2780.     CEngine.SendEventToAllTarget( "bsscpageload" );
  2781. }
  2782.  
  2783. CEngine.OnPageClick = function()
  2784. { // to invoke all target's onpageclick handler
  2785.     var src = CCSSP.GetEventElement( arguments[0] );
  2786.     if( src == null )
  2787.         return;
  2788.         
  2789.     var objClickedTrigger = null;
  2790.     for( var strTriggerID in CEngine.objTrigger )
  2791.     { // to detect which trigger is clicked
  2792.         if( CCSSP.IsDescendant( CEngine.objTrigger[strTriggerID].eleTrigger,src) )
  2793.         {
  2794.             objClickedTrigger = CEngine.objTrigger[strTriggerID];
  2795.             break;
  2796.         }
  2797.     }
  2798.     
  2799.     if( objClickedTrigger != null) // the clicked trigger found
  2800.         objClickedTrigger.OnTriggerClick();
  2801.     else // no trigger is clicked
  2802.     { // to send PageClick event to all target
  2803.         CTarget.nPageClickCounter++;
  2804.         CEngine.AdjustPageClickCounter();
  2805.         CEngine.SendEventToAllTarget( "bsscpageclick" );
  2806.     }
  2807. }    
  2808.  
  2809. CEngine.OnMouseOver = function()
  2810. { // to invoke all target's onpageload handler
  2811.     var src = CCSSP.GetEventElement( arguments[0] );
  2812.     if( src == null )
  2813.         return;
  2814.         
  2815.     var strHoveredTargetID = null;
  2816.     for( var strTargetID in CEngine.objTarget )
  2817.     { // to detect which Target is hovering on
  2818.         if( CCSSP.IsDescendant( CEngine.objTarget[strTargetID].eleTarget, src ) )
  2819.         {
  2820.             strHoveredTargetID = strTargetID;
  2821.             break;
  2822.         }
  2823.     }
  2824.     
  2825.     if( strHoveredTargetID != null ) // the hovered target found
  2826.         CEngine.SendEventToOneTarget( strHoveredTargetID, "bsschover" );
  2827. }
  2828.  
  2829. CEngine.BuildTargetObject = function(target_ID,event_type,action_type,
  2830.             action_setting, event_additional)
  2831. {// to build target object 
  2832.     // to get the target object
  2833.     if( typeof( CEngine.objTarget[target_ID] ) != "object" )
  2834.         return false;// the engine's AddOneTarget function might have failed.
  2835.     var TargetObject = CEngine.objTarget[target_ID];
  2836.     
  2837.     // to prepare the parameters for the event manager
  2838.     var arrEvent = event_type.split("|"); // to split the combined event_type string
  2839.     var arrAction = action_type.split("|");//to split the combined action_type string
  2840.     for( var trim = 0; trim < arrEvent.length; trim++ )
  2841.         arrEvent[trim] = CCSSP.TrimSpace(arrEvent[trim]);
  2842.     
  2843.     for( trim = 0; trim < arrAction.length; trim++ )
  2844.         arrAction[trim] = CCSSP.TrimSpace(arrAction[trim]);
  2845.     
  2846.     var arrSetting = new Array(); 
  2847.     if( typeof(action_setting) == "string" )
  2848.         arrSetting = action_setting.split("|");// to split the combined action_setting string
  2849.     // to calibrate the arrays
  2850.     for( var i = arrSetting.length; i < arrAction.length; i++ )
  2851.     {
  2852.         if( typeof(arrSetting[i]) != "string" )
  2853.              arrSetting[i] = "";
  2854.     }                 
  2855.  
  2856.     // to prepare for dealing with the absolute posioning element
  2857.     TargetObject.eleTarget.ABSX = CCSSP.GetObjectLeft( TargetObject.eleTarget );
  2858.     TargetObject.eleTarget.ABSY = CCSSP.GetObjectTop( TargetObject.eleTarget );
  2859.  
  2860.     if( arrEvent.length > 1 )
  2861.     {// if event is combined, it must be : "bssctrigger1 | bssctrigger2"
  2862.         if( arrAction.length != 2 )
  2863.             return false; // if event is combined, there must be 2 actions
  2864.         for( i = 0 ; i < 2; i++ )
  2865.         {
  2866.             if( TargetObject.SetEventManager(arrEvent[i], arrAction[i], 
  2867.                 arrSetting[i], event_additional) == false )
  2868.                 return false; // the event manager has not been set up
  2869.         }
  2870.     }
  2871.     else // the event_type string is not combined
  2872.     {
  2873.         for( i = 0 ; i < arrAction.length; i++ )
  2874.         {
  2875.             TargetObject.SetEventManager(event_type, arrAction[i], arrSetting[i], event_additional);
  2876.             // to validate the event manager
  2877.             if( typeof(TargetObject.objManager[event_type]) != "object" ||
  2878.                     typeof(TargetObject.objManager[event_type][i]) != "object" )
  2879.                 return false; // the event manager has not been set up
  2880.         }
  2881.     }
  2882.     return true;
  2883. }
  2884.  
  2885. CEngine.BuildTriggerObject = function(trigger_ID, target_ID)
  2886. {// to build the trigger object
  2887.     var arrTrigger = trigger_ID.split("|"); // to split the combined trigger_ID string
  2888.     for( var i = 0; i < arrTrigger.length; i ++ )
  2889.     {// to get the trigger element then add it to the trigger list
  2890.         arrTrigger[i] = CCSSP.TrimSpace( arrTrigger[i] );
  2891.         var eleTrigger = CCSSP.GetObject( arrTrigger[i] );
  2892.         if( eleTrigger == null )
  2893.             continue; // the trigger_ID string in the HTML code maybe wrong
  2894.         CEngine.AddOneTrigger( arrTrigger[i], eleTrigger );
  2895.  
  2896.         // to get the target object
  2897.         if( typeof( this.objTrigger[arrTrigger[i]] ) != "object" )
  2898.             continue;// the engine's AddOneTarget function might have failed.
  2899.         CEngine.objTrigger[arrTrigger[i]].AddTargetID( target_ID );
  2900.     }
  2901. }
  2902. //End the definition of CEngine class
  2903.  
  2904. /// Section End  - CCSSP DHTM 1 (JavaScript 1.2)
  2905.  
  2906. /// Section Begin  - CCSSP DHTM 2 (JavaScript 1.2)
  2907.  
  2908. //Begin the definition of CAgencyXXXX classes
  2909.  
  2910. //Begin of the CAgencyShow definition
  2911. function CAgencyShow( element, bIsShow )
  2912. {
  2913.     this.ele = element;
  2914.     this.bIsShow = bIsShow;
  2915. }
  2916.  
  2917. CAgencyShow.prototype.PrepareEffect = function()
  2918. {
  2919.     CCSSP.ShowObject( this.ele, !this.bIsShow );
  2920. }
  2921.  
  2922. CAgencyShow.prototype.UpdateEffect = function()
  2923. {
  2924.     CCSSP.ShowObject( this.ele, this.bIsShow );
  2925. }
  2926.  
  2927. CAgencyShow.prototype.EndEffect = function()
  2928. {
  2929.     CCSSP.ShowObject( this.ele, !this.bIsShow );
  2930. }
  2931. // End of the CAgencyShow definition
  2932.  
  2933. // Begin of CAgencyFly definition
  2934. function CAgencyFly( element, settings, bIsIn )
  2935. {
  2936.     this.ele = element;
  2937.     this.bIsIn = bIsIn;
  2938.     this.duration = 1000; // default
  2939.     this.direction = "right";
  2940.  
  2941.     var arrAllSet = settings.split(",");
  2942.     for( var i = 0; i < arrAllSet.length; i ++ )
  2943.     {// to retrieve the setting
  2944.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  2945.         var arrOneSet = arrAllSet[i].split("=");
  2946.         for( var j = 0; j < arrOneSet.length; j++ )
  2947.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  2948.         switch( arrOneSet[0] )
  2949.         {
  2950.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  2951.         case "direction" : this.direction = arrOneSet[1]; break;
  2952.         }
  2953.     }
  2954.         
  2955.     if( CCSSP.bIsIE5 && this.ele.style.position != "absolute" )
  2956.         this.ele.style.position = "relative";
  2957.     this.timer = null;
  2958.     this.aniIndex = CEngine.arrAnimation.length;
  2959.     CEngine.arrAnimation[this.aniIndex] = this;
  2960. }
  2961.  
  2962. CAgencyFly.prototype.PrepareEffect = function()
  2963. {
  2964.     CCSSP.ShowObject(this.ele, !this.bIsIn );
  2965. }
  2966.  
  2967. CAgencyFly.prototype.UpdateEffect = function()
  2968. {
  2969.     if( this.timer == null )
  2970.         this.ResetParameters();
  2971.  
  2972.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  2973.     if( percent >= 1.0 )
  2974.         this.EndEffect();
  2975.     else
  2976.     {
  2977.         var newX = this.startX*(1.0-percent) +  this.finalX*percent;
  2978.         var newY = this.startY*(1.0-percent) +  this.finalY*percent;
  2979.         CCSSP.MoveObjectTo(this.ele, newX, newY);
  2980.         if( this.timer == null )
  2981.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  2982.     }
  2983. }
  2984.  
  2985. CAgencyFly.prototype.EndEffect = function()
  2986. {
  2987.     clearInterval( this.timer );
  2988.     this.timer = null;
  2989.  
  2990.     if( this.bIsIn ) // FlyIn
  2991.         CCSSP.MoveObjectTo(this.ele, this.finalX, this.finalY);
  2992.     else // FlyOut
  2993.         CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  2994.     CCSSP.ShowObject(this.ele, this.bIsIn );
  2995. }
  2996.  
  2997. CAgencyFly.prototype.ResetParameters = function()
  2998. {
  2999.     this.PrepareEffect();
  3000.     CCSSP.ShowObject(this.ele, true );
  3001.  
  3002.     this.startX = 0;
  3003.     this.startY = 0;
  3004.     this.finalX = 0;
  3005.     this.finalY = 0; 
  3006.     
  3007.     var offsetLeft = CCSSP.GetObjectWindowLeft(this.ele) + this.ele.offsetWidth;
  3008.     var offsetTop = CCSSP.GetObjectWindowTop(this.ele) + this.ele.offsetHeight;
  3009.     var offsetRight = CCSSP.GetWindowRight();
  3010.     var offsetBottom = CCSSP.GetWindowBottom();
  3011.  
  3012.     if( this.bIsIn )
  3013.     { // FlyIn
  3014.         this.finalX = this.ele.ABSX;
  3015.         this.finalY = this.ele.ABSY;
  3016.  
  3017.         switch( this.direction )
  3018.         {
  3019.         case "right": this.startX = offsetRight; this.startY = this.finalY; break;
  3020.         case "left": this.startX = -offsetLeft;  this.startY = this.finalY; break;
  3021.         case "down": this.startY = offsetBottom; this.startX = this.finalX; break;
  3022.         case "up":  this.startY = -offsetTop;    this.startX = this.finalX; break;
  3023.         case "downright":
  3024.               this.startX = ( offsetBottom < offsetRight) ? offsetBottom : offsetRight;
  3025.             this.startY = this.startX;        break;
  3026.         case "upright":
  3027.               this.startX = (offsetTop < offsetRight)? offsetTop : offsetRight;
  3028.             this.startY = -this.startX;        break;
  3029.         case "upleft":
  3030.             this.startX = -((offsetTop < offsetRight)? offsetTop : offsetRight);
  3031.             this.startY = this.startX;        break;
  3032.         case "downleft":
  3033.             this.startX = -(( offsetBottom < offsetRight) ? offsetBottom : offsetRight);
  3034.             this.startY = -this.startX;     break;
  3035.         }
  3036.     }
  3037.     else
  3038.     { // FlyOut
  3039.         this.startX = this.ele.ABSX;
  3040.         this.startY = this.ele.ABSY;
  3041.  
  3042.         switch( this.direction )
  3043.         {
  3044.         case "right": this.finalX = offsetRight;  this.finalY = this.startY; break;
  3045.         case "left": this.finalX = -offsetLeft;   this.finalY = this.startY;  break;
  3046.         case "down": this.finalY = offsetBottom;  this.finalX = this.startX; break;
  3047.         case "up":  this.finalY = -offsetTop;     this.finalX = this.startX; break;
  3048.         case "downright":
  3049.               this.finalX = ( offsetBottom < offsetRight) ? offsetBottom : offsetRight;
  3050.             this.finalY = this.finalX;        break;
  3051.         case "upright":
  3052.               this.finalX = (offsetTop < offsetRight)? offsetTop : offsetRight;
  3053.             this.finalY = -this.finalX;        break;
  3054.         case "upleft":
  3055.             this.finalX = -((offsetTop < offsetRight)? offsetTop : offsetRight);
  3056.             this.finalY = this.finalX;        break;
  3057.         case "downleft":
  3058.             this.finalX = -(( offsetBottom < offsetRight) ? offsetBottom : offsetRight);
  3059.             this.finalY = -this.finalX;     break;
  3060.         }
  3061.     }
  3062.     CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  3063.     this.startTime = (new Date()).getTime();
  3064. }
  3065. // End of the CAgencyFly definition
  3066.  
  3067. // Begin of CAgencySpiral
  3068. function CAgencySpiral( element, settings, bIsIn )
  3069. {
  3070.     this.ele = element;
  3071.     this.bIsIn = bIsIn;
  3072.     this.duration = 1000; // default
  3073.  
  3074.     var arrAllSet = settings.split(",");
  3075.     for( var i = 0; i < arrAllSet.length; i ++ )
  3076.     {// to retrieve the setting
  3077.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  3078.         var arrOneSet = arrAllSet[i].split("=");
  3079.         for( var j = 0; j < arrOneSet.length; j++ )
  3080.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  3081.         switch( arrOneSet[0] )
  3082.         {
  3083.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  3084.         }
  3085.     }
  3086.  
  3087.     if( CCSSP.bIsIE5 && this.ele.style.position != "absolute" )
  3088.         this.ele.style.position = "relative";
  3089.     this.timer = null;
  3090.     this.aniIndex = CEngine.arrAnimation.length;
  3091.     CEngine.arrAnimation[this.aniIndex] = this;
  3092. }
  3093.  
  3094. CAgencySpiral.prototype.PrepareEffect = function()
  3095. {
  3096.     CCSSP.ShowObject(this.ele, !this.bIsIn );
  3097. }
  3098.  
  3099. CAgencySpiral.prototype.UpdateEffect = function()
  3100. {
  3101.     if( this.timer == null )
  3102.         this.ResetParameters();
  3103.  
  3104.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  3105.     if( percent >= 1.0 )
  3106.         this.EndEffect();
  3107.     else
  3108.     {
  3109.         var rf = (this.bIsIn)? (1.0 - percent) : percent; 
  3110.         var t = (1.0-rf) * 4.0 * Math.PI
  3111.         var rxP = (this.bIsIn)? this.startX : this.finalX; 
  3112.         var ryP = (this.bIsIn)? this.startY : this.finalY; 
  3113.         var rx = (Math.abs(rxP) < 200) ? Math.abs(rxP) : 200;
  3114.         var ry = (Math.abs(ryP) < 200) ? Math.abs(ryP) : 200;
  3115.  
  3116.         var newX = Math.ceil(-rf*Math.cos(t)*rx) + this.ele.ABSX;
  3117.         var newY = Math.ceil(-rf*Math.sin(t)*ry) + this.ele.ABSY;
  3118.         CCSSP.MoveObjectTo(this.ele, newX, newY);
  3119.         if( this.timer == null )
  3120.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  3121.     }
  3122. }
  3123.  
  3124. CAgencySpiral.prototype.EndEffect = function()
  3125. {
  3126.     clearInterval( this.timer );
  3127.     this.timer = null;
  3128.     
  3129.     if( this.bIsIn ) // In
  3130.         CCSSP.MoveObjectTo(this.ele, this.finalX, this.finalY);
  3131.     else // Out
  3132.         CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  3133.     CCSSP.ShowObject(this.ele, this.bIsIn );
  3134. }
  3135.  
  3136. CAgencySpiral.prototype.ResetParameters = function()
  3137. {
  3138.     this.PrepareEffect();
  3139.     CCSSP.ShowObject(this.ele, true );
  3140.     this.startX = (this.bIsIn)? CCSSP.GetWindowRight() : this.ele.ABSX;
  3141.     this.startY = (this.bIsIn)? CCSSP.GetWindowBottom() : this.ele.ABSY;
  3142.     this.finalX = (this.bIsIn)? this.ele.ABSX : CCSSP.GetWindowRight();
  3143.     this.finalY = (this.bIsIn)? this.ele.ABSY : CCSSP.GetWindowBottom(); 
  3144.     
  3145.     CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  3146.     this.startTime = (new Date()).getTime();
  3147. }
  3148. // End of CAgencySpiral
  3149.  
  3150. // Begin of CAgencyElastic
  3151. function CAgencyElastic( element, settings)
  3152. {
  3153.     this.ele = element;
  3154.     this.duration = 1000; // default
  3155.     this.direction = "right";
  3156.  
  3157.     var arrAllSet = settings.split(",");
  3158.     for( var i = 0; i < arrAllSet.length; i ++ )
  3159.     {// to retrieve the setting
  3160.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  3161.         var arrOneSet = arrAllSet[i].split("=");
  3162.         for( var j = 0; j < arrOneSet.length; j++ )
  3163.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  3164.         switch( arrOneSet[0] )
  3165.         {
  3166.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  3167.         case "direction" : this.direction = arrOneSet[1]; break;
  3168.         }
  3169.     }
  3170.         
  3171.     if( CCSSP.bIsIE5 && this.ele.style.position != "absolute" )
  3172.         this.ele.style.position = "relative";
  3173.     this.timer = null;
  3174.     this.aniIndex = CEngine.arrAnimation.length;
  3175.     CEngine.arrAnimation[this.aniIndex] = this;
  3176. }
  3177.  
  3178. CAgencyElastic.prototype.PrepareEffect = function()
  3179. {
  3180.     CCSSP.ShowObject(this.ele, false );
  3181. }
  3182.  
  3183. CAgencyElastic.prototype.UpdateEffect = function()
  3184. {
  3185.     if( this.timer == null )
  3186.         this.ResetParameters();
  3187.  
  3188.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  3189.     if( percent >= 1.0 )
  3190.         this.EndEffect();
  3191.     else
  3192.     {
  3193.         var newX = this.startX;
  3194.         var newY = this.startY;
  3195.         var rf = Math.exp(-percent*3);
  3196.         var t = percent * 1.5 * Math.PI
  3197.         var rx = (Math.abs(this.startX) > Math.abs(this.startY)) ? this.startX : this.startY;
  3198.         switch (this.direction )
  3199.         {
  3200.         case "left":   
  3201.         case "right" : newX = rf*Math.cos(t)*rx + this.ele.ABSX; break;
  3202.         case "up":       
  3203.         case "down" :  newY = rf*Math.cos(t)*rx + this.ele.ABSX; break;
  3204.         }
  3205.         CCSSP.MoveObjectTo(this.ele, newX, newY);
  3206.         if( this.timer == null )
  3207.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  3208.     }
  3209. }
  3210.  
  3211. CAgencyElastic.prototype.EndEffect = function()
  3212. {
  3213.     CCSSP.MoveObjectTo(this.ele, this.finalX, this.finalY);
  3214.     clearInterval( this.timer );
  3215.     this.timer = null;
  3216. }
  3217.  
  3218. CAgencyElastic.prototype.ResetParameters = function()
  3219. {
  3220.     CCSSP.ShowObject(this.ele, true );
  3221.     this.startX = this.ele.ABSX;
  3222.     this.finalX = this.ele.ABSX;
  3223.     this.startY = this.ele.ABSY;
  3224.     this.finalY = this.ele.ABSY;
  3225.     
  3226.     switch (this.direction)
  3227.     { 
  3228.     case "left":  this.startX = -this.ele.offsetWidth; break;
  3229.     case "right": this.startX = this.ele.offsetWidth;  break;
  3230.     case "up":    this.startY = -this.ele.offsetHeight;break;
  3231.     case "down":  this.startY = this.ele.offsetHeight; break;
  3232.     }
  3233.     CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  3234.     this.startTime = (new Date()).getTime();
  3235. }
  3236. // End of CAgencyElastic
  3237.  
  3238. // Begin of CAgencyZoom
  3239. function CAgencyZoom( element, settings, bIsIn)
  3240. {
  3241.     this.ele = element;
  3242.     this.duration = 1000; // default
  3243.     
  3244.     var arrAllSet = settings.split(",");
  3245.     for( var i = 0; i < arrAllSet.length; i ++ )
  3246.     {// to retrieve the setting
  3247.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  3248.         var arrOneSet = arrAllSet[i].split("=");
  3249.         for( var j = 0; j < arrOneSet.length; j++ )
  3250.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  3251.         switch( arrOneSet[0] )
  3252.         {
  3253.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  3254.         }
  3255.     }
  3256.  
  3257.     this.bIsIn = bIsIn;
  3258.     this.timer = null;
  3259.     this.aniIndex = CEngine.arrAnimation.length;
  3260.     CEngine.arrAnimation[this.aniIndex] = this;
  3261. }
  3262.  
  3263. CAgencyZoom.prototype.PrepareEffect = function()
  3264. {
  3265.     CCSSP.ShowObject(this.ele, false);
  3266. }
  3267.  
  3268. CAgencyZoom.prototype.UpdateEffect = function()
  3269. {
  3270.     if( this.timer == null )
  3271.         this.ResetParameters();
  3272.  
  3273.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  3274.     if( percent >= 1.0 )
  3275.         this.EndEffect();
  3276.     else
  3277.     {
  3278.         var nFactorIn = Math.ceil(50+50*percent);
  3279.         var nFactorOut = Math.ceil(100+200*(1-percent));
  3280.         var AlterFontsize = ((this.bIsIn)? nFactorIn : nFactorOut) + "%";
  3281.         var AlterFactor = ((this.bIsIn)? nFactorIn : nFactorOut) / 100;
  3282.         
  3283.         this.UpdateEffectAllChildren(this.ele, AlterFontsize, AlterFactor);
  3284.         for(var index = 0; index < this.ele.all.length; index++)
  3285.             this.UpdateEffectAllChildren(this.ele.all[index], AlterFontsize, AlterFactor);
  3286.             
  3287.         if( this.timer == null )
  3288.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  3289.     }
  3290. }
  3291.  
  3292. CAgencyZoom.prototype.UpdateEffectAllChildren = function(child, FontSize, Factor)
  3293. {
  3294.     if( CCSSP.IsTextTag(child) )
  3295.         child.style.fontSize = FontSize;
  3296.     else
  3297.     {
  3298.         if( typeof(child.orgWidth) == "number" )
  3299.             child.style.width = Factor * child.orgWidth;
  3300.         if( typeof(child.orgHeight) == "number" )
  3301.             child.style.height = Factor * child.orgHeight;
  3302.     }
  3303. }
  3304.  
  3305. CAgencyZoom.prototype.EndEffect = function()
  3306. {
  3307.     this.EndEffectAllChildren(this.ele);
  3308.     for(var index = 0; index < this.ele.all.length; index++)
  3309.         this.EndEffectAllChildren(this.ele.all[index]);
  3310.     
  3311.     clearInterval( this.timer );
  3312.     this.timer = null;
  3313. }
  3314.  
  3315. CAgencyZoom.prototype.EndEffectAllChildren = function( child )
  3316. {    
  3317.     if( CCSSP.IsTextTag(child) )
  3318.         child.style.fontSize = child.orgFontSize;
  3319.     else
  3320.     {
  3321.         if( typeof(child.intactWidth) != "undefined" )
  3322.         {
  3323.             child.width = child.intactWidth;
  3324.             child.height = child.intactHeight;
  3325.         }
  3326.         else if( typeof(child.style.intactPixelWidth) != "undefined" )
  3327.         {
  3328.             child.style.pixelWidth = child.style.intactPixelWidth;
  3329.             child.style.pixelHeight = child.style.intactPixelHeight;
  3330.         }
  3331.     }
  3332. }
  3333.  
  3334. CAgencyZoom.prototype.ResetParameters = function()
  3335. {
  3336.     this.PrepareEffect();
  3337.     this.ResetParametersAllChildren( this.ele );
  3338.     for(var index = 0; index < this.ele.all.length; index++)
  3339.         this.ResetParametersAllChildren(this.ele.all[index]);
  3340.         
  3341.     this.startTime = (new Date()).getTime();
  3342. }
  3343.  
  3344. CAgencyZoom.prototype.ResetParametersAllChildren = function( child )
  3345. {
  3346.     CCSSP.ShowObject(child, true );
  3347.     if( (child.tagName == "DIV") && (child.parentElement.tagName == "TD") )
  3348.         child.width = "100%";// if the div is inside a cell of table, we need the this hack
  3349.     
  3350.     if( CCSSP.IsTextTag(child) )
  3351.         child.orgFontSize = child.style.fontSize;
  3352.     else
  3353.     {
  3354.         if( child.width > "" || child.height > "" )
  3355.         {
  3356.             child.orgWidth = child.intactWidth = child.width;
  3357.             child.orgHeight = child.intactHeight = child.height;
  3358.         }
  3359.         else if( ( typeof(child.orgWidth) != "number" ) && (typeof(child.orgHeight) != "number") )
  3360.         {
  3361.             child.orgWidth = child.style.intactPixelWidth = child.style.pixelWidth;
  3362.             child.orgHeight = child.style.intactPixelHeight = child.style.pixelHeight;
  3363.         }
  3364.     }
  3365. }
  3366. // End of CAgencyZoom
  3367.  
  3368. //// the following effects will use IE's exclusive "filter" function ////
  3369. // Begin of CAgencyAlpha definition
  3370. function CAgencyAlpha( element, settings, bIsIn )
  3371. {// because of "visual filter" style, this won't work in Navigator
  3372.     this.ele = element;
  3373.     this.bIsIn = bIsIn;
  3374.  
  3375.     // to set the default value
  3376.     this.startOpacity = (this.bIsIn) ? 0 : 100;
  3377.     this.endOpacity = (this.bIsIn) ? 100 : 0;
  3378.     
  3379.     this.duration = 1000; // default
  3380.     
  3381.     var arrAllSet = settings.split(",");
  3382.     for( var i = 0; i < arrAllSet.length; i ++ )
  3383.     {// to retrieve the setting
  3384.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  3385.         var arrOneSet = arrAllSet[i].split("=");
  3386.         for( var j = 0; j < arrOneSet.length; j++ )
  3387.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  3388.         switch( arrOneSet[0] )
  3389.         {
  3390.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  3391.         }
  3392.     }
  3393.     
  3394.     this.timer = null;
  3395.     this.aniIndex = CEngine.arrAnimation.length;
  3396.     CEngine.arrAnimation[this.aniIndex] = this;
  3397. }
  3398.  
  3399. CAgencyAlpha.prototype.PrepareEffect = function()
  3400. {// to set the visual filter function
  3401.     // the visual filter ONLY work when set by "Width and Height" or
  3402.     // absolute position for DIV, SPAN and normal tag ( such as p )
  3403.     // but, "absolute" cause the following elements overlap, so:
  3404.     CCSSP.PrepareFilter( this.ele );
  3405.     CCSSP.ShowObject(this.ele, !this.bIsIn );
  3406. }
  3407.  
  3408. CAgencyAlpha.prototype.UpdateEffect = function()
  3409. {// to set the visual filter function
  3410.     if( this.timer == null )
  3411.         this.ResetParameters();
  3412.     if( typeof(this.ele.filters.alpha) != "object" )
  3413.     {
  3414.         this.EndEffect();
  3415.         return;
  3416.     }
  3417.  
  3418.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  3419.     if( percent >= 1.0 )
  3420.         this.EndEffect();
  3421.     else if( typeof(this.ele.filters.alpha) == "object" )
  3422.     {
  3423.         this.ele.filters.alpha.opacity = this.startOpacity*(1.0-percent) + this.endOpacity*percent;
  3424.         if( this.timer == null )
  3425.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  3426.     }
  3427. }
  3428.  
  3429. CAgencyAlpha.prototype.EndEffect = function()
  3430. {// to remove the visual filter function
  3431.     clearInterval( this.timer );
  3432.     this.timer = null;
  3433.     this.ele.style.filter = "";
  3434.     CCSSP.ShowObject(this.ele, this.bIsIn );
  3435. }
  3436.  
  3437. CAgencyAlpha.prototype.ResetParameters = function()
  3438. {
  3439.     this.PrepareEffect();
  3440.     CCSSP.ShowObject(this.ele, true );
  3441.     this.ele.style.filter = "alpha(opacity=" + this.startOpacity + ")";
  3442.     this.startTime = (new Date()).getTime();
  3443. }
  3444. // End of the CAgencyAlpha definition
  3445.  
  3446. // Begin of CAgencyWave definition
  3447. function CAgencyWave( element, settings )
  3448. {// because of "visual filter" style, this won't work in Navigator
  3449.     this.ele = element;
  3450.  
  3451.     this.duration = 0; // default
  3452.     this.strength = 10;
  3453.     this.freq = 1;
  3454.     this.lightstrength = 1;
  3455.     
  3456.     var arrAllSet = settings.split(",");
  3457.     for( var i = 0; i < arrAllSet.length; i ++ )
  3458.     {// to retrieve the setting
  3459.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  3460.         var arrOneSet = arrAllSet[i].split("=");
  3461.         for( var j = 0; j < arrOneSet.length; j++ )
  3462.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  3463.         switch( arrOneSet[0] )
  3464.         {
  3465.         case "duration" : this.duration = 100000/arrOneSet[1]; break;
  3466.         case "strength" : this.strength = arrOneSet[1]; break;
  3467.         case "freq" : this.freq = arrOneSet[1]; break;
  3468.         case "lightstrength" : this.lightstrength = arrOneSet[1]; break;
  3469.         }
  3470.     }
  3471.  
  3472.     this.timer = null;
  3473.     this.aniIndex = CEngine.arrAnimation.length;
  3474.     CEngine.arrAnimation[this.aniIndex] = this;
  3475. }
  3476.  
  3477. CAgencyWave.prototype.PrepareEffect = function()
  3478. {// to set the visual filter function
  3479.     CCSSP.PrepareFilter(this.ele);
  3480.  
  3481.     CCSSP.ShowObject(this.ele, true );
  3482. }
  3483.  
  3484. CAgencyWave.prototype.UpdateEffect = function()
  3485. {// to set the visual filter function
  3486.     if( this.timer == null )
  3487.         this.ResetParameters();
  3488.     if( typeof(this.ele.filters.wave) != "object" )
  3489.     {
  3490.         this.EndEffect();
  3491.         return;
  3492.     }
  3493.  
  3494.     if( this.duration > 0 )
  3495.     {
  3496.         var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  3497.         if( percent >= 1.0 )
  3498.         {
  3499.             this.EndEffect();
  3500.             return;
  3501.         }
  3502.     }
  3503.     
  3504.     this.ele.filters.wave.phase += 5;
  3505.     this.ele.filters.wave.phase %= 100;
  3506.     if( this.timer == null )
  3507.         this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 50 );
  3508. }
  3509.  
  3510. CAgencyWave.prototype.EndEffect = function()
  3511. {// to remove the visual filter function
  3512.     this.ele.style.filter = "";
  3513.     clearInterval( this.timer );
  3514.     this.timer = null;
  3515. }
  3516.  
  3517. CAgencyWave.prototype.ResetParameters = function()
  3518. {
  3519.     this.PrepareEffect();
  3520.     this.ele.style.filter = "wave(strength=" + this.strength + ",freq=" + 
  3521.      this.freq +", lightstrength=" + this.lightstrength +",phase=0);";
  3522.     this.startTime = (new Date()).getTime();
  3523. }
  3524. // End of the CAgencyWave definition
  3525.  
  3526. // Begin of CAgencyGlow definition
  3527. function CAgencyGlow( element, settings )
  3528. {// because of "visual filter" style, this won't work in Navigator
  3529.     this.ele = element;
  3530.  
  3531.     // to set the default value
  3532.     this.glowColor = "green";
  3533.     this.glowStrength = "3";
  3534.     
  3535.     var arrAllSet = settings.split(",");
  3536.     for( var i = 0; i < arrAllSet.length; i ++ )
  3537.     {
  3538.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  3539.         var arrOneSet = arrAllSet[i].split("=");
  3540.         for( var j = 0; j < arrOneSet.length; j++ )
  3541.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  3542.         switch( arrOneSet[0] )
  3543.         {
  3544.         case "color" : this.glowColor = arrOneSet[1]; break;
  3545.         case "strength" : this.glowStrength = arrOneSet[1]; break;
  3546.         }
  3547.     }
  3548. }
  3549.  
  3550. CAgencyGlow.prototype.PrepareEffect = function()
  3551. {
  3552.     CCSSP.PrepareFilter(this.ele);
  3553.     CCSSP.ShowObject(this.ele, true );
  3554.     if( this.ele.style.backgroundColor != "" )
  3555.     {//style.backgroundColor somehow stop the visual filter
  3556.         this.ele.intactBackgroundColor = this.ele.style.backgroundColor;
  3557.         this.ele.style.backgroundColor = "";
  3558.     }
  3559. }
  3560.  
  3561. CAgencyGlow.prototype.UpdateEffect = function()
  3562. {// to set the visual filter function
  3563.     this.PrepareEffect();
  3564.     this.ele.style.filter = "glow(Color=" + this.glowColor + ", Strength=" + 
  3565.         this.glowStrength + ", enabled=true" +")";
  3566. }
  3567.  
  3568. CAgencyGlow.prototype.EndEffect = function()
  3569. {// to remove the visual filter function
  3570.     this.ele.style.filter = "";
  3571.     if( typeof(this.ele.intactBackgroundColor) != "undefined" )
  3572.         this.ele.style.backgroundColor = this.ele.intactBackgroundColor;
  3573. }
  3574. // End of the CAgencyGlow definition
  3575.  
  3576. // Begin of CAgencyDropShadow definition
  3577. function CAgencyDropShadow( element, settings )
  3578. {// because of "visual filter" style, this won't work in Navigator
  3579.     this.ele = element;
  3580.  
  3581.     // to set the default value
  3582.     this.shadowColor = "black"; 
  3583.     this.shadowOffx = "1";
  3584.     this.shadowOffy = "1";
  3585.     
  3586.     var arrAllSet = settings.split(",");
  3587.     for( var i = 0; i < arrAllSet.length; i ++ )
  3588.     {
  3589.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  3590.         var arrOneSet = arrAllSet[i].split("=");
  3591.         for( var j = 0; j < arrOneSet.length; j++ )
  3592.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  3593.         switch( arrOneSet[0] )
  3594.         {
  3595.         case "color" : this.shadowColor = arrOneSet[1]; break;
  3596.         case "offx" : this.shadowOffx = arrOneSet[1]; break;
  3597.         case "offy" : this.shadowOffy = arrOneSet[1]; break;
  3598.         }
  3599.     }
  3600. }
  3601.  
  3602. CAgencyDropShadow.prototype.PrepareEffect = function()
  3603. {
  3604.     CCSSP.PrepareFilter(this.ele);
  3605.     CCSSP.ShowObject(this.ele, true );
  3606.     
  3607.     if( this.ele.style.backgroundColor != "" )
  3608.     {//style.backgroundColor somehow stop the visual filter
  3609.         this.ele.intactBackgroundColor = this.ele.style.backgroundColor;
  3610.         this.ele.style.backgroundColor = "";
  3611.     }
  3612. }
  3613.  
  3614. CAgencyDropShadow.prototype.UpdateEffect = function()
  3615. {// to set the visual filter function
  3616.     this.PrepareEffect();
  3617.     this.ele.style.filter = "dropshadow(color=" + this.shadowColor + ", offx=" + 
  3618.         this.shadowOffx + ", offy=" + this.shadowOffy + ")";
  3619. }
  3620.  
  3621. CAgencyDropShadow.prototype.EndEffect = function()
  3622. {// to remove the visual filter function
  3623.     this.ele.style.filter = "";
  3624.     if( typeof(this.ele.intactBackgroundColor) != "undefined" )
  3625.         this.ele.style.backgroundColor = this.ele.intactBackgroundColor;
  3626. }
  3627. // End of the CAgencyDropShadow definition
  3628.  
  3629. // Begin of CAgencyRevealTrans definition
  3630. function CAgencyRevealTrans( element, settings )
  3631. {// because of "visual filter" style, this won't work in Navigator
  3632.     this.ele = element;
  3633.  
  3634.     // to set the default value
  3635.     this.duration = 1.0; //The value is specified in seconds.milliseconds format (0.0000).
  3636.     this.transition = 0;
  3637.     
  3638.     var arrAllSet = settings.split(",");
  3639.     for( var i = 0; i < arrAllSet.length; i ++ )
  3640.     {
  3641.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  3642.         var arrOneSet = arrAllSet[i].split("=");
  3643.         for( var j = 0; j < arrOneSet.length; j++ )
  3644.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  3645.         switch( arrOneSet[0] )
  3646.         {
  3647.         case "type" : this.transition = arrOneSet[1]; break;
  3648.         case "duration" : this.duration = 100/arrOneSet[1];    break;
  3649.         }
  3650.     }
  3651. }
  3652.  
  3653. CAgencyRevealTrans.prototype.PrepareEffect = function()
  3654. {
  3655.     CCSSP.PrepareFilter(this.ele);
  3656.     CCSSP.ShowObject( this.ele, false);
  3657. }
  3658.  
  3659. CAgencyRevealTrans.prototype.UpdateEffect = function()
  3660. {// to set the visual filter function
  3661.     if( typeof( this.ele.filters.RevealTrans ) == "object" )
  3662.     {
  3663.         if( this.ele.filters.RevealTrans.status == 2 )
  3664.             this.ele.filters.RevealTrans.stop();  
  3665.     }
  3666.  
  3667.     this.PrepareEffect();
  3668.     
  3669.     this.ele.style.filter = "RevealTrans(duration=" + this.duration + 
  3670.         ", transition=" + this.transition + ")";
  3671.     
  3672.     if( typeof( this.ele.filters.RevealTrans ) == "object" )
  3673.     {
  3674.         this.ele.filters.RevealTrans.apply();
  3675.         CCSSP.ShowObject( this.ele, true);
  3676.         this.ele.filters.RevealTrans.play();  
  3677.     }
  3678.     else
  3679.         CCSSP.ShowObject( this.ele, true);
  3680. }
  3681.  
  3682. CAgencyRevealTrans.prototype.EndEffect = function()
  3683. {
  3684.     if( typeof( this.ele.filters.RevealTrans ) == "object" )
  3685.         this.ele.filters.RevealTrans.stop();  
  3686.     this.ele.style.filter = "";
  3687. }
  3688. // End of the CAgencyRevealTrans definition
  3689.  
  3690. // Begin of CAgencyBlur definition
  3691. function CAgencyBlur( element, settings )
  3692. {// because of "visual filter" style, this won't work in Navigator
  3693.     this.ele = element;
  3694.  
  3695.     // to set the default value
  3696.     this.strength = "5";
  3697.     this.direction = "90";
  3698.     
  3699.     var arrAllSet = settings.split(",");
  3700.     for( var i = 0; i < arrAllSet.length; i ++ )
  3701.     {
  3702.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  3703.         var arrOneSet = arrAllSet[i].split("=");
  3704.         for( var j = 0; j < arrOneSet.length; j++ )
  3705.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  3706.         switch( arrOneSet[0] )
  3707.         {
  3708.         case "strength" : this.strength = arrOneSet[1]; break;
  3709.         case "direction" : this.direction = arrOneSet[1]; break;
  3710.         }
  3711.     }
  3712. }
  3713.  
  3714. CAgencyBlur.prototype.PrepareEffect = function()
  3715. {
  3716.     CCSSP.PrepareFilter(this.ele);
  3717.     CCSSP.ShowObject(this.ele, true );
  3718. }
  3719.  
  3720. CAgencyBlur.prototype.UpdateEffect = function()
  3721. {// to set the visual filter function
  3722.     CCSSP.PrepareFilter(this.ele);
  3723.     this.ele.style.filter = "blur(strength=" + this.strength + 
  3724.         ", direction=" + this.direction + ")";
  3725. }
  3726.  
  3727. CAgencyBlur.prototype.EndEffect = function()
  3728. {// to remove the visual filter function
  3729.     this.ele.style.filter = "";
  3730. }
  3731. // End of the CAgencyBlur definition
  3732.  
  3733. // Begin of CAgencyChangeFilter definition
  3734. function CAgencyChangeFilter( element, settings ) // flipH, flipV, invert, grey,
  3735. {// because of "visual filter" style, this won't work in Navigator
  3736.     this.ele = element;
  3737.  
  3738.     // to set the default value
  3739.     this.filterFunction = settings;
  3740. }
  3741.  
  3742. CAgencyChangeFilter.prototype.PrepareEffect = function()
  3743. {
  3744.     CCSSP.PrepareFilter(this.ele);
  3745.     CCSSP.ShowObject(this.ele, true );
  3746. }
  3747.  
  3748. CAgencyChangeFilter.prototype.UpdateEffect = function()
  3749. {// to set the visual filter function
  3750.     CCSSP.PrepareFilter(this.ele);
  3751.     this.ele.style.filter = this.filterFunction;
  3752. }
  3753.  
  3754. CAgencyChangeFilter.prototype.EndEffect = function()
  3755. {// to remove the visual filter function
  3756.     this.ele.style.filter = "";
  3757. }
  3758. // End of the CAgencyChangeFilter definition
  3759.  
  3760. // The effects below change the style on the fly, so they won't work in Navigator
  3761.  
  3762. // Begin of CAgencyFontChange definition, 
  3763. function CAgencyFontChange( element, settings )
  3764. {//this class can be replace by CAgencyChangeStyle,provided the "settings" is standard CSS string.
  3765.     this.ele = element;
  3766.     
  3767.     // to retrieve the original font style
  3768.     this.RetrieveOldFont( this.ele );
  3769.     
  3770.     // to set the default font to change
  3771.     this.newfontFamily = this.ele.oldFontFamily;
  3772.     this.newfColor = this.ele.oldColor;
  3773.     this.newtextDecoration = this.ele.oldTextDecoration;
  3774.     this.newfontWeight = this.ele.oldFontWeight;
  3775.     this.newfontStyle = this.ele.oldFontStyle;
  3776.     this.newfontSize = this.ele.oldFontSize;
  3777.     this.newBackgroundColor = this.ele.oldBackgroundColor;
  3778.     
  3779.     var arrAllSet = settings.split(",");
  3780.     for( var i = 0; i < arrAllSet.length; i ++ )
  3781.     {// to retrieve the setting
  3782.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  3783.         var arrOneSet = arrAllSet[i].split("=");
  3784.         for( var j = 0; j < arrOneSet.length; j++ )
  3785.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  3786.         switch( arrOneSet[0] )
  3787.         {
  3788.         case "font-family" : this.newfontFamily = arrOneSet[1]; break;
  3789.         case "color" : this.newfColor = arrOneSet[1]; break;
  3790.         case "underline" : this.newtextDecoration = (arrOneSet[1]=="on")? "underline" : "none"; break;
  3791.         case "bold" : this.newfontWeight = (arrOneSet[1]=="on")? "bold" : "normal"; break;
  3792.         case "italic" : this.newfontStyle = (arrOneSet[1]=="on")? "italic" : "normal"; break;
  3793.         case "size" : this.newfontSize = arrOneSet[1]; break;
  3794.         case "background-color" : this.newBackgroundColor = arrOneSet[1]; break;
  3795.         }
  3796.     }
  3797. }
  3798.  
  3799. CAgencyFontChange.prototype.RetrieveOldFont = function(objChild)
  3800. {
  3801.     if( typeof(objChild.oldFontFamily) == "undefined" )
  3802.         objChild.oldFontFamily = objChild.style.fontFamily;
  3803.     if( typeof(objChild.oldColor) == "undefined" )
  3804.         objChild.oldColor = objChild.style.color;
  3805.     if( typeof(objChild.oldTextDecoration) == "undefined" )
  3806.         objChild.oldTextDecoration = objChild.style.textDecoration;
  3807.     if( typeof(objChild.oldFontWeight) == "undefined" )
  3808.         objChild.oldFontWeight = objChild.style.fontWeight;
  3809.     if( typeof(objChild.oldFontStyle) == "undefined" )
  3810.         objChild.oldFontStyle = objChild.style.fontStyle;
  3811.     if( typeof(objChild.oldFontSize) == "undefined" )
  3812.         objChild.oldFontSize = objChild.style.fontSize;
  3813.     if( typeof(objChild.oldBackgroundColor) == "undefined" )
  3814.         objChild.oldBackgroundColor = objChild.style.backgroundColor;
  3815. }
  3816.  
  3817. CAgencyFontChange.prototype.PrepareEffect = function()
  3818. {
  3819.     // as for expanding text, the child is created after the constructor called
  3820.     for(var index = 0; index < this.ele.all.length; index++)
  3821.         this.RetrieveOldFont(this.ele.all[index]);
  3822.     CCSSP.ShowObject(this.ele, true );
  3823. }
  3824.  
  3825. CAgencyFontChange.prototype.UpdateEffect = function()
  3826. {// to change the font
  3827.     this.PrepareEffect();
  3828.     this.UpdateEffectAllChildren( this.ele );
  3829.     for( var index = 0; index < this.ele.all.length; index++)
  3830.         this.UpdateEffectAllChildren(this.ele.all[index]);
  3831. }
  3832.  
  3833. CAgencyFontChange.prototype.UpdateEffectAllChildren = function(objChild)
  3834. {
  3835.     objChild.style.fontFamily = this.newfontFamily;
  3836.     objChild.style.color = this.newfColor;
  3837.     objChild.style.textDecoration = this.newtextDecoration;
  3838.     objChild.style.fontWeight = this.newfontWeight;
  3839.     objChild.style.fontStyle = this.newfontStyle;
  3840.     objChild.style.fontSize = this.newfontSize;
  3841.     objChild.style.backgroundColor = this.newBackgroundColor;
  3842. }
  3843.  
  3844. CAgencyFontChange.prototype.EndEffect = function()
  3845. {// to reinstate the original font style
  3846.     this.EndEffectAllChildren( this.ele );
  3847.     for( var index = 0; index < this.ele.all.length; index++)
  3848.         this.EndEffectAllChildren(this.ele.all[index]);
  3849. }
  3850.  
  3851. CAgencyFontChange.prototype.EndEffectAllChildren = function( objChild )
  3852. {
  3853.     if( typeof(objChild.oldFontFamily) != "undefined" )
  3854.         objChild.style.fontFamily = objChild.oldFontFamily;
  3855.     if( typeof(objChild.oldColor) != "undefined" )
  3856.         objChild.style.color = objChild.oldColor;
  3857.     if( typeof(objChild.oldFontWeight) != "undefined" )
  3858.         objChild.style.fontWeight = objChild.oldFontWeight;
  3859.     if( typeof(objChild.oldFontStyle) != "undefined" )
  3860.         objChild.style.fontStyle = objChild.oldFontStyle;
  3861.     if( typeof(objChild.oldFontSize) != "undefined" )
  3862.         objChild.style.fontSize = objChild.oldFontSize;
  3863.     if( typeof(objChild.oldTextDecoration) != "undefined" )
  3864.         objChild.style.textDecoration = objChild.oldTextDecoration;
  3865.     if( typeof(objChild.oldBackgroundColor) != "undefined" )
  3866.         objChild.style.backgroundColor = objChild.oldBackgroundColor;
  3867. }
  3868. // End of the CAgencyFontChange definition
  3869.  
  3870. // Begin of the CAgencyChangeStyle definition
  3871. function CAgencyChangeStyle( element, settings )
  3872. {//this class can be replace by CAgencyChangeStyle,provided the "settings" is standard CSS string.
  3873.     this.ele = element;
  3874.     
  3875.     // to retrieve the original style
  3876.     this.oldstyle = this.ele.style.cssText;
  3877.     
  3878.     // to set the default style
  3879.     this.newStyle = this.oldstyle;
  3880.     
  3881.     if( typeof(settings) == "string" && settings.length > 1 )
  3882.         this.newStyle = this.oldstyle + " " + settings;
  3883. }
  3884.  
  3885. CAgencyChangeStyle.prototype.PrepareEffect = function()
  3886. {
  3887.     CCSSP.ShowObject(this.ele, true );
  3888. }
  3889.  
  3890. CAgencyChangeStyle.prototype.UpdateEffect = function()
  3891. {// to change the style
  3892.     this.ele.style.cssText = this.newStyle;
  3893. }
  3894.  
  3895. CAgencyChangeStyle.prototype.EndEffect = function()
  3896. {// to reinstate the original style
  3897.     this.ele.style.cssText = this.oldStyle;
  3898. }
  3899. // End of the CAgencyChangeStyle definition
  3900.  
  3901. //End the definition of CAgencyXXXX classes
  3902.  
  3903. //Begin to collaborate with other event handler settings 
  3904. CCSSP.RegisterEventHandler( window, "onload", "CEngine.OnPageLoad();BSSCOnLoad();kadovInitTriggersInHead();");
  3905. CCSSP.RegisterEventHandler( document, "onclick", "CEngine.OnPageClick();BSSCOnClick();");
  3906. CCSSP.RegisterEventHandler( document, "onmouseover", "CEngine.OnMouseOver();BSSCOnMouseOver();" );
  3907. CCSSP.RegisterEventHandler( document, "onmouseout", "CEngine.OnMouseOver();BSSCOnMouseOut();" );
  3908. CCSSP.RegisterEventHandler( window, "onunload", "BSSCOnUnload();");
  3909. //End to collaborate with other event handler settings
  3910.  
  3911.  
  3912. /// Section End  - CCSSP DHTM 2 (JavaScript 1.2)
  3913.  
  3914. //// Segment End -- (JavaScript 1.2)
  3915.