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