home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2002 August / INTERNET94.ISO / pc / software / windows / mail / ft_gate_office / officewebhelp / ehlpdht2.js < prev    next >
Encoding:
JavaScript  |  2002-02-27  |  68.9 KB  |  2,212 lines

  1. //// Segment Begin -- (JavaScript 1.2)
  2. // eHelp« Corporation Dynamic HTML JavaScript 
  3. // Copyright⌐ 1998-2000 eHelp« Corporation.All rights reserved.
  4. // Version=4.45
  5.  
  6. // Warning:Do not modify this file.It is generated by RoboHELP« and changes will be overwritten.
  7.  
  8.  
  9. /// Section Begin  - kadov DHTM (JavaScript 1.2)
  10.  
  11. //Begin to support extended and dropdown text effects.
  12. function kadovIsParagraph(el)
  13. {
  14.     return( el.tagName == "P" || el.tagName.indexOf("H") == 0 ) ? true : false;
  15. }
  16.  
  17. function kadovInitEachChild(el)
  18. {    
  19.     for(var i=0; i<el.children.length; i++)
  20.     {
  21.         var child = el.children[i];
  22.         if( child.tagName == "SCRIPT" || child.tagName == "!" )
  23.             continue;
  24.  
  25.         if( child.id != "" )
  26.         {
  27.             // to wipe out the onload effects
  28.             var onLoadEffect = child.style.getAttribute( "x-on-pageload" );
  29.             if( (onLoadEffect != null) && (onLoadEffect > "") )
  30.                 child.style.setAttribute( "x-on-pageload", "" );
  31.             
  32.             var href = child.getAttribute("href")
  33.             if( href != null && href > "" && href.indexOf( "BSSCPopup" ) >= 0 )
  34.                 kadovFilePopupInit(child.id); // Init for Popup
  35.             else if( child.className == "dropspot" || child.className == "expandspot" || 
  36.                      child.className == "glossterm" )
  37.                 kadovTextPopupInit(child.id);// Init for Expanding/Glossary or DropDown text
  38.             else if( child.className == "trigger")
  39.                 kadovInitTrigger(child.id);// Init for Trigger
  40.             else
  41.             {
  42.                 kadovInitEffects(child.id);// Init for DHTML effects
  43.                 CEngine.SetOneTargetInitialState( child.id );
  44.             }
  45.         }
  46.         
  47.         if( (child.tagName == "IMG") && (child.getAttribute("dynsrc") > "") )
  48.             child.start = "mouseover";// to start a AVI file. fileopen doesn't work
  49.  
  50.         kadovInitEachChild(child);
  51.     }
  52. }
  53.  
  54. function kadovRetrieveTextInner(el)
  55. {    
  56.     var x = "";
  57.     if( (!el) || (el.tagName == "!") || (el.tagName == "SCRIPT" ))
  58.         return x;
  59.  
  60.     if( kadovIsParagraph(el) )
  61.     {
  62.         var strNewID = " ";
  63.         if( el.id != "" )
  64.             strNewID += "id=" + el.id + "_NewSpan ";
  65.         x = "<span" + strNewID + "style='" + el.style.cssText + "'>" + el.innerHTML + "</span>";
  66.     }
  67.     else
  68.     {
  69.         for(var i=0; i<el.children.length; i++)
  70.             x += kadovRetrieveTextInner( el.children[i] );
  71.     }
  72.     return x;
  73. }
  74.  
  75. function kadovRetrieveCleanHTML( strRawHTML, strTagOpen, strTagClose, nDistance )
  76. {    
  77.     var nTagOpen = strRawHTML.indexOf( strTagOpen, 0 );
  78.     if( nTagOpen < 0 )
  79.         return strRawHTML;
  80.  
  81.     var nTagClose = strRawHTML.indexOf( strTagClose, nTagOpen);
  82.     if( nTagClose < nTagOpen )
  83.         return strRawHTML;
  84.         
  85.     if( typeof(nDistance) == "number" && nDistance > 0 )
  86.         if( (nTagClose - nTagOpen) != nDistance )
  87.             return strRawHTML;
  88.         
  89.     var strCleanOnce = strRawHTML.substring(0, nTagOpen) + strRawHTML.substr(nTagClose + strTagClose.length) ;
  90.     return     kadovRetrieveCleanHTML( strCleanOnce, strTagOpen, strTagClose );
  91. }
  92.  
  93. function kadovAdjustObjectTag(strRawHTML, nStartPos)
  94. {// adjust object tag for related topics HTML control, because innerHTML misses out the item settings
  95.     
  96.     //Is there any DTC?
  97.     var strDTCTagOpen = '<!--Metadata type="DesignerControl" startspan';
  98.     var strDTCTagClose = '<!--Metadata type="DesignerControl" endspan-->';
  99.     var nDTCTagOpen = strRawHTML.indexOf( strDTCTagOpen, nStartPos );
  100.     if( nDTCTagOpen < 0 )
  101.         return strRawHTML;
  102.     var nDTCTagClose = strRawHTML.indexOf( strDTCTagClose, nDTCTagOpen );
  103.     if( nDTCTagClose < nDTCTagOpen)
  104.         return strRawHTML; // no Design Time Controls;
  105.         
  106.     //Is the DTC HTML Help Control?
  107.     var strRTObjTagOpen = 'classid=clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11';
  108.     var strRTObjTagClose = '</OBJECT>';
  109.     var nRTObjTagOpen = strRawHTML.indexOf( strRTObjTagOpen, nDTCTagOpen );
  110.     if( nRTObjTagOpen < nDTCTagOpen )
  111.         return strRawHTML;
  112.     var nRTObjTagClose = strRawHTML.indexOf( strRTObjTagClose, nRTObjTagOpen );
  113.     if( nRTObjTagClose < nRTObjTagOpen )
  114.         return strRawHTML; // is not a HTML help control
  115.         
  116.     // Is it a related Topics html help control?
  117.     var strRTObjLabel = '<PARAM NAME=\"Command\" VALUE=\"Related Topics';
  118.     if( strRawHTML.indexOf(strRTObjLabel, nRTObjTagOpen) < 0 )
  119.         return strRawHTML;
  120.     
  121.     // does the commented object tag contain a items parameters        
  122.     var strRTItemsOpen = '<param name=Items value="';
  123.     var strRTItemsClose = '$$**$$" >';
  124.     var nRTItemsOpen = strRawHTML.indexOf(strRTItemsOpen, nDTCTagOpen);
  125.     if( nRTItemsOpen < nDTCTagOpen )
  126.         return strRawHTML;
  127.     var nRTItemsClose = strRawHTML.indexOf(strRTItemsClose, nRTItemsOpen);
  128.     if( nRTItemsClose < nRTItemsOpen )
  129.         return strRawHTML;
  130.         
  131.     // found a items string
  132.     var strItems = strRawHTML.substring( nRTItemsOpen + strRTItemsOpen.length, nRTItemsClose);
  133.     if( strItems.length < 1 )
  134.         return strRawHTML;
  135.     
  136.     // to reconstruct the item(s) param tag(s)
  137.     var strItemsArray = strItems.split('$$**$$');
  138.     if( strItemsArray.length < 1 )
  139.         return strRawHTML;
  140.     var strRunTimeItemParam = "";
  141.     for( var i = 0; i < strItemsArray.length; i++ )
  142.     {
  143.         strRunTimeItemParam += '<PARAM  NAME="Item' + (i+1);
  144.         strRunTimeItemParam += '"' + '  VALUE="';
  145.         strRunTimeItemParam += strItemsArray[i];
  146.         strRunTimeItemParam += '">';
  147.     }
  148.     
  149.     // to insert the reconstructed item params into runtime object tag
  150.     var strAdjustedHTML = strRawHTML.substring(0,nRTObjTagClose) + strRunTimeItemParam + strRawHTML.substring(nRTObjTagClose, strRawHTML.length);
  151.     return kadovAdjustObjectTag(strAdjustedHTML, nDTCTagClose + strDTCTagClose.length);
  152. }
  153.  
  154. function kadovTextPopupOnLoad( el )
  155. {
  156.     if( !CCSSP.bIsWinOS )
  157.         return;
  158.  
  159.     if( typeof(el) == "string" )
  160.         el = document.all.item(el);
  161.  
  162.     var src = el.getAttribute( "x-use-popup" );
  163.     if(!src)
  164.         return;
  165.  
  166.     var name = src;
  167.     if( src.substr(0,1) == "#" ) 
  168.         name = src.substr(1, src.length-1);
  169.     var srcDiv = document.all.item(name);
  170.     if( !srcDiv )
  171.         return 1;
  172.  
  173.     var type = el.getAttribute( "x-popup-type" );
  174.     var setup = el.getAttribute( "x-tmp-setup" );
  175.     var newId = name;
  176.     if( newId.indexOf( "_tmp") <= 0 )
  177.         newId += "_tmp";
  178.  
  179.     if( !setup )
  180.     {
  181.         el.setAttribute( "x-tmp-setup", 1 );
  182.     
  183.         if( type == "pulldown"  )
  184.         {
  185.             var strAdjust = kadovAdjustObjectTag(srcDiv.innerHTML,0);
  186.             var strCleanHTML = kadovRetrieveCleanHTML(strAdjust, "<!--", "-->");
  187.             strCleanHTML = kadovRetrieveCleanHTML(strCleanHTML, "<SCRIPT", "/SCRIPT>");
  188.  
  189.             //work around the bug in HH.exe that highlight the phrases when use Search tab
  190.             //this approach is just removing the <FONT...> tag inserted by Microsoft in the runtime
  191.             strCleanHTML = kadovRetrieveCleanHTML(strCleanHTML, "<FONT color=#", "\">", 52);
  192.             
  193.             var strStyle = " style='display:none; position:relative;";
  194.             var newDiv = "<div class=droptext id=" + newId + strStyle + "'>" + strCleanHTML + "</div>";
  195.  
  196.             srcDiv.outerHTML = ""; // empty the original DIV tag
  197.             var elParentPra = kadovFindParentParagraph(el);
  198.             if( elParentPra )
  199.                 elParentPra.insertAdjacentHTML( "AfterEnd", newDiv );
  200.         }
  201.         else if( type == "expanding"  )
  202.         {
  203.             var inner = kadovRetrieveTextInner(srcDiv);
  204.             if( inner == "" )
  205.                 inner = srcDiv.innerHTML;
  206.             var strAdjust = kadovAdjustObjectTag(inner,0);
  207.             var strCleanHTML = kadovRetrieveCleanHTML(strAdjust, "<!--", "-->");
  208.             strCleanHTML = kadovRetrieveCleanHTML(strCleanHTML, "<SCRIPT", "/SCRIPT>");
  209.             var strClassName = (el.className == "glossterm") ? "glosstext" : "expandtext";
  210.             var newSpan = "<span class=" + strClassName + " style='display: none;' id=" + newId + "> " + strCleanHTML + "</span>";
  211.             srcDiv.outerHTML = ""; // empty the original DIV tag
  212.             el.insertAdjacentHTML( "AfterEnd", newSpan );
  213.         }
  214.     }
  215. }
  216.  
  217. function kadovTextPopup( el )
  218. {
  219.     if( (!CCSSP.bIsWinOS) || (window.event == null) )
  220.         return;
  221.     window.event.cancelBubble = true;
  222.  
  223.     if( typeof(el) == "string" )
  224.         el = document.all.item(el);
  225.  
  226.     var src = el.getAttribute( "x-use-popup" );
  227.     if(!src)
  228.         return 1;
  229.  
  230.     var name = src;
  231.     if( src.substr(0,1) == "#" ) 
  232.         name = src.substr(1, src.length-1) + "_tmp";
  233.     var srcDiv = document.all.item(name);
  234.     if( !srcDiv )
  235.         return 1;
  236.  
  237.     var type = el.getAttribute( "x-popup-type" );
  238.     var setup = el.getAttribute( "x-tmp-setup" );
  239.     if( srcDiv )
  240.     {
  241.         if( srcDiv.style.display == "" )
  242.             srcDiv.style.display = "none";
  243.         else
  244.         {
  245.             srcDiv.style.display = "";
  246.             if( typeof(srcDiv.bInitialized) == "undefined" )
  247.             {
  248.                 srcDiv.bInitialized = true;
  249.                 kadovInitEffects(name);
  250.                 kadovInitEachChild(srcDiv);
  251.             }
  252.         }
  253.     }
  254. }
  255.  
  256. function kadovFindParentParagraph( el )
  257. {
  258.     if( typeof(el) == "string" )
  259.         el = document.all.item(el);
  260.     if( (!el) || el.tagName == "BODY" )
  261.         return null;
  262.     if( kadovIsParagraph(el.parentElement) )
  263.         return el.parentElement;
  264.     else
  265.         return kadovFindParentParagraph( el.parentElement );
  266. }
  267.  
  268. //Begin HTML code invoked function
  269. function kadovRegisterEventHandler( obj, strEvent, strEventHandler )
  270. {
  271.     if( !gbBsIE4 )
  272.         return;
  273.     CCSSP.RegisterEventHandler( obj, strEvent, strEventHandler );
  274. }
  275.  
  276. function kadovTextPopupInit( el )
  277. {
  278.     if( (!gbBsIE4) || (!CCSSP.bIsWinOS) )
  279.         return;
  280.         
  281.     if( typeof(el) == "string" )
  282.         el = document.all.item(el);
  283.     if( el != null )
  284.     {
  285.         CCSSP.RegisterEventHandler( el, "onclick", "kadovTextPopup(" + el.id +");" );
  286.         CCSSP.RegisterEventHandler( window, "onload", "kadovTextPopupOnLoad(" + el.id +");" );
  287.     }
  288. }
  289. //End HTML code invoked function
  290.  
  291. //End to support extended and dropdown text effects.
  292.  
  293. //Begin to convert iWrite format to RoboEditor Format for DHTML effects
  294. function kadovInitTriggersInHead( )
  295. {
  296.   if( Object.xDelayedInitElements )
  297.   {
  298.      var x = Object.xDelayedInitElements;
  299.      for(i=0; i<x.length; i++)
  300.          kadovInitTrigger( x[i] );
  301.   }
  302. }
  303.  
  304. //Begin HTML code invoked function
  305. function kadovFilePopupInit( el )
  306. {
  307.     if( !gbBsIE4 )
  308.         return;
  309.     if( typeof(el) == "string" )
  310.         el = document.all.item(el);
  311.  
  312.     if( el != null )
  313.         CCSSP.RegisterEventHandler( el, "onmouseover", "BSPSPopupOnMouseOver(event);" );
  314. }
  315.  
  316. function kadovInitTrigger( element )
  317. {
  318.     if( !gbBsIE4 )
  319.         return;
  320.     var srcElement = element;
  321.     if( typeof(srcElement) == "string" )
  322.     {
  323.         srcElement = document.all.item(element,0);
  324.         if(srcElement == null)
  325.             return;
  326.     }
  327.     
  328.     if( !kadovIsParentVisible(srcElement) )
  329.         return;
  330.  
  331.     var targets = srcElement.getAttribute( "x-targets" );
  332.     var arrOneTarget = targets.split( "," );
  333.     for( var i = 0; i < arrOneTarget.length; i ++ )
  334.         bsscFXInit( element, arrOneTarget[i], null, null, null, null );
  335. }
  336.  
  337. function kadovIsParentVisible( el )
  338. {
  339.     if( typeof(el) == "string" )
  340.         el = document.all.item(el);
  341.     if( (!el) || el.tagName == "BODY" )
  342.         return true;
  343.     if( el.style.display == 'none' ) //el.visibility == 'hidden' || 
  344.         return false;
  345.     else
  346.         return kadovIsParentVisible( el.parentElement );
  347. }
  348.  
  349. function kadovInitEffects( element )
  350. {
  351.     if( !gbBsIE4 )
  352.         return;
  353.     var srcElement = element;
  354.     if( typeof(srcElement) == "string" )
  355.     {
  356.         srcElement = document.all.item(element,0);
  357.         if(srcElement == null)
  358.             return;
  359.     }
  360.     
  361.     if( !kadovIsParentVisible(srcElement) )
  362.         return;
  363.     
  364.     kadovInitEffect( srcElement, "x-on-hover" );
  365.     kadovInitEffect( srcElement, "x-on-pageclick" );
  366.     kadovInitEffect( srcElement, "x-on-pageload" );
  367.     kadovInitEffect( srcElement, "x-on-trigger-1" );
  368.     kadovInitEffect( srcElement, "x-on-trigger-2" );
  369. }
  370. //End HTML code invoked function
  371.  
  372. function kadovInitEffect( element, prop )
  373. {
  374.     var values = null;
  375.     if( element.getAttribute( "currentStyle" ) )
  376.         values = element.currentStyle.getAttribute( prop );
  377.     else 
  378.         values = element.style.getAttribute( prop );
  379.     if( !values )
  380.         return;
  381.  
  382.     var functions = new Array();
  383.     var nIdx = 0, nStart = 0;
  384.     var nNext = values.indexOf( "\)", 0);
  385.     while( nNext >= 0 && nNext < values.length )
  386.     {
  387.         functions[nIdx] = values.substr( nStart, nNext-nStart+1);
  388.         nStart = nNext + 1;
  389.         nIdx++;
  390.         nNext = values.indexOf( "\)", nStart);
  391.     }
  392.         
  393.     for( var i=0; i<functions.length; i++)
  394.     {
  395.         var id = element.getAttribute( "id" );
  396.         var translatedProp = kadovTranslateProp(prop);
  397.  
  398.         var lp = functions[i].indexOf( "(" );
  399.         var fnname = functions[i].substring(0, lp);
  400.         var srcargs = functions[i].substring(lp+1, functions[i].length-1);
  401.         
  402.         var nClickTimes = 1;
  403.         var arrForClickCount = srcargs.split( "," );
  404.         for( var j = 0; j < arrForClickCount.length; j++ )
  405.         {// to locate and get the "clicks=99" settings
  406.             var nPageClick = arrForClickCount[j].indexOf("clicks");
  407.             if( nPageClick >= 0 )
  408.             {
  409.                 nPageClick = arrForClickCount[j].indexOf("=");
  410.                 if( nPageClick > 0 )
  411.                 {
  412.                     nClickTimes = arrForClickCount[j].substring( nPageClick + 1, arrForClickCount[j].length) * 1;
  413.                     break;
  414.                 }
  415.             }
  416.         }
  417.         var args = srcargs;
  418.         if( j < arrForClickCount.length )
  419.         {// to strip out the "clicks=99" from the arguments string
  420.             args = "";
  421.             for( var k = 0; k < arrForClickCount.length; k ++ )
  422.             {
  423.                 if( k != j )
  424.                 {
  425.                     args += arrForClickCount[k];
  426.                     if( k < arrForClickCount.length - 1 )
  427.                         args += ",";
  428.                 }
  429.             }
  430.         }
  431.         bsscFXInit( null, id, translatedProp, fnname, args, nClickTimes );
  432.     }
  433. }
  434.  
  435. function kadovTranslateProp( prop )
  436. {
  437.     switch( prop )
  438.     {
  439.     case "x-on-hover" :     return "bsschover";
  440.     case "x-on-pageclick" : return "bsscpageclick";
  441.     case "x-on-pageload" :  return "bsscpageload";
  442.     case "x-on-trigger-1" : return "bssctrigger1";
  443.     case "x-on-trigger-2" : return "bssctrigger2";
  444.     }
  445.     return null;
  446. }
  447. //End to convert iWrite format to RoboEditor Format for DHTML effects
  448.  
  449. //Begin the definition of one entry to DHTML effects
  450. function bsscFXInit( trigger_ID, target_ID, event_type, 
  451.     action_type, action_setting, event_addional )
  452. {
  453.     if( !CCSSP.bIsWinOS || typeof(target_ID) != "string" )//MUST have a target_ID
  454.         return; // we don't support Navigator yet
  455.     
  456.     if( typeof(event_type) == "string" )
  457.         event_type = event_type.toLowerCase();
  458.     if( typeof(action_type) == "string" )
  459.         action_type = action_type.toLowerCase();
  460.     if( typeof(action_setting) == "string" )
  461.          action_setting = action_setting.toLowerCase();
  462.     
  463.     // to get the target element then add it to the target list
  464.     var eleTarget = CCSSP.GetObject( target_ID );
  465.     if( (eleTarget != null) && (event_type != null) && (action_type != null) )
  466.     {
  467.         CEngine.AddOneTarget( target_ID, eleTarget );
  468.         CEngine.BuildTargetObject(target_ID, event_type, action_type, action_setting, event_addional);
  469.     }
  470.     
  471.     // to validate the trigger_ID parameter
  472.     if( typeof(trigger_ID) == "string" && trigger_ID != "" )
  473.         CEngine.BuildTriggerObject( trigger_ID, target_ID );
  474. }    
  475. //End the definition of one entry to DHTML effects
  476.  
  477.  
  478. /// Section End  - kadov DHTM (JavaScript 1.2)
  479.  
  480.  
  481. /// Section Begin  - CCSSP DHTM (JavaScript 1.2)
  482.  
  483. //Begin JavaScript libary for cross-platform positioning object.
  484. function CCSSP(){} // constructor of CCSSP class
  485.  
  486. CCSSP.strAgent = navigator.userAgent.toLowerCase(); 
  487. CCSSP.nAppVersion = parseInt(navigator.appVersion);
  488.  
  489. CCSSP.bIsWinOS = ((CCSSP.strAgent.indexOf("win") >= 0) || (CCSSP.strAgent.indexOf("16bit") >= 0));
  490. CCSSP.bIsMacOS = (CCSSP.strAgent.indexOf("mac") >= 0);
  491.  
  492. CCSSP.bIsIE = (navigator.appName.indexOf("Microsoft") >= 0);
  493. CCSSP.bIsIE4 = (CCSSP.bIsIE && (CCSSP.nAppVersion >= 4));
  494. CCSSP.bIsIE5 = (CCSSP.bIsIE4 && (CCSSP.strAgent.indexOf("msie 5") != -1) )
  495.  
  496. CCSSP.bIsNav = (navigator.appName.indexOf("Netscape") >= 0);
  497. CCSSP.bIsNav4 = (CCSSP.bIsNav && (CCSSP.nAppVersion >= 4));
  498.  
  499. CCSSP.GetObject = function( obj )
  500. {//convert object name string or reference into a valid object reference
  501.     if( typeof(obj) == "object" )
  502.         return obj;
  503.     else if( typeof(obj) == "string" && obj != "")
  504.     {
  505.         if( CCSSP.bIsNav4 )
  506.             return eval("document." + obj);
  507.         else
  508.             return eval("document.all." + obj);
  509.     }
  510.     else
  511.         return null;
  512. }
  513.  
  514. CCSSP.MoveObjectTo = function(obj, x, y)
  515. {//positioning an object at a specific pixel coordinate
  516.     if( CCSSP.bIsNav4 )
  517.         obj.moveTo(x,y);
  518.     else
  519.     {
  520.         obj.style.pixelLeft = x;
  521.         obj.style.pixelTop = y;
  522.     }
  523. }
  524.  
  525. CCSSP.MoveObjectBy = function(obj, dx, dy)
  526. {//moveing a object by x and/or y pixel
  527.     if( CCSSP.bIsNav4 )
  528.         obj.moveBy(dx,dy);
  529.     else
  530.     {
  531.         obj.style.pixelLeft += dx;
  532.         obj.style.pixelTop += dy;
  533.     }
  534. }
  535.  
  536. CCSSP.SetObjectBGColor = function(obj, color)
  537. {//set the background color of an object
  538.     if( CCSSP.bIsNav4 )
  539.         obj.bgColor = color;
  540.     else
  541.         obj.style.backgroundColor = color;
  542. }
  543.  
  544. CCSSP.ShowObject = function(obj, bShow)
  545. {// set the object to be visible or invisible
  546.     if( CCSSP.bIsNav4 )
  547.         obj.visibility = (bShow == true) ? 'show' : 'hide';
  548.     else
  549.         obj.style.visibility = (bShow == true) ? 'visible' : 'hidden';// when hidden, it still occupy some space.
  550. }
  551.  
  552. CCSSP.GetObjectLeft = function(obj)
  553. {// retrieve the x coordinate of a posionable object
  554.     if( CCSSP.bIsNav4 )
  555.         return obj.left;
  556.     else
  557.         return obj.style.pixelLeft;
  558. }
  559.  
  560. CCSSP.GetObjectTop = function(obj)
  561. {// retrieve the y coordinate of a posionable object
  562.     if( CCSSP.bIsNav4 )
  563.         return obj.top;
  564.     else
  565.         return obj.style.pixelTop;
  566. }
  567.  
  568. CCSSP.GetObjectContainLeft = function(obj)
  569. {// retrieve the x coordinate of a posionable object relative to it's parent element
  570.     if( CCSSP.bIsNav4 )
  571.         return obj.pageX;
  572.     else
  573.     {
  574.         if( obj == document.body )
  575.             return obj.clientLeft;
  576.         else
  577.             return obj.offsetLeft;
  578.     }
  579. }
  580.  
  581. CCSSP.GetObjectWindowLeft = function(obj)
  582. {// retrieve the x coordinate of a posionable object relative to browser window
  583.     if( CCSSP.bIsNav4 )
  584.         return obj.pageX;
  585.     else
  586.     {
  587.         var nOffsetWindowLeft = 0;
  588.         for(var element = obj; element; element = element.offsetParent)
  589.             nOffsetWindowLeft += CCSSP.GetObjectContainLeft(element);
  590.         return nOffsetWindowLeft;
  591.     }
  592. }
  593.  
  594. CCSSP.GetObjectContainTop = function(obj)
  595. {// retrieve the y coordinate of a posionable object relative to it's parent element
  596.     if( CCSSP.bIsNav4 )
  597.         return obj.pageY;
  598.     else
  599.     {
  600.         if( obj == document.body )
  601.             return obj.clientTop;
  602.         else
  603.             return obj.offsetTop;
  604.     }
  605. }
  606.  
  607. CCSSP.GetObjectWindowTop = function(obj)
  608. {// retrieve the y coordinate of a posionable object relative to browser window
  609.     if( CCSSP.bIsNav4 )
  610.         return obj.pageY;
  611.     else
  612.     {
  613.         var nOffsetWindowTop = 0;
  614.         for(var element = obj; element; element = element.offsetParent)
  615.             nOffsetWindowTop += CCSSP.GetObjectContainTop(element);
  616.         return nOffsetWindowTop;
  617.     }
  618. }
  619.  
  620. CCSSP.GetObjectHeight = function(obj)
  621. {// retrieve the height of a posionable object
  622.     if( CCSSP.bIsNav4 )
  623.         return obj.clip.height;
  624.     else
  625.         return obj.offsetHeight;
  626. }
  627.  
  628. CCSSP.GetObjectWidth = function(obj)
  629. {// retrieve the width of a posionable object
  630.     if( CCSSP.bIsNav4 )
  631.         return obj.clip.width;
  632.     else
  633.         return obj.offsetWidth;
  634. }
  635.  
  636. CCSSP.RegisterEventHandler = function( srcObj, rawEventName, funcHandler )
  637. { // to add the "funcHandler" as the "rawEventName" 's handler to the "srcObj" object,the original event handler will be combined
  638.     var oldHandler = "";
  639.     var oldInlineHandler = srcObj[rawEventName.toLowerCase()];
  640.     if( oldInlineHandler != null )
  641.     {
  642.         var functionDefinition = oldInlineHandler.toString();
  643.         var bodyStart = functionDefinition.indexOf( "{" );
  644.         var bodyEnd = functionDefinition.lastIndexOf( "}" );
  645.         if( bodyStart > 0 || bodyEnd > bodyStart )
  646.             oldHandler = functionDefinition.substr( bodyStart + 1, bodyEnd - bodyStart - 2 );
  647.     }
  648.     else if( CCSSP.bIsIE4 )
  649.     { //search for <SCRIPT> tag which define the event handler
  650.         for( var i = 0; i < document.scripts.length; i++ ) 
  651.         {
  652.             var script = document.scripts[i];
  653.             if( (script.htmlFor == srcObj.id || script.htmlFor == srcObj ) && script.event == rawEventName )
  654.             {
  655.                 oldHandler = script.innerHTML;
  656.                 break;
  657.             }
  658.         }
  659.     }
  660.     
  661.     if( oldHandler.indexOf(funcHandler) >= 0 )
  662.         return;// to prevent register the funtion twice.
  663.  
  664.     if( CCSSP.bIsNav4 ) // only "onload, onresize, onfocus" apply to window
  665.     {// other raw events will apply to layer
  666.         var noOn = rawEventName.substring(2, rawEventName.length);
  667.         if( typeof(noOn) == "string" && noOn.length > 3 )
  668.             srcObj.captureEvents( Event[noOn.toUpperCase()] );
  669.     }
  670.  
  671.     var newHandler = oldHandler;
  672.     if( newHandler.length == 0 )
  673.         newHandler = funcHandler;
  674.     else
  675.         newHandler += "; " + funcHandler;
  676.     srcObj[rawEventName.toLowerCase()] = new Function( newHandler );
  677. }
  678.  
  679. CCSSP.GetWindowHeight = function()
  680. {// retrieve the height of available content in browser window
  681.     if( CCSSP.bIsNav4 )
  682.         return window.innerHeight;
  683.     else
  684.         return document.body.clientHeight;
  685. }
  686.  
  687. CCSSP.GetWindowBottom = function()
  688. {// retrieve the bottom postion of browser window
  689.     if( CCSSP.bIsNav4 )
  690.         return window.outerHeight + window.pageYOffset;
  691.     else
  692.         return document.body.clientHeight + document.body.scrollTop;
  693. }
  694.  
  695. CCSSP.GetWindowWidth = function()
  696. {// retrieve the width of available content in browser window
  697.     if( CCSSP.bIsNav4 )
  698.         return window.innerWidth;
  699.     else
  700.         return document.body.clientWidth;
  701. }
  702.  
  703. CCSSP.GetWindowRight = function()
  704. {// retrieve the right postion of browser window
  705.     if( CCSSP.bIsNav4 )
  706.         return window.outerWidth + window.pageXOffset;
  707.     else
  708.         return document.body.clientWidth + document.body.scrollLeft;
  709. }
  710.  
  711. CCSSP.TrimString = function( objString, subtrim )
  712. {// to trim the "subtrim" in the beginning and ending of a string object
  713.     if( typeof(subtrim) != "string" || subtrim == null )
  714.         return objString;
  715.     var strHead = objString.substring(0, 1);
  716.     var strRear = objString.substring(objString.length-1, objString.length);
  717.     if( strHead != subtrim && strRear != subtrim )
  718.         return objString;
  719.     
  720.     var spacePos = objString.indexOf(subtrim);
  721.     if( spacePos < 0 )
  722.         return objString;
  723.     else if( spacePos == objString.length - 1 )
  724.         return objString.substring(0, spacePos);
  725.     else
  726.     {
  727.         var newString = objString.substring( spacePos + 1, objString.length);
  728.         return CCSSP.TrimString( newString, subtrim );
  729.     }
  730. }
  731.  
  732. CCSSP.TrimSpace = function( objString )
  733. {
  734.     var Trim1 = CCSSP.TrimString( objString, " ");
  735.     return CCSSP.TrimString( Trim1, "\'");
  736. }
  737.  
  738. CCSSP.GetEventElement = function( navEventObject )
  739. {// to get the element who fired the current event
  740.     if( CCSSP.bIsNav4 )
  741.         return navEventObject.target;
  742.     else
  743.         return event.srcElement;
  744. }
  745.  
  746. CCSSP.PrepareFilter = function( Obj )
  747. {//to prepare for making the filter work
  748.     Obj.style.filter = "";
  749.     if( Obj.style.width != "" || Obj.style.height != "" || Obj.style.position == "absolute" )
  750.         return;
  751.     Obj.style.height = CCSSP.GetObjectHeight(Obj);
  752. }
  753.  
  754. CCSSP.IsDescendant = function( progenitor, progeny )
  755. {
  756.     if( typeof(progeny) == "undefined" || progeny == null )
  757.         return false;
  758.     else if( progeny == progenitor )
  759.         return true; 
  760.     else if( progeny.id == progenitor.id ) 
  761.         return true; 
  762.     else if( progeny.parentElement == progenitor.parentElement )
  763.         return false;
  764.     else
  765.         return CCSSP.IsDescendant( progenitor, progeny.parentElement );
  766. }
  767.  
  768. CCSSP.IsTextTag = function( Obj )
  769. {
  770.     if( typeof( Obj.tagName ) == "undefined" )
  771.         return false;
  772.     return( Obj.tagName.indexOf("H") == 0 || Obj.tagName == "P" || 
  773.             Obj.tagName == "FONT" || Obj.tagName == "SPAN" );
  774. }
  775.  
  776. //End JavaScript libary for cross-platform positioning object.
  777.  
  778. /// Section End  - CCSSP DHTM (JavaScript 1.2)
  779.  
  780. /// Section Begin  - CCSSP DHTM 1 (JavaScript 1.2)
  781.  
  782. //Begin the definition of class CTrigger
  783. function CTrigger( TriggerElement )
  784. {
  785.     // object : the trigger element. Never be null. 
  786.     this.eleTrigger = TriggerElement;
  787.     
  788.     // number : the click counter number: only 3 values: 0,1,2;
  789.     this.nCounter = 0; 
  790.     
  791.     //object as associative array of string:
  792.     // the associate target ID strings; one element at least.            
  793.     this.objStrTarget = new Object();
  794.     this.eleTrigger.style.cursor = "hand";
  795.     if( this.eleTrigger.tagName == "AREA" && this.eleTrigger.getAttribute("href") == "" )
  796.         this.eleTrigger.setAttribute("href", "#") // to make a hand cursor for image map
  797. }
  798.  
  799. CTrigger.prototype.AddTargetID = function( strTargetID )
  800. {// add one target ID string to the objStrTarget
  801.     if( typeof(strTargetID) != "string" )
  802.         return ;
  803.     if( typeof(this.objStrTarget[strTargetID]) != "string" )
  804.         this.objStrTarget[strTargetID] = strTargetID;
  805. }
  806.  
  807. CTrigger.prototype.OnTriggerClick = function()
  808. {// to activate all asociated target
  809.     var strEventType = ( (this.nCounter++)% 2 == 0 ) ? 
  810.         "bssctrigger1" : "bssctrigger2";
  811.         
  812.     // to enumerate associative target element's ID string
  813.     for( var strTargetID in this.objStrTarget ) 
  814.         CEngine.SendEventToOneTarget( strTargetID, strEventType );
  815. }
  816. //End the definition of class CTrigger
  817.  
  818. //Begin the definition of class CTarget
  819. function CTarget( TargetElement )
  820. {
  821.     // object : the target element. Never be null.
  822.     this.eleTarget = TargetElement;
  823.     this.objManager = new Object(); // object: the event manager
  824.  
  825. CTarget.nPageClickCounter = 0;// static class property.
  826.  
  827. CTarget.prototype.GetAgencyObject = function(str_action_type,action_setting )
  828. {// return the action agency ( effect )object's refernece 
  829.     switch( str_action_type )
  830.     {
  831.     case "show":return new CAgencyShow( this.eleTarget, true ) ;
  832.     case "hide":return new CAgencyShow( this.eleTarget, false ) ;
  833.  
  834.     case "flyin" : 
  835.         return new CAgencyFly(this.eleTarget, action_setting, true);
  836.     case "flyout" : 
  837.         return new CAgencyFly(this.eleTarget, action_setting, false);
  838.     case "spiralin" : 
  839.         return new CAgencySpiral(this.eleTarget, action_setting, true);
  840.     case "spiralout" : 
  841.         return new CAgencySpiral(this.eleTarget, action_setting, false);
  842.     case "zoomin" :
  843.         return new CAgencyZoom(this.eleTarget, action_setting, true);
  844.     case "zoomout" : 
  845.         return new CAgencyZoom(this.eleTarget, action_setting, false);
  846.     case "elastic" : 
  847.         return new CAgencyElastic(this.eleTarget, action_setting);
  848.         
  849.     case "fadein" : 
  850.         return (CCSSP.bIsIE4)? new CAgencyAlpha(this.eleTarget, action_setting, true) : null;
  851.     case "fadeout" :
  852.         return (CCSSP.bIsIE4)? new CAgencyAlpha(this.eleTarget, action_setting, false) : null;
  853.     case "rockrollstatic" :
  854.     case "rockroll" :
  855.         return (CCSSP.bIsIE4)? new CAgencyWave(this.eleTarget, action_setting, false) : null;
  856.  
  857.     case "glow":
  858.         return (CCSSP.bIsIE4)? new CAgencyGlow(this.eleTarget,action_setting) : null;
  859.     case "dropshadow":
  860.         return (CCSSP.bIsIE4)? new CAgencyDropShadow(this.eleTarget,action_setting) : null;
  861.     case "transition" :
  862.         return (CCSSP.bIsIE4)? new CAgencyRevealTrans(this.eleTarget,action_setting) : null;
  863.     case "blur" :
  864.         return (CCSSP.bIsIE4)? new CAgencyBlur(this.eleTarget,action_setting) : null;
  865.  
  866.     case "fliph" : // all these 4 do NOT need any parameters
  867.     case "flipv" :
  868.     case "invert":
  869.     case "gray" :
  870.         return (CCSSP.bIsIE4)? new CAgencyChangeFilter(this.eleTarget, str_action_type) : null;
  871.     
  872.     case "fontchange": // the effects below change the style on the fly, so won't work in Navigator
  873.         return (CCSSP.bIsIE4)? new CAgencyFontChange(this.eleTarget,action_setting) : null;
  874.     case "boderchange": 
  875.     case "stylechange":
  876.         return (CCSSP.bIsIE4)? new CAgencyChangeStyle(this.eleTarget,action_setting) : null;
  877.  
  878.     default: return null;
  879.     }
  880. }
  881.  
  882. CTarget.prototype.SetEventManager = function( 
  883.     one_event_type,str_action_type,action_setting,event_additional)
  884. {// to set the event manager with specified action 
  885.     if( typeof( one_event_type ) != "string" ||    
  886.         typeof( str_action_type ) != "string"||
  887.         typeof( action_setting ) != "string" )
  888.         return false;
  889.     if( typeof(this.objManager[one_event_type]) == "undefined" )
  890.     {
  891.         this.objManager[one_event_type] = new Object();
  892.         this.objManager[one_event_type].length = 0;
  893.     }
  894.     
  895.     var eventAgency = this.GetAgencyObject(str_action_type,action_setting);
  896.     if( eventAgency != null )
  897.     {
  898.         var ct = this.objManager[one_event_type].length ++;
  899.         this.objManager[one_event_type][ct] = eventAgency;
  900.         
  901.         if( one_event_type == "bsscpageclick" )
  902.         {// to deal with the "number of pageclick" stuff
  903.             if( typeof(event_additional) == "number" )
  904.                 this.objManager[one_event_type][ct].nPageClick = event_additional;
  905.             else // set the default number 
  906.                 this.objManager[one_event_type][ct].nPageClick = 1;
  907.             
  908.             if( (typeof(this.objManager.nMinPageClickIndex) == "undefined") ||
  909.                 (this.objManager[one_event_type][ct].nPageClick < 
  910.                     this.objManager[one_event_type][this.objManager.nMinPageClickIndex].nPageClick) )
  911.                 this.objManager.nMinPageClickIndex = ct;
  912.         }
  913.         
  914.         //hide the object blindly,SetState function will take care of the final correct state
  915.         if( ((one_event_type == "bsscpageclick") && 
  916.              (this.objManager[one_event_type][ct].nPageClick == 1)) ||
  917.             one_event_type == "bsscpageload" ||
  918.             one_event_type == "bssctrigger1" )
  919.             CCSSP.ShowObject( this.eleTarget, false );
  920.         
  921.         if( one_event_type == "bssctrigger1" || one_event_type == "bssctrigger2" )
  922.             if( typeof( this.strTriggerEvent ) == "undefined" )
  923.                 this.strTriggerEvent = ( one_event_type == "bssctrigger1" ) ? "bssctrigger2" : "bssctrigger1";
  924.             
  925.         return true;
  926.     }
  927.     return false;
  928. }
  929.  
  930. CTarget.prototype.OnEvent = function( strBsscEvent )
  931. {// response to the event ( bssc format )
  932.     if( typeof(this.objManager[strBsscEvent]) == "object" )
  933.     { // to get the event agency from the event manager
  934.         var eventAgency = this.objManager[strBsscEvent];
  935.         for( var i = 0; i < eventAgency.length; i++ )
  936.         {
  937.             if( strBsscEvent == "bsscpageclick" && 
  938.                  eventAgency[i].nPageClick != CTarget.nPageClickCounter )
  939.                  continue;
  940.             else if( strBsscEvent == "bsschover" && event.type == "mouseout" )
  941.                 eventAgency[i].EndEffect();
  942.             else // to invoke the unified function in effect object    
  943.                 eventAgency[i].UpdateEffect(); 
  944.         }
  945.     }
  946. }
  947.  
  948. CTarget.prototype.SetState = function( strBsscEvent )
  949. {
  950.     if( typeof(this.objManager[strBsscEvent]) != "object" )
  951.         return false;
  952.  
  953.     // to get the event agency from the event manager
  954.     var eventAgency = this.objManager[strBsscEvent];
  955.     
  956.     if( strBsscEvent == "bsscpageclick" )
  957.     {// we only set the initial state for the minium number of pageclick 
  958.         eventAgency[this.objManager.nMinPageClickIndex].PrepareEffect();
  959.         return true;
  960.     }
  961.     else
  962.     {
  963.         for( var i = 0; i < eventAgency.length; i++ )
  964.             eventAgency[i].PrepareEffect(); // to invoke the unified function in effect object     
  965.         if( i > 0 )
  966.             return true;
  967.         else
  968.             return false;
  969.     }
  970. }
  971. //End the definition of class CTarget
  972.  
  973. //Begin the definition of CEngine class
  974. function CEngine(){}// all properities are going be "class" properities
  975.  
  976. // object : as associative array of trigger objects
  977. CEngine.objTrigger = new Object();
  978. // object : as associative array of target objects 
  979. CEngine.objTarget = new Object(); 
  980.  
  981. // Array : each element is a CAgencyXXX animation object
  982. CEngine.arrAnimation = new Array();
  983. CEngine.PerformAnimation = function( nIndex )
  984. {// animation : update effects function
  985.     CEngine.arrAnimation[nIndex].UpdateEffect();
  986. }
  987.  
  988. CEngine.AddOneTrigger = function(TriggerID,TriggerElement)
  989. {// add one Trigger object into the trigger array
  990.     if( typeof(TriggerID) != "string" || TriggerElement == null ||
  991.         typeof(TriggerElement) != "object" )
  992.         return;
  993.     if( typeof(CEngine.objTrigger[TriggerID] ) != "object" )
  994.         CEngine.objTrigger[TriggerID] = new CTrigger(TriggerElement);
  995. }
  996.     
  997. CEngine.AddOneTarget = function(TargetID, TargetElement)
  998. {// add one Target object into the target array
  999.     if( typeof(TargetID) != "string" || TargetElement == null ||
  1000.         typeof(TargetElement) != "object" )
  1001.         return;
  1002.     if( typeof(CEngine.objTarget[TargetID]) != "object" )
  1003.         CEngine.objTarget[TargetID] = new CTarget( TargetElement );
  1004. }
  1005.  
  1006. CEngine.SendEventToOneTarget = function(strTargetID, strBsscEvent )
  1007. {// to activate one target object
  1008.     if( typeof(CEngine.objTarget[strTargetID]) == "object" ) 
  1009.     {
  1010.         if( strBsscEvent == "bssctrigger1" || strBsscEvent == "bssctrigger2" )
  1011.         {//now, the "bssctrigger1" and "bssctrigger2" work like a toggle
  1012.             if( strBsscEvent == CEngine.objTarget[strTargetID].strTriggerEvent )
  1013.                 strBsscEvent = (strBsscEvent == "bssctrigger1") ? "bssctrigger2" : "bssctrigger1";
  1014.             CEngine.objTarget[strTargetID].strTriggerEvent = strBsscEvent;
  1015.         }
  1016.         CEngine.objTarget[strTargetID].OnEvent( strBsscEvent );
  1017.     }
  1018. }
  1019.  
  1020. CEngine.SendEventToAllTarget = function( strBsscEvent )
  1021. { //to activate all target associative to the BSSC event
  1022.     for( var strTargetID in CEngine.objTarget ) //to enumerate all target
  1023.         CEngine.SendEventToOneTarget( strTargetID, strBsscEvent );
  1024. }
  1025.  
  1026. CEngine.SetOneTargetInitialState = function( strTargetID )
  1027. {// only invoked after ALL effects for the target have been set
  1028.     if( typeof(CEngine.objTarget[strTargetID]) == "object" ) 
  1029.     {// to get target object
  1030.         var objTarget = CEngine.objTarget[strTargetID];
  1031.         if( objTarget.SetState( "bsscpageload" ) == false )
  1032.         {
  1033.             objTarget.SetState( "bsscpageclick" );
  1034.             objTarget.SetState( "bssctrigger1" );
  1035.         }
  1036.     }
  1037. }
  1038.  
  1039. CEngine.AdjustPageClickCounter = function()
  1040. {
  1041.     var nAdjustedClickCounter = CTarget.nPageClickCounter;
  1042.     var bAdjusted = false;
  1043.     for( var strTargetID in CEngine.objTarget ) //to enumerate all target
  1044.     {// try to find the minum pageCliclConter greater than CTarget.nPageClickCounter
  1045.         var objEventPageClick = CEngine.objTarget[strTargetID].objManager.bsscpageclick;
  1046.         if( objEventPageClick != null )
  1047.         {
  1048.             for( var i = 0; i < objEventPageClick.length; i++ )
  1049.             {
  1050.                 var nOtherPageClick = objEventPageClick[i].nPageClick;
  1051.                 if( nOtherPageClick == CTarget.nPageClickCounter )
  1052.                     return;
  1053.                 if( nOtherPageClick > CTarget.nPageClickCounter )
  1054.                 {
  1055.                     if( !bAdjusted )
  1056.                     {
  1057.                         nAdjustedClickCounter = nOtherPageClick;
  1058.                         bAdjusted = true;
  1059.                     }
  1060.                     else if( nOtherPageClick < nAdjustedClickCounter )
  1061.                         nAdjustedClickCounter = nOtherPageClick;
  1062.                 }
  1063.             }
  1064.         }
  1065.     }
  1066.     CTarget.nPageClickCounter = nAdjustedClickCounter;
  1067. }
  1068.  
  1069. CEngine.OnPageLoad = function()
  1070. {     
  1071.     // first, to set all target's initial state
  1072.     for( var strTargetID in CEngine.objTarget )
  1073.         CEngine.SetOneTargetInitialState( strTargetID );
  1074.     
  1075.     // to invoke all target's onpageload handler
  1076.     CEngine.SendEventToAllTarget( "bsscpageload" );
  1077. }
  1078.  
  1079. CEngine.OnPageClick = function()
  1080. { // to invoke all target's onpageclick handler
  1081.     var src = CCSSP.GetEventElement( arguments[0] );
  1082.     if( src == null )
  1083.         return;
  1084.         
  1085.     var objClickedTrigger = null;
  1086.     for( var strTriggerID in CEngine.objTrigger )
  1087.     { // to detect which trigger is clicked
  1088.         if( CCSSP.IsDescendant( CEngine.objTrigger[strTriggerID].eleTrigger,src) )
  1089.         {
  1090.             objClickedTrigger = CEngine.objTrigger[strTriggerID];
  1091.             break;
  1092.         }
  1093.     }
  1094.     
  1095.     if( objClickedTrigger != null) // the clicked trigger found
  1096.         objClickedTrigger.OnTriggerClick();
  1097.     else // no trigger is clicked
  1098.     { // to send PageClick event to all target
  1099.         CTarget.nPageClickCounter++;
  1100.         CEngine.AdjustPageClickCounter();
  1101.         CEngine.SendEventToAllTarget( "bsscpageclick" );
  1102.     }
  1103. }    
  1104.  
  1105. CEngine.OnMouseOver = function()
  1106. { // to invoke all target's onpageload handler
  1107.     var src = CCSSP.GetEventElement( arguments[0] );
  1108.     if( src == null )
  1109.         return;
  1110.         
  1111.     var strHoveredTargetID = null;
  1112.     for( var strTargetID in CEngine.objTarget )
  1113.     { // to detect which Target is hovering on
  1114.         if( CCSSP.IsDescendant( CEngine.objTarget[strTargetID].eleTarget, src ) )
  1115.         {
  1116.             strHoveredTargetID = strTargetID;
  1117.             break;
  1118.         }
  1119.     }
  1120.     
  1121.     if( strHoveredTargetID != null ) // the hovered target found
  1122.         CEngine.SendEventToOneTarget( strHoveredTargetID, "bsschover" );
  1123. }
  1124.  
  1125. CEngine.BuildTargetObject = function(target_ID,event_type,action_type,
  1126.             action_setting, event_additional)
  1127. {// to build target object 
  1128.     // to get the target object
  1129.     if( typeof( CEngine.objTarget[target_ID] ) != "object" )
  1130.         return false;// the engine's AddOneTarget function might have failed.
  1131.     var TargetObject = CEngine.objTarget[target_ID];
  1132.     
  1133.     // to prepare the parameters for the event manager
  1134.     var arrEvent = event_type.split("|"); // to split the combined event_type string
  1135.     var arrAction = action_type.split("|");//to split the combined action_type string
  1136.     for( var trim = 0; trim < arrEvent.length; trim++ )
  1137.         arrEvent[trim] = CCSSP.TrimSpace(arrEvent[trim]);
  1138.     
  1139.     for( trim = 0; trim < arrAction.length; trim++ )
  1140.         arrAction[trim] = CCSSP.TrimSpace(arrAction[trim]);
  1141.     
  1142.     var arrSetting = new Array(); 
  1143.     if( typeof(action_setting) == "string" )
  1144.         arrSetting = action_setting.split("|");// to split the combined action_setting string
  1145.     // to calibrate the arrays
  1146.     for( var i = arrSetting.length; i < arrAction.length; i++ )
  1147.     {
  1148.         if( typeof(arrSetting[i]) != "string" )
  1149.              arrSetting[i] = "";
  1150.     }                 
  1151.  
  1152.     // to prepare for dealing with the absolute posioning element
  1153.     TargetObject.eleTarget.ABSX = CCSSP.GetObjectLeft( TargetObject.eleTarget );
  1154.     TargetObject.eleTarget.ABSY = CCSSP.GetObjectTop( TargetObject.eleTarget );
  1155.  
  1156.     if( arrEvent.length > 1 )
  1157.     {// if event is combined, it must be : "bssctrigger1 | bssctrigger2"
  1158.         if( arrAction.length != 2 )
  1159.             return false; // if event is combined, there must be 2 actions
  1160.         for( i = 0 ; i < 2; i++ )
  1161.         {
  1162.             if( TargetObject.SetEventManager(arrEvent[i], arrAction[i], 
  1163.                 arrSetting[i], event_additional) == false )
  1164.                 return false; // the event manager has not been set up
  1165.         }
  1166.     }
  1167.     else // the event_type string is not combined
  1168.     {
  1169.         for( i = 0 ; i < arrAction.length; i++ )
  1170.         {
  1171.             TargetObject.SetEventManager(event_type, arrAction[i], arrSetting[i], event_additional);
  1172.             // to validate the event manager
  1173.             if( typeof(TargetObject.objManager[event_type]) != "object" ||
  1174.                     typeof(TargetObject.objManager[event_type][i]) != "object" )
  1175.                 return false; // the event manager has not been set up
  1176.         }
  1177.     }
  1178.     return true;
  1179. }
  1180.  
  1181. CEngine.BuildTriggerObject = function(trigger_ID, target_ID)
  1182. {// to build the trigger object
  1183.     var arrTrigger = trigger_ID.split("|"); // to split the combined trigger_ID string
  1184.     for( var i = 0; i < arrTrigger.length; i ++ )
  1185.     {// to get the trigger element then add it to the trigger list
  1186.         arrTrigger[i] = CCSSP.TrimSpace( arrTrigger[i] );
  1187.         var eleTrigger = CCSSP.GetObject( arrTrigger[i] );
  1188.         if( eleTrigger == null )
  1189.             continue; // the trigger_ID string in the HTML code maybe wrong
  1190.         CEngine.AddOneTrigger( arrTrigger[i], eleTrigger );
  1191.  
  1192.         // to get the target object
  1193.         if( typeof( this.objTrigger[arrTrigger[i]] ) != "object" )
  1194.             continue;// the engine's AddOneTarget function might have failed.
  1195.         CEngine.objTrigger[arrTrigger[i]].AddTargetID( target_ID );
  1196.     }
  1197. }
  1198. //End the definition of CEngine class
  1199.  
  1200. /// Section End  - CCSSP DHTM 1 (JavaScript 1.2)
  1201.  
  1202. /// Section Begin  - CCSSP DHTM 2 (JavaScript 1.2)
  1203.  
  1204. //Begin the definition of CAgencyXXXX classes
  1205.  
  1206. //Begin of the CAgencyShow definition
  1207. function CAgencyShow( element, bIsShow )
  1208. {
  1209.     this.ele = element;
  1210.     this.bIsShow = bIsShow;
  1211. }
  1212.  
  1213. CAgencyShow.prototype.PrepareEffect = function()
  1214. {
  1215.     CCSSP.ShowObject( this.ele, !this.bIsShow );
  1216. }
  1217.  
  1218. CAgencyShow.prototype.UpdateEffect = function()
  1219. {
  1220.     CCSSP.ShowObject( this.ele, this.bIsShow );
  1221. }
  1222.  
  1223. CAgencyShow.prototype.EndEffect = function()
  1224. {
  1225.     CCSSP.ShowObject( this.ele, !this.bIsShow );
  1226. }
  1227. // End of the CAgencyShow definition
  1228.  
  1229. // Begin of CAgencyFly definition
  1230. function CAgencyFly( element, settings, bIsIn )
  1231. {
  1232.     this.ele = element;
  1233.     this.bIsIn = bIsIn;
  1234.     this.duration = 1000; // default
  1235.     this.direction = "right";
  1236.  
  1237.     var arrAllSet = settings.split(",");
  1238.     for( var i = 0; i < arrAllSet.length; i ++ )
  1239.     {// to retrieve the setting
  1240.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1241.         var arrOneSet = arrAllSet[i].split("=");
  1242.         for( var j = 0; j < arrOneSet.length; j++ )
  1243.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1244.         switch( arrOneSet[0] )
  1245.         {
  1246.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  1247.         case "direction" : this.direction = arrOneSet[1]; break;
  1248.         }
  1249.     }
  1250.         
  1251.     if( CCSSP.bIsIE5 && this.ele.style.position != "absolute" )
  1252.         this.ele.style.position = "relative";
  1253.     this.timer = null;
  1254.     this.aniIndex = CEngine.arrAnimation.length;
  1255.     CEngine.arrAnimation[this.aniIndex] = this;
  1256. }
  1257.  
  1258. CAgencyFly.prototype.PrepareEffect = function()
  1259. {
  1260.     CCSSP.ShowObject(this.ele, !this.bIsIn );
  1261. }
  1262.  
  1263. CAgencyFly.prototype.UpdateEffect = function()
  1264. {
  1265.     if( this.timer == null )
  1266.         this.ResetParameters();
  1267.  
  1268.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1269.     if( percent >= 1.0 )
  1270.         this.EndEffect();
  1271.     else
  1272.     {
  1273.         var newX = this.startX*(1.0-percent) +  this.finalX*percent;
  1274.         var newY = this.startY*(1.0-percent) +  this.finalY*percent;
  1275.         CCSSP.MoveObjectTo(this.ele, newX, newY);
  1276.         if( this.timer == null )
  1277.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  1278.     }
  1279. }
  1280.  
  1281. CAgencyFly.prototype.EndEffect = function()
  1282. {
  1283.     clearInterval( this.timer );
  1284.     this.timer = null;
  1285.  
  1286.     if( this.bIsIn ) // FlyIn
  1287.         CCSSP.MoveObjectTo(this.ele, this.finalX, this.finalY);
  1288.     else // FlyOut
  1289.         CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  1290.     CCSSP.ShowObject(this.ele, this.bIsIn );
  1291. }
  1292.  
  1293. CAgencyFly.prototype.ResetParameters = function()
  1294. {
  1295.     this.PrepareEffect();
  1296.     CCSSP.ShowObject(this.ele, true );
  1297.  
  1298.     this.startX = 0;
  1299.     this.startY = 0;
  1300.     this.finalX = 0;
  1301.     this.finalY = 0; 
  1302.     
  1303.     var offsetLeft = CCSSP.GetObjectWindowLeft(this.ele) + this.ele.offsetWidth;
  1304.     var offsetTop = CCSSP.GetObjectWindowTop(this.ele) + this.ele.offsetHeight;
  1305.     var offsetRight = CCSSP.GetWindowRight();
  1306.     var offsetBottom = CCSSP.GetWindowBottom();
  1307.  
  1308.     if( this.bIsIn )
  1309.     { // FlyIn
  1310.         this.finalX = this.ele.ABSX;
  1311.         this.finalY = this.ele.ABSY;
  1312.  
  1313.         switch( this.direction )
  1314.         {
  1315.         case "right": this.startX = offsetRight; this.startY = this.finalY; break;
  1316.         case "left": this.startX = -offsetLeft;  this.startY = this.finalY; break;
  1317.         case "down": this.startY = offsetBottom; this.startX = this.finalX; break;
  1318.         case "up":  this.startY = -offsetTop;    this.startX = this.finalX; break;
  1319.         case "downright":
  1320.               this.startX = ( offsetBottom < offsetRight) ? offsetBottom : offsetRight;
  1321.             this.startY = this.startX;        break;
  1322.         case "upright":
  1323.               this.startX = (offsetTop < offsetRight)? offsetTop : offsetRight;
  1324.             this.startY = -this.startX;        break;
  1325.         case "upleft":
  1326.             this.startX = -((offsetTop < offsetRight)? offsetTop : offsetRight);
  1327.             this.startY = this.startX;        break;
  1328.         case "downleft":
  1329.             this.startX = -(( offsetBottom < offsetRight) ? offsetBottom : offsetRight);
  1330.             this.startY = -this.startX;     break;
  1331.         }
  1332.     }
  1333.     else
  1334.     { // FlyOut
  1335.         this.startX = this.ele.ABSX;
  1336.         this.startY = this.ele.ABSY;
  1337.  
  1338.         switch( this.direction )
  1339.         {
  1340.         case "right": this.finalX = offsetRight;  this.finalY = this.startY; break;
  1341.         case "left": this.finalX = -offsetLeft;   this.finalY = this.startY;  break;
  1342.         case "down": this.finalY = offsetBottom;  this.finalX = this.startX; break;
  1343.         case "up":  this.finalY = -offsetTop;     this.finalX = this.startX; break;
  1344.         case "downright":
  1345.               this.finalX = ( offsetBottom < offsetRight) ? offsetBottom : offsetRight;
  1346.             this.finalY = this.finalX;        break;
  1347.         case "upright":
  1348.               this.finalX = (offsetTop < offsetRight)? offsetTop : offsetRight;
  1349.             this.finalY = -this.finalX;        break;
  1350.         case "upleft":
  1351.             this.finalX = -((offsetTop < offsetRight)? offsetTop : offsetRight);
  1352.             this.finalY = this.finalX;        break;
  1353.         case "downleft":
  1354.             this.finalX = -(( offsetBottom < offsetRight) ? offsetBottom : offsetRight);
  1355.             this.finalY = -this.finalX;     break;
  1356.         }
  1357.     }
  1358.     CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  1359.     this.startTime = (new Date()).getTime();
  1360. }
  1361. // End of the CAgencyFly definition
  1362.  
  1363. // Begin of CAgencySpiral
  1364. function CAgencySpiral( element, settings, bIsIn )
  1365. {
  1366.     this.ele = element;
  1367.     this.bIsIn = bIsIn;
  1368.     this.duration = 1000; // default
  1369.  
  1370.     var arrAllSet = settings.split(",");
  1371.     for( var i = 0; i < arrAllSet.length; i ++ )
  1372.     {// to retrieve the setting
  1373.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1374.         var arrOneSet = arrAllSet[i].split("=");
  1375.         for( var j = 0; j < arrOneSet.length; j++ )
  1376.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1377.         switch( arrOneSet[0] )
  1378.         {
  1379.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  1380.         }
  1381.     }
  1382.  
  1383.     if( CCSSP.bIsIE5 && this.ele.style.position != "absolute" )
  1384.         this.ele.style.position = "relative";
  1385.     this.timer = null;
  1386.     this.aniIndex = CEngine.arrAnimation.length;
  1387.     CEngine.arrAnimation[this.aniIndex] = this;
  1388. }
  1389.  
  1390. CAgencySpiral.prototype.PrepareEffect = function()
  1391. {
  1392.     CCSSP.ShowObject(this.ele, !this.bIsIn );
  1393. }
  1394.  
  1395. CAgencySpiral.prototype.UpdateEffect = function()
  1396. {
  1397.     if( this.timer == null )
  1398.         this.ResetParameters();
  1399.  
  1400.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1401.     if( percent >= 1.0 )
  1402.         this.EndEffect();
  1403.     else
  1404.     {
  1405.         var rf = (this.bIsIn)? (1.0 - percent) : percent; 
  1406.         var t = (1.0-rf) * 4.0 * Math.PI
  1407.         var rxP = (this.bIsIn)? this.startX : this.finalX; 
  1408.         var ryP = (this.bIsIn)? this.startY : this.finalY; 
  1409.         var rx = (Math.abs(rxP) < 200) ? Math.abs(rxP) : 200;
  1410.         var ry = (Math.abs(ryP) < 200) ? Math.abs(ryP) : 200;
  1411.  
  1412.         var newX = Math.ceil(-rf*Math.cos(t)*rx) + this.ele.ABSX;
  1413.         var newY = Math.ceil(-rf*Math.sin(t)*ry) + this.ele.ABSY;
  1414.         CCSSP.MoveObjectTo(this.ele, newX, newY);
  1415.         if( this.timer == null )
  1416.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  1417.     }
  1418. }
  1419.  
  1420. CAgencySpiral.prototype.EndEffect = function()
  1421. {
  1422.     clearInterval( this.timer );
  1423.     this.timer = null;
  1424.     
  1425.     if( this.bIsIn ) // In
  1426.         CCSSP.MoveObjectTo(this.ele, this.finalX, this.finalY);
  1427.     else // Out
  1428.         CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  1429.     CCSSP.ShowObject(this.ele, this.bIsIn );
  1430. }
  1431.  
  1432. CAgencySpiral.prototype.ResetParameters = function()
  1433. {
  1434.     this.PrepareEffect();
  1435.     CCSSP.ShowObject(this.ele, true );
  1436.     this.startX = (this.bIsIn)? CCSSP.GetWindowRight() : this.ele.ABSX;
  1437.     this.startY = (this.bIsIn)? CCSSP.GetWindowBottom() : this.ele.ABSY;
  1438.     this.finalX = (this.bIsIn)? this.ele.ABSX : CCSSP.GetWindowRight();
  1439.     this.finalY = (this.bIsIn)? this.ele.ABSY : CCSSP.GetWindowBottom(); 
  1440.     
  1441.     CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  1442.     this.startTime = (new Date()).getTime();
  1443. }
  1444. // End of CAgencySpiral
  1445.  
  1446. // Begin of CAgencyElastic
  1447. function CAgencyElastic( element, settings)
  1448. {
  1449.     this.ele = element;
  1450.     this.duration = 1000; // default
  1451.     this.direction = "right";
  1452.  
  1453.     var arrAllSet = settings.split(",");
  1454.     for( var i = 0; i < arrAllSet.length; i ++ )
  1455.     {// to retrieve the setting
  1456.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1457.         var arrOneSet = arrAllSet[i].split("=");
  1458.         for( var j = 0; j < arrOneSet.length; j++ )
  1459.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1460.         switch( arrOneSet[0] )
  1461.         {
  1462.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  1463.         case "direction" : this.direction = arrOneSet[1]; break;
  1464.         }
  1465.     }
  1466.         
  1467.     if( CCSSP.bIsIE5 && this.ele.style.position != "absolute" )
  1468.         this.ele.style.position = "relative";
  1469.     this.timer = null;
  1470.     this.aniIndex = CEngine.arrAnimation.length;
  1471.     CEngine.arrAnimation[this.aniIndex] = this;
  1472. }
  1473.  
  1474. CAgencyElastic.prototype.PrepareEffect = function()
  1475. {
  1476.     CCSSP.ShowObject(this.ele, false );
  1477. }
  1478.  
  1479. CAgencyElastic.prototype.UpdateEffect = function()
  1480. {
  1481.     if( this.timer == null )
  1482.         this.ResetParameters();
  1483.  
  1484.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1485.     if( percent >= 1.0 )
  1486.         this.EndEffect();
  1487.     else
  1488.     {
  1489.         var newX = this.startX;
  1490.         var newY = this.startY;
  1491.         var rf = Math.exp(-percent*3);
  1492.         var t = percent * 1.5 * Math.PI
  1493.         var rx = (Math.abs(this.startX) > Math.abs(this.startY)) ? this.startX : this.startY;
  1494.         switch (this.direction )
  1495.         {
  1496.         case "left":   
  1497.         case "right" : newX = rf*Math.cos(t)*rx + this.ele.ABSX; break;
  1498.         case "up":       
  1499.         case "down" :  newY = rf*Math.cos(t)*rx + this.ele.ABSX; break;
  1500.         }
  1501.         CCSSP.MoveObjectTo(this.ele, newX, newY);
  1502.         if( this.timer == null )
  1503.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  1504.     }
  1505. }
  1506.  
  1507. CAgencyElastic.prototype.EndEffect = function()
  1508. {
  1509.     CCSSP.MoveObjectTo(this.ele, this.finalX, this.finalY);
  1510.     clearInterval( this.timer );
  1511.     this.timer = null;
  1512. }
  1513.  
  1514. CAgencyElastic.prototype.ResetParameters = function()
  1515. {
  1516.     CCSSP.ShowObject(this.ele, true );
  1517.     this.startX = this.ele.ABSX;
  1518.     this.finalX = this.ele.ABSX;
  1519.     this.startY = this.ele.ABSY;
  1520.     this.finalY = this.ele.ABSY;
  1521.     
  1522.     switch (this.direction)
  1523.     { 
  1524.     case "left":  this.startX = -this.ele.offsetWidth; break;
  1525.     case "right": this.startX = this.ele.offsetWidth;  break;
  1526.     case "up":    this.startY = -this.ele.offsetHeight;break;
  1527.     case "down":  this.startY = this.ele.offsetHeight; break;
  1528.     }
  1529.     CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  1530.     this.startTime = (new Date()).getTime();
  1531. }
  1532. // End of CAgencyElastic
  1533.  
  1534. // Begin of CAgencyZoom
  1535. function CAgencyZoom( element, settings, bIsIn)
  1536. {
  1537.     this.ele = element;
  1538.     this.duration = 1000; // default
  1539.     
  1540.     var arrAllSet = settings.split(",");
  1541.     for( var i = 0; i < arrAllSet.length; i ++ )
  1542.     {// to retrieve the setting
  1543.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1544.         var arrOneSet = arrAllSet[i].split("=");
  1545.         for( var j = 0; j < arrOneSet.length; j++ )
  1546.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1547.         switch( arrOneSet[0] )
  1548.         {
  1549.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  1550.         }
  1551.     }
  1552.  
  1553.     this.bIsIn = bIsIn;
  1554.     this.timer = null;
  1555.     this.aniIndex = CEngine.arrAnimation.length;
  1556.     CEngine.arrAnimation[this.aniIndex] = this;
  1557. }
  1558.  
  1559. CAgencyZoom.prototype.PrepareEffect = function()
  1560. {
  1561.     CCSSP.ShowObject(this.ele, false);
  1562. }
  1563.  
  1564. CAgencyZoom.prototype.UpdateEffect = function()
  1565. {
  1566.     if( this.timer == null )
  1567.         this.ResetParameters();
  1568.  
  1569.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1570.     if( percent >= 1.0 )
  1571.         this.EndEffect();
  1572.     else
  1573.     {
  1574.         var nFactorIn = Math.ceil(50+50*percent);
  1575.         var nFactorOut = Math.ceil(100+200*(1-percent));
  1576.         var AlterFontsize = ((this.bIsIn)? nFactorIn : nFactorOut) + "%";
  1577.         var AlterFactor = ((this.bIsIn)? nFactorIn : nFactorOut) / 100;
  1578.         
  1579.         this.UpdateEffectAllChildren(this.ele, AlterFontsize, AlterFactor);
  1580.         for(var index = 0; index < this.ele.all.length; index++)
  1581.             this.UpdateEffectAllChildren(this.ele.all[index], AlterFontsize, AlterFactor);
  1582.             
  1583.         if( this.timer == null )
  1584.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  1585.     }
  1586. }
  1587.  
  1588. CAgencyZoom.prototype.UpdateEffectAllChildren = function(child, FontSize, Factor)
  1589. {
  1590.     if( CCSSP.IsTextTag(child) )
  1591.         child.style.fontSize = FontSize;
  1592.     else
  1593.     {
  1594.         if( typeof(child.orgWidth) == "number" )
  1595.             child.style.width = Factor * child.orgWidth;
  1596.         if( typeof(child.orgHeight) == "number" )
  1597.             child.style.height = Factor * child.orgHeight;
  1598.     }
  1599. }
  1600.  
  1601. CAgencyZoom.prototype.EndEffect = function()
  1602. {
  1603.     this.EndEffectAllChildren(this.ele);
  1604.     for(var index = 0; index < this.ele.all.length; index++)
  1605.         this.EndEffectAllChildren(this.ele.all[index]);
  1606.     
  1607.     clearInterval( this.timer );
  1608.     this.timer = null;
  1609. }
  1610.  
  1611. CAgencyZoom.prototype.EndEffectAllChildren = function( child )
  1612. {    
  1613.     if( CCSSP.IsTextTag(child) )
  1614.         child.style.fontSize = child.orgFontSize;
  1615.     else
  1616.     {
  1617.         if( typeof(child.intactWidth) != "undefined" )
  1618.         {
  1619.             child.width = child.intactWidth;
  1620.             child.height = child.intactHeight;
  1621.         }
  1622.         else if( typeof(child.style.intactPixelWidth) != "undefined" )
  1623.         {
  1624.             child.style.pixelWidth = child.style.intactPixelWidth;
  1625.             child.style.pixelHeight = child.style.intactPixelHeight;
  1626.         }
  1627.     }
  1628. }
  1629.  
  1630. CAgencyZoom.prototype.ResetParameters = function()
  1631. {
  1632.     this.PrepareEffect();
  1633.     this.ResetParametersAllChildren( this.ele );
  1634.     for(var index = 0; index < this.ele.all.length; index++)
  1635.         this.ResetParametersAllChildren(this.ele.all[index]);
  1636.         
  1637.     this.startTime = (new Date()).getTime();
  1638. }
  1639.  
  1640. CAgencyZoom.prototype.ResetParametersAllChildren = function( child )
  1641. {
  1642.     CCSSP.ShowObject(child, true );
  1643.     if( (child.tagName == "DIV") && (child.parentElement.tagName == "TD") )
  1644.         child.width = "100%";// if the div is inside a cell of table, we need the this hack
  1645.     
  1646.     if( CCSSP.IsTextTag(child) )
  1647.         child.orgFontSize = child.style.fontSize;
  1648.     else
  1649.     {
  1650.         if( child.width > "" || child.height > "" )
  1651.         {
  1652.             child.orgWidth = child.intactWidth = child.width;
  1653.             child.orgHeight = child.intactHeight = child.height;
  1654.         }
  1655.         else if( ( typeof(child.orgWidth) != "number" ) && (typeof(child.orgHeight) != "number") )
  1656.         {
  1657.             child.orgWidth = child.style.intactPixelWidth = child.style.pixelWidth;
  1658.             child.orgHeight = child.style.intactPixelHeight = child.style.pixelHeight;
  1659.         }
  1660.     }
  1661. }
  1662. // End of CAgencyZoom
  1663.  
  1664. //// the following effects will use IE's exclusive "filter" function ////
  1665. // Begin of CAgencyAlpha definition
  1666. function CAgencyAlpha( element, settings, bIsIn )
  1667. {// because of "visual filter" style, this won't work in Navigator
  1668.     this.ele = element;
  1669.     this.bIsIn = bIsIn;
  1670.  
  1671.     // to set the default value
  1672.     this.startOpacity = (this.bIsIn) ? 0 : 100;
  1673.     this.endOpacity = (this.bIsIn) ? 100 : 0;
  1674.     
  1675.     this.duration = 1000; // default
  1676.     
  1677.     var arrAllSet = settings.split(",");
  1678.     for( var i = 0; i < arrAllSet.length; i ++ )
  1679.     {// to retrieve the setting
  1680.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1681.         var arrOneSet = arrAllSet[i].split("=");
  1682.         for( var j = 0; j < arrOneSet.length; j++ )
  1683.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1684.         switch( arrOneSet[0] )
  1685.         {
  1686.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  1687.         }
  1688.     }
  1689.     
  1690.     this.timer = null;
  1691.     this.aniIndex = CEngine.arrAnimation.length;
  1692.     CEngine.arrAnimation[this.aniIndex] = this;
  1693. }
  1694.  
  1695. CAgencyAlpha.prototype.PrepareEffect = function()
  1696. {// to set the visual filter function
  1697.     // the visual filter ONLY work when set by "Width and Height" or
  1698.     // absolute position for DIV, SPAN and normal tag ( such as p )
  1699.     // but, "absolute" cause the following elements overlap, so:
  1700.     CCSSP.PrepareFilter( this.ele );
  1701.     CCSSP.ShowObject(this.ele, !this.bIsIn );
  1702. }
  1703.  
  1704. CAgencyAlpha.prototype.UpdateEffect = function()
  1705. {// to set the visual filter function
  1706.     if( this.timer == null )
  1707.         this.ResetParameters();
  1708.     if( typeof(this.ele.filters.alpha) != "object" )
  1709.     {
  1710.         this.EndEffect();
  1711.         return;
  1712.     }
  1713.  
  1714.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1715.     if( percent >= 1.0 )
  1716.         this.EndEffect();
  1717.     else if( typeof(this.ele.filters.alpha) == "object" )
  1718.     {
  1719.         this.ele.filters.alpha.opacity = this.startOpacity*(1.0-percent) + this.endOpacity*percent;
  1720.         if( this.timer == null )
  1721.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  1722.     }
  1723. }
  1724.  
  1725. CAgencyAlpha.prototype.EndEffect = function()
  1726. {// to remove the visual filter function
  1727.     clearInterval( this.timer );
  1728.     this.timer = null;
  1729.     this.ele.style.filter = "";
  1730.     CCSSP.ShowObject(this.ele, this.bIsIn );
  1731. }
  1732.  
  1733. CAgencyAlpha.prototype.ResetParameters = function()
  1734. {
  1735.     this.PrepareEffect();
  1736.     CCSSP.ShowObject(this.ele, true );
  1737.     this.ele.style.filter = "alpha(opacity=" + this.startOpacity + ")";
  1738.     this.startTime = (new Date()).getTime();
  1739. }
  1740. // End of the CAgencyAlpha definition
  1741.  
  1742. // Begin of CAgencyWave definition
  1743. function CAgencyWave( element, settings )
  1744. {// because of "visual filter" style, this won't work in Navigator
  1745.     this.ele = element;
  1746.  
  1747.     this.duration = 0; // default
  1748.     this.strength = 10;
  1749.     this.freq = 1;
  1750.     this.lightstrength = 1;
  1751.     
  1752.     var arrAllSet = settings.split(",");
  1753.     for( var i = 0; i < arrAllSet.length; i ++ )
  1754.     {// to retrieve the setting
  1755.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1756.         var arrOneSet = arrAllSet[i].split("=");
  1757.         for( var j = 0; j < arrOneSet.length; j++ )
  1758.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1759.         switch( arrOneSet[0] )
  1760.         {
  1761.         case "duration" : this.duration = 100000/arrOneSet[1]; break;
  1762.         case "strength" : this.strength = arrOneSet[1]; break;
  1763.         case "freq" : this.freq = arrOneSet[1]; break;
  1764.         case "lightstrength" : this.lightstrength = arrOneSet[1]; break;
  1765.         }
  1766.     }
  1767.  
  1768.     this.timer = null;
  1769.     this.aniIndex = CEngine.arrAnimation.length;
  1770.     CEngine.arrAnimation[this.aniIndex] = this;
  1771. }
  1772.  
  1773. CAgencyWave.prototype.PrepareEffect = function()
  1774. {// to set the visual filter function
  1775.     CCSSP.PrepareFilter(this.ele);
  1776.  
  1777.     CCSSP.ShowObject(this.ele, true );
  1778. }
  1779.  
  1780. CAgencyWave.prototype.UpdateEffect = function()
  1781. {// to set the visual filter function
  1782.     if( this.timer == null )
  1783.         this.ResetParameters();
  1784.     if( typeof(this.ele.filters.wave) != "object" )
  1785.     {
  1786.         this.EndEffect();
  1787.         return;
  1788.     }
  1789.  
  1790.     if( this.duration > 0 )
  1791.     {
  1792.         var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1793.         if( percent >= 1.0 )
  1794.         {
  1795.             this.EndEffect();
  1796.             return;
  1797.         }
  1798.     }
  1799.     
  1800.     this.ele.filters.wave.phase += 5;
  1801.     this.ele.filters.wave.phase %= 100;
  1802.     if( this.timer == null )
  1803.         this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 50 );
  1804. }
  1805.  
  1806. CAgencyWave.prototype.EndEffect = function()
  1807. {// to remove the visual filter function
  1808.     this.ele.style.filter = "";
  1809.     clearInterval( this.timer );
  1810.     this.timer = null;
  1811. }
  1812.  
  1813. CAgencyWave.prototype.ResetParameters = function()
  1814. {
  1815.     this.PrepareEffect();
  1816.     this.ele.style.filter = "wave(strength=" + this.strength + ",freq=" + 
  1817.      this.freq +", lightstrength=" + this.lightstrength +",phase=0);";
  1818.     this.startTime = (new Date()).getTime();
  1819. }
  1820. // End of the CAgencyWave definition
  1821.  
  1822. // Begin of CAgencyGlow definition
  1823. function CAgencyGlow( element, settings )
  1824. {// because of "visual filter" style, this won't work in Navigator
  1825.     this.ele = element;
  1826.  
  1827.     // to set the default value
  1828.     this.glowColor = "green";
  1829.     this.glowStrength = "3";
  1830.     
  1831.     var arrAllSet = settings.split(",");
  1832.     for( var i = 0; i < arrAllSet.length; i ++ )
  1833.     {
  1834.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1835.         var arrOneSet = arrAllSet[i].split("=");
  1836.         for( var j = 0; j < arrOneSet.length; j++ )
  1837.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1838.         switch( arrOneSet[0] )
  1839.         {
  1840.         case "color" : this.glowColor = arrOneSet[1]; break;
  1841.         case "strength" : this.glowStrength = arrOneSet[1]; break;
  1842.         }
  1843.     }
  1844. }
  1845.  
  1846. CAgencyGlow.prototype.PrepareEffect = function()
  1847. {
  1848.     CCSSP.PrepareFilter(this.ele);
  1849.     CCSSP.ShowObject(this.ele, true );
  1850.     if( this.ele.style.backgroundColor != "" )
  1851.     {//style.backgroundColor somehow stop the visual filter
  1852.         this.ele.intactBackgroundColor = this.ele.style.backgroundColor;
  1853.         this.ele.style.backgroundColor = "";
  1854.     }
  1855. }
  1856.  
  1857. CAgencyGlow.prototype.UpdateEffect = function()
  1858. {// to set the visual filter function
  1859.     this.PrepareEffect();
  1860.     this.ele.style.filter = "glow(Color=" + this.glowColor + ", Strength=" + 
  1861.         this.glowStrength + ", enabled=true" +")";
  1862. }
  1863.  
  1864. CAgencyGlow.prototype.EndEffect = function()
  1865. {// to remove the visual filter function
  1866.     this.ele.style.filter = "";
  1867.     if( typeof(this.ele.intactBackgroundColor) != "undefined" )
  1868.         this.ele.style.backgroundColor = this.ele.intactBackgroundColor;
  1869. }
  1870. // End of the CAgencyGlow definition
  1871.  
  1872. // Begin of CAgencyDropShadow definition
  1873. function CAgencyDropShadow( element, settings )
  1874. {// because of "visual filter" style, this won't work in Navigator
  1875.     this.ele = element;
  1876.  
  1877.     // to set the default value
  1878.     this.shadowColor = "black"; 
  1879.     this.shadowOffx = "1";
  1880.     this.shadowOffy = "1";
  1881.     
  1882.     var arrAllSet = settings.split(",");
  1883.     for( var i = 0; i < arrAllSet.length; i ++ )
  1884.     {
  1885.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1886.         var arrOneSet = arrAllSet[i].split("=");
  1887.         for( var j = 0; j < arrOneSet.length; j++ )
  1888.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1889.         switch( arrOneSet[0] )
  1890.         {
  1891.         case "color" : this.shadowColor = arrOneSet[1]; break;
  1892.         case "offx" : this.shadowOffx = arrOneSet[1]; break;
  1893.         case "offy" : this.shadowOffy = arrOneSet[1]; break;
  1894.         }
  1895.     }
  1896. }
  1897.  
  1898. CAgencyDropShadow.prototype.PrepareEffect = function()
  1899. {
  1900.     CCSSP.PrepareFilter(this.ele);
  1901.     CCSSP.ShowObject(this.ele, true );
  1902.     
  1903.     if( this.ele.style.backgroundColor != "" )
  1904.     {//style.backgroundColor somehow stop the visual filter
  1905.         this.ele.intactBackgroundColor = this.ele.style.backgroundColor;
  1906.         this.ele.style.backgroundColor = "";
  1907.     }
  1908. }
  1909.  
  1910. CAgencyDropShadow.prototype.UpdateEffect = function()
  1911. {// to set the visual filter function
  1912.     this.PrepareEffect();
  1913.     this.ele.style.filter = "dropshadow(color=" + this.shadowColor + ", offx=" + 
  1914.         this.shadowOffx + ", offy=" + this.shadowOffy + ")";
  1915. }
  1916.  
  1917. CAgencyDropShadow.prototype.EndEffect = function()
  1918. {// to remove the visual filter function
  1919.     this.ele.style.filter = "";
  1920.     if( typeof(this.ele.intactBackgroundColor) != "undefined" )
  1921.         this.ele.style.backgroundColor = this.ele.intactBackgroundColor;
  1922. }
  1923. // End of the CAgencyDropShadow definition
  1924.  
  1925. // Begin of CAgencyRevealTrans definition
  1926. function CAgencyRevealTrans( element, settings )
  1927. {// because of "visual filter" style, this won't work in Navigator
  1928.     this.ele = element;
  1929.  
  1930.     // to set the default value
  1931.     this.duration = 1.0; //The value is specified in seconds.milliseconds format (0.0000).
  1932.     this.transition = 0;
  1933.     
  1934.     var arrAllSet = settings.split(",");
  1935.     for( var i = 0; i < arrAllSet.length; i ++ )
  1936.     {
  1937.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1938.         var arrOneSet = arrAllSet[i].split("=");
  1939.         for( var j = 0; j < arrOneSet.length; j++ )
  1940.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1941.         switch( arrOneSet[0] )
  1942.         {
  1943.         case "type" : this.transition = arrOneSet[1]; break;
  1944.         case "duration" : this.duration = 100/arrOneSet[1];    break;
  1945.         }
  1946.     }
  1947. }
  1948.  
  1949. CAgencyRevealTrans.prototype.PrepareEffect = function()
  1950. {
  1951.     CCSSP.PrepareFilter(this.ele);
  1952.     CCSSP.ShowObject( this.ele, false);
  1953. }
  1954.  
  1955. CAgencyRevealTrans.prototype.UpdateEffect = function()
  1956. {// to set the visual filter function
  1957.     if( typeof( this.ele.filters.RevealTrans ) == "object" )
  1958.     {
  1959.         if( this.ele.filters.RevealTrans.status == 2 )
  1960.             this.ele.filters.RevealTrans.stop();  
  1961.     }
  1962.  
  1963.     this.PrepareEffect();
  1964.     
  1965.     this.ele.style.filter = "RevealTrans(duration=" + this.duration + 
  1966.         ", transition=" + this.transition + ")";
  1967.     
  1968.     if( typeof( this.ele.filters.RevealTrans ) == "object" )
  1969.     {
  1970.         this.ele.filters.RevealTrans.apply();
  1971.         CCSSP.ShowObject( this.ele, true);
  1972.         this.ele.filters.RevealTrans.play();  
  1973.     }
  1974.     else
  1975.         CCSSP.ShowObject( this.ele, true);
  1976. }
  1977.  
  1978. CAgencyRevealTrans.prototype.EndEffect = function()
  1979. {
  1980.     if( typeof( this.ele.filters.RevealTrans ) == "object" )
  1981.         this.ele.filters.RevealTrans.stop();  
  1982.     this.ele.style.filter = "";
  1983. }
  1984. // End of the CAgencyRevealTrans definition
  1985.  
  1986. // Begin of CAgencyBlur definition
  1987. function CAgencyBlur( element, settings )
  1988. {// because of "visual filter" style, this won't work in Navigator
  1989.     this.ele = element;
  1990.  
  1991.     // to set the default value
  1992.     this.strength = "5";
  1993.     this.direction = "90";
  1994.     
  1995.     var arrAllSet = settings.split(",");
  1996.     for( var i = 0; i < arrAllSet.length; i ++ )
  1997.     {
  1998.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1999.         var arrOneSet = arrAllSet[i].split("=");
  2000.         for( var j = 0; j < arrOneSet.length; j++ )
  2001.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  2002.         switch( arrOneSet[0] )
  2003.         {
  2004.         case "strength" : this.strength = arrOneSet[1]; break;
  2005.         case "direction" : this.direction = arrOneSet[1]; break;
  2006.         }
  2007.     }
  2008. }
  2009.  
  2010. CAgencyBlur.prototype.PrepareEffect = function()
  2011. {
  2012.     CCSSP.PrepareFilter(this.ele);
  2013.     CCSSP.ShowObject(this.ele, true );
  2014. }
  2015.  
  2016. CAgencyBlur.prototype.UpdateEffect = function()
  2017. {// to set the visual filter function
  2018.     CCSSP.PrepareFilter(this.ele);
  2019.     this.ele.style.filter = "blur(strength=" + this.strength + 
  2020.         ", direction=" + this.direction + ")";
  2021. }
  2022.  
  2023. CAgencyBlur.prototype.EndEffect = function()
  2024. {// to remove the visual filter function
  2025.     this.ele.style.filter = "";
  2026. }
  2027. // End of the CAgencyBlur definition
  2028.  
  2029. // Begin of CAgencyChangeFilter definition
  2030. function CAgencyChangeFilter( element, settings ) // flipH, flipV, invert, grey,
  2031. {// because of "visual filter" style, this won't work in Navigator
  2032.     this.ele = element;
  2033.  
  2034.     // to set the default value
  2035.     this.filterFunction = settings;
  2036. }
  2037.  
  2038. CAgencyChangeFilter.prototype.PrepareEffect = function()
  2039. {
  2040.     CCSSP.PrepareFilter(this.ele);
  2041.     CCSSP.ShowObject(this.ele, true );
  2042. }
  2043.  
  2044. CAgencyChangeFilter.prototype.UpdateEffect = function()
  2045. {// to set the visual filter function
  2046.     CCSSP.PrepareFilter(this.ele);
  2047.     this.ele.style.filter = this.filterFunction;
  2048. }
  2049.  
  2050. CAgencyChangeFilter.prototype.EndEffect = function()
  2051. {// to remove the visual filter function
  2052.     this.ele.style.filter = "";
  2053. }
  2054. // End of the CAgencyChangeFilter definition
  2055.  
  2056. // The effects below change the style on the fly, so they won't work in Navigator
  2057.  
  2058. // Begin of CAgencyFontChange definition, 
  2059. function CAgencyFontChange( element, settings )
  2060. {//this class can be replace by CAgencyChangeStyle,provided the "settings" is standard CSS string.
  2061.     this.ele = element;
  2062.     
  2063.     // to retrieve the original font style
  2064.     this.RetrieveOldFont( this.ele );
  2065.     
  2066.     // to set the default font to change
  2067.     this.newfontFamily = this.ele.oldFontFamily;
  2068.     this.newfColor = this.ele.oldColor;
  2069.     this.newtextDecoration = this.ele.oldTextDecoration;
  2070.     this.newfontWeight = this.ele.oldFontWeight;
  2071.     this.newfontStyle = this.ele.oldFontStyle;
  2072.     this.newfontSize = this.ele.oldFontSize;
  2073.     this.newBackgroundColor = this.ele.oldBackgroundColor;
  2074.     
  2075.     var arrAllSet = settings.split(",");
  2076.     for( var i = 0; i < arrAllSet.length; i ++ )
  2077.     {// to retrieve the setting
  2078.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  2079.         var arrOneSet = arrAllSet[i].split("=");
  2080.         for( var j = 0; j < arrOneSet.length; j++ )
  2081.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  2082.         switch( arrOneSet[0] )
  2083.         {
  2084.         case "font-family" : this.newfontFamily = arrOneSet[1]; break;
  2085.         case "color" : this.newfColor = arrOneSet[1]; break;
  2086.         case "underline" : this.newtextDecoration = (arrOneSet[1]=="on")? "underline" : "none"; break;
  2087.         case "bold" : this.newfontWeight = (arrOneSet[1]=="on")? "bold" : "normal"; break;
  2088.         case "italic" : this.newfontStyle = (arrOneSet[1]=="on")? "italic" : "normal"; break;
  2089.         case "size" : this.newfontSize = arrOneSet[1]; break;
  2090.         case "background-color" : this.newBackgroundColor = arrOneSet[1]; break;
  2091.         }
  2092.     }
  2093. }
  2094.  
  2095. CAgencyFontChange.prototype.RetrieveOldFont = function(objChild)
  2096. {
  2097.     if( typeof(objChild.oldFontFamily) == "undefined" )
  2098.         objChild.oldFontFamily = objChild.style.fontFamily;
  2099.     if( typeof(objChild.oldColor) == "undefined" )
  2100.         objChild.oldColor = objChild.style.color;
  2101.     if( typeof(objChild.oldTextDecoration) == "undefined" )
  2102.         objChild.oldTextDecoration = objChild.style.textDecoration;
  2103.     if( typeof(objChild.oldFontWeight) == "undefined" )
  2104.         objChild.oldFontWeight = objChild.style.fontWeight;
  2105.     if( typeof(objChild.oldFontStyle) == "undefined" )
  2106.         objChild.oldFontStyle = objChild.style.fontStyle;
  2107.     if( typeof(objChild.oldFontSize) == "undefined" )
  2108.         objChild.oldFontSize = objChild.style.fontSize;
  2109.     if( typeof(objChild.oldBackgroundColor) == "undefined" )
  2110.         objChild.oldBackgroundColor = objChild.style.backgroundColor;
  2111. }
  2112.  
  2113. CAgencyFontChange.prototype.PrepareEffect = function()
  2114. {
  2115.     // as for expanding text, the child is created after the constructor called
  2116.     for(var index = 0; index < this.ele.all.length; index++)
  2117.         this.RetrieveOldFont(this.ele.all[index]);
  2118.     CCSSP.ShowObject(this.ele, true );
  2119. }
  2120.  
  2121. CAgencyFontChange.prototype.UpdateEffect = function()
  2122. {// to change the font
  2123.     this.PrepareEffect();
  2124.     this.UpdateEffectAllChildren( this.ele );
  2125.     for( var index = 0; index < this.ele.all.length; index++)
  2126.         this.UpdateEffectAllChildren(this.ele.all[index]);
  2127. }
  2128.  
  2129. CAgencyFontChange.prototype.UpdateEffectAllChildren = function(objChild)
  2130. {
  2131.     objChild.style.fontFamily = this.newfontFamily;
  2132.     objChild.style.color = this.newfColor;
  2133.     objChild.style.textDecoration = this.newtextDecoration;
  2134.     objChild.style.fontWeight = this.newfontWeight;
  2135.     objChild.style.fontStyle = this.newfontStyle;
  2136.     objChild.style.fontSize = this.newfontSize;
  2137.     objChild.style.backgroundColor = this.newBackgroundColor;
  2138. }
  2139.  
  2140. CAgencyFontChange.prototype.EndEffect = function()
  2141. {// to reinstate the original font style
  2142.     this.EndEffectAllChildren( this.ele );
  2143.     for( var index = 0; index < this.ele.all.length; index++)
  2144.         this.EndEffectAllChildren(this.ele.all[index]);
  2145. }
  2146.  
  2147. CAgencyFontChange.prototype.EndEffectAllChildren = function( objChild )
  2148. {
  2149.     if( typeof(objChild.oldFontFamily) != "undefined" )
  2150.         objChild.style.fontFamily = objChild.oldFontFamily;
  2151.     if( typeof(objChild.oldColor) != "undefined" )
  2152.         objChild.style.color = objChild.oldColor;
  2153.     if( typeof(objChild.oldFontWeight) != "undefined" )
  2154.         objChild.style.fontWeight = objChild.oldFontWeight;
  2155.     if( typeof(objChild.oldFontStyle) != "undefined" )
  2156.         objChild.style.fontStyle = objChild.oldFontStyle;
  2157.     if( typeof(objChild.oldFontSize) != "undefined" )
  2158.         objChild.style.fontSize = objChild.oldFontSize;
  2159.     if( typeof(objChild.oldTextDecoration) != "undefined" )
  2160.         objChild.style.textDecoration = objChild.oldTextDecoration;
  2161.     if( typeof(objChild.oldBackgroundColor) != "undefined" )
  2162.         objChild.style.backgroundColor = objChild.oldBackgroundColor;
  2163. }
  2164. // End of the CAgencyFontChange definition
  2165.  
  2166. // Begin of the CAgencyChangeStyle definition
  2167. function CAgencyChangeStyle( element, settings )
  2168. {//this class can be replace by CAgencyChangeStyle,provided the "settings" is standard CSS string.
  2169.     this.ele = element;
  2170.     
  2171.     // to retrieve the original style
  2172.     this.oldstyle = this.ele.style.cssText;
  2173.     
  2174.     // to set the default style
  2175.     this.newStyle = this.oldstyle;
  2176.     
  2177.     if( typeof(settings) == "string" && settings.length > 1 )
  2178.         this.newStyle = this.oldstyle + " " + settings;
  2179. }
  2180.  
  2181. CAgencyChangeStyle.prototype.PrepareEffect = function()
  2182. {
  2183.     CCSSP.ShowObject(this.ele, true );
  2184. }
  2185.  
  2186. CAgencyChangeStyle.prototype.UpdateEffect = function()
  2187. {// to change the style
  2188.     this.ele.style.cssText = this.newStyle;
  2189. }
  2190.  
  2191. CAgencyChangeStyle.prototype.EndEffect = function()
  2192. {// to reinstate the original style
  2193.     this.ele.style.cssText = this.oldStyle;
  2194. }
  2195. // End of the CAgencyChangeStyle definition
  2196.  
  2197. //End the definition of CAgencyXXXX classes
  2198.  
  2199. //Begin to collaborate with other event handler settings 
  2200. CCSSP.RegisterEventHandler( window, "onload", "CEngine.OnPageLoad();BSSCOnLoad();kadovInitTriggersInHead();");
  2201. CCSSP.RegisterEventHandler( document, "onclick", "CEngine.OnPageClick();BSSCOnClick();");
  2202. CCSSP.RegisterEventHandler( document, "onmouseover", "CEngine.OnMouseOver();BSSCOnMouseOver();" );
  2203. CCSSP.RegisterEventHandler( document, "onmouseout", "CEngine.OnMouseOver();BSSCOnMouseOut();" );
  2204. CCSSP.RegisterEventHandler( window, "onunload", "BSSCOnUnload();");
  2205. //End to collaborate with other event handler settings
  2206.  
  2207.  
  2208. /// Section End  - CCSSP DHTM 2 (JavaScript 1.2)
  2209.  
  2210. //// Segment End -- (JavaScript 1.2)
  2211.