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

  1. //// Segment Begin -- (JavaScript 1.2)
  2. // eHelp« Corporation Dynamic HTML JavaScript 
  3. // Copyright⌐ 1998-2001 eHelp« Corporation.All rights reserved.
  4. // Version=4.47
  5.  
  6. // Warning:Do not modify this file.It is generated by RoboHELP« and changes will be overwritten.
  7.  
  8.  
  9. /// Section Begin  - 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" )  && element.currentStyle.getAttribute)
  376.         values = element.currentStyle.getAttribute( prop );
  377.     else  if (element.style.getAttribute)
  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. CCSSP.bIsNav6 = (CCSSP.bIsNav && (CCSSP.nAppVersion >= 5));
  499.  
  500. CCSSP.GetObject = function( obj )
  501. {//convert object name string or reference into a valid object reference
  502.     if( typeof(obj) == "object" )
  503.         return obj;
  504.     else if( typeof(obj) == "string" && obj != "")
  505.     {
  506.         if( CCSSP.bIsNav4 )
  507.             return eval("document." + obj);
  508.         else
  509.             return eval("document.all." + obj);
  510.     }
  511.     else
  512.         return null;
  513. }
  514.  
  515. CCSSP.MoveObjectTo = function(obj, x, y)
  516. {//positioning an object at a specific pixel coordinate
  517.     if( CCSSP.bIsNav4 )
  518.         obj.moveTo(x,y);
  519.     else
  520.     {
  521.         obj.style.pixelLeft = x;
  522.         obj.style.pixelTop = y;
  523.     }
  524. }
  525.  
  526. CCSSP.MoveObjectBy = function(obj, dx, dy)
  527. {//moveing a object by x and/or y pixel
  528.     if( CCSSP.bIsNav4 )
  529.         obj.moveBy(dx,dy);
  530.     else
  531.     {
  532.         obj.style.pixelLeft += dx;
  533.         obj.style.pixelTop += dy;
  534.     }
  535. }
  536.  
  537. CCSSP.SetObjectBGColor = function(obj, color)
  538. {//set the background color of an object
  539.     if( CCSSP.bIsNav4 )
  540.         obj.bgColor = color;
  541.     else
  542.         obj.style.backgroundColor = color;
  543. }
  544.  
  545. CCSSP.ShowObject = function(obj, bShow)
  546. {// set the object to be visible or invisible
  547.     if( CCSSP.bIsNav4 )
  548.         obj.visibility = (bShow == true) ? 'show' : 'hide';
  549.     else
  550.         obj.style.visibility = (bShow == true) ? 'visible' : 'hidden';// when hidden, it still occupy some space.
  551. }
  552.  
  553. CCSSP.GetObjectLeft = function(obj)
  554. {// retrieve the x coordinate of a posionable object
  555.     if( CCSSP.bIsNav4 )
  556.         return obj.left;
  557.     else
  558.         return obj.style.pixelLeft;
  559. }
  560.  
  561. CCSSP.GetObjectTop = function(obj)
  562. {// retrieve the y coordinate of a posionable object
  563.     if( CCSSP.bIsNav4 )
  564.         return obj.top;
  565.     else
  566.         return obj.style.pixelTop;
  567. }
  568.  
  569. CCSSP.GetObjectContainLeft = function(obj)
  570. {// retrieve the x coordinate of a posionable object relative to it's parent element
  571.     if( CCSSP.bIsNav4 )
  572.         return obj.pageX;
  573.     else
  574.     {
  575.         if( obj == document.body )
  576.             return obj.clientLeft;
  577.         else
  578.             return obj.offsetLeft;
  579.     }
  580. }
  581.  
  582. CCSSP.GetObjectWindowLeft = function(obj)
  583. {// retrieve the x coordinate of a posionable object relative to browser window
  584.     if( CCSSP.bIsNav4 )
  585.         return obj.pageX;
  586.     else
  587.     {
  588.         var nOffsetWindowLeft = 0;
  589.         for(var element = obj; element; element = element.offsetParent)
  590.             nOffsetWindowLeft += CCSSP.GetObjectContainLeft(element);
  591.         return nOffsetWindowLeft;
  592.     }
  593. }
  594.  
  595. CCSSP.GetObjectContainTop = function(obj)
  596. {// retrieve the y coordinate of a posionable object relative to it's parent element
  597.     if( CCSSP.bIsNav4 )
  598.         return obj.pageY;
  599.     else
  600.     {
  601.         if( obj == document.body )
  602.             return obj.clientTop;
  603.         else
  604.             return obj.offsetTop;
  605.     }
  606. }
  607.  
  608. CCSSP.GetObjectWindowTop = function(obj)
  609. {// retrieve the y coordinate of a posionable object relative to browser window
  610.     if( CCSSP.bIsNav4 )
  611.         return obj.pageY;
  612.     else
  613.     {
  614.         var nOffsetWindowTop = 0;
  615.         for(var element = obj; element; element = element.offsetParent)
  616.             nOffsetWindowTop += CCSSP.GetObjectContainTop(element);
  617.         return nOffsetWindowTop;
  618.     }
  619. }
  620.  
  621. CCSSP.GetObjectHeight = function(obj)
  622. {// retrieve the height of a posionable object
  623.     if( CCSSP.bIsNav4 )
  624.         return obj.clip.height;
  625.     else
  626.         return obj.offsetHeight;
  627. }
  628.  
  629. CCSSP.GetObjectWidth = function(obj)
  630. {// retrieve the width of a posionable object
  631.     if( CCSSP.bIsNav4 )
  632.         return obj.clip.width;
  633.     else
  634.         return obj.offsetWidth;
  635. }
  636.  
  637. CCSSP.RegisterEventHandler = function( srcObj, rawEventName, funcHandler )
  638. { // to add the "funcHandler" as the "rawEventName" 's handler to the "srcObj" object,the original event handler will be combined
  639.     if (CCSSP.bIsNav4 && !CCSSP.bIsNav6)
  640.         return ;
  641.     var oldHandler = "";
  642.     var oldInlineHandler = srcObj[rawEventName.toLowerCase()];
  643.     if( oldInlineHandler != null && typeof(oldInlineHandler) != "undefined")
  644.     {
  645.         var functionDefinition = oldInlineHandler.toString();
  646.         var bodyStart = functionDefinition.indexOf( "{" );
  647.         var bodyEnd = functionDefinition.lastIndexOf( "}" );
  648.         if( bodyStart > 0 || bodyEnd > bodyStart )
  649.             oldHandler = functionDefinition.substr( bodyStart + 1, bodyEnd - bodyStart - 2 );
  650.     }
  651.     else if( CCSSP.bIsIE4 )
  652.     { //search for <SCRIPT> tag which define the event handler
  653.         for( var i = 0; i < document.scripts.length; i++ ) 
  654.         {
  655.             var script = document.scripts[i];
  656.             if( (script.htmlFor == srcObj.id || script.htmlFor == srcObj ) && script.event == rawEventName )
  657.             {
  658.                 oldHandler = script.innerHTML;
  659.                 break;
  660.             }
  661.         }
  662.     }
  663.     
  664.     if( oldHandler.indexOf(funcHandler) >= 0 )
  665.         return;// to prevent register the funtion twice.
  666.  
  667.     if( CCSSP.bIsNav4 ) // only "onload, onresize, onfocus" apply to window
  668.     {// other raw events will apply to layer
  669.         var noOn = rawEventName.substring(2, rawEventName.length);
  670.         if( typeof(noOn) == "string" && noOn.length > 3 ) {
  671.             srcObj.captureEvents( Event[noOn.toUpperCase()] );
  672.         }
  673.     }
  674.  
  675.     var newHandler = oldHandler;
  676.     if( newHandler.length == 0 )
  677.         newHandler = funcHandler;
  678.     else
  679.         newHandler += "; " + funcHandler;
  680.     srcObj[rawEventName.toLowerCase()] = new Function( newHandler );
  681. }
  682.  
  683. CCSSP.GetWindowHeight = function()
  684. {// retrieve the height of available content in browser window
  685.     if( CCSSP.bIsNav4 )
  686.         return window.innerHeight;
  687.     else
  688.         return document.body.clientHeight;
  689. }
  690.  
  691. CCSSP.GetWindowBottom = function()
  692. {// retrieve the bottom postion of browser window
  693.     if( CCSSP.bIsNav4 )
  694.         return window.outerHeight + window.pageYOffset;
  695.     else
  696.         return document.body.clientHeight + document.body.scrollTop;
  697. }
  698.  
  699. CCSSP.GetWindowWidth = function()
  700. {// retrieve the width of available content in browser window
  701.     if( CCSSP.bIsNav4 )
  702.         return window.innerWidth;
  703.     else
  704.         return document.body.clientWidth;
  705. }
  706.  
  707. CCSSP.GetWindowRight = function()
  708. {// retrieve the right postion of browser window
  709.     if( CCSSP.bIsNav4 )
  710.         return window.outerWidth + window.pageXOffset;
  711.     else
  712.         return document.body.clientWidth + document.body.scrollLeft;
  713. }
  714.  
  715. CCSSP.TrimString = function( objString, subtrim )
  716. {// to trim the "subtrim" in the beginning and ending of a string object
  717.     if( typeof(subtrim) != "string" || subtrim == null )
  718.         return objString;
  719.     var strHead = objString.substring(0, 1);
  720.     var strRear = objString.substring(objString.length-1, objString.length);
  721.     if( strHead != subtrim && strRear != subtrim )
  722.         return objString;
  723.     
  724.     var spacePos = objString.indexOf(subtrim);
  725.     if( spacePos < 0 )
  726.         return objString;
  727.     else if( spacePos == objString.length - 1 )
  728.         return objString.substring(0, spacePos);
  729.     else
  730.     {
  731.         var newString = objString.substring( spacePos + 1, objString.length);
  732.         return CCSSP.TrimString( newString, subtrim );
  733.     }
  734. }
  735.  
  736. CCSSP.TrimSpace = function( objString )
  737. {
  738.     var Trim1 = CCSSP.TrimString( objString, " ");
  739.     return CCSSP.TrimString( Trim1, "\'");
  740. }
  741.  
  742. CCSSP.GetEventElement = function( navEventObject )
  743. {// to get the element who fired the current event
  744.     if(CCSSP.bIsNav4 ) 
  745.         if (CCSSP.bIsNav6)
  746.             return null;
  747.         else
  748.              navEventObject.target;
  749.     else
  750.         return event.srcElement;
  751. }
  752.  
  753. CCSSP.PrepareFilter = function( Obj )
  754. {//to prepare for making the filter work
  755.     Obj.style.filter = "";
  756.     if( Obj.style.width != "" || Obj.style.height != "" || Obj.style.position == "absolute" )
  757.         return;
  758.     Obj.style.height = CCSSP.GetObjectHeight(Obj);
  759. }
  760.  
  761. CCSSP.IsDescendant = function( progenitor, progeny )
  762. {
  763.     if( typeof(progeny) == "undefined" || progeny == null )
  764.         return false;
  765.     else if( progeny == progenitor )
  766.         return true; 
  767.     else if( progeny.id == progenitor.id ) 
  768.         return true; 
  769.     else if( progeny.parentElement == progenitor.parentElement )
  770.         return false;
  771.     else
  772.         return CCSSP.IsDescendant( progenitor, progeny.parentElement );
  773. }
  774.  
  775. CCSSP.IsTextTag = function( Obj )
  776. {
  777.     if( typeof( Obj.tagName ) == "undefined" )
  778.         return false;
  779.     return( Obj.tagName.indexOf("H") == 0 || Obj.tagName == "P" || 
  780.             Obj.tagName == "FONT" || Obj.tagName == "SPAN" );
  781. }
  782.  
  783. //End JavaScript libary for cross-platform positioning object.
  784.  
  785. /// Section End  - CCSSP DHTM (JavaScript 1.2)
  786.  
  787. /// Section Begin  - CCSSP DHTM 1 (JavaScript 1.2)
  788.  
  789. //Begin the definition of class CTrigger
  790. function CTrigger( TriggerElement )
  791. {
  792.     // object : the trigger element. Never be null. 
  793.     this.eleTrigger = TriggerElement;
  794.     
  795.     // number : the click counter number: only 3 values: 0,1,2;
  796.     this.nCounter = 0; 
  797.     
  798.     //object as associative array of string:
  799.     // the associate target ID strings; one element at least.            
  800.     this.objStrTarget = new Object();
  801.     this.eleTrigger.style.cursor = "hand";
  802.     if( this.eleTrigger.tagName == "AREA" && this.eleTrigger.getAttribute("href") == "" )
  803.         this.eleTrigger.setAttribute("href", "#") // to make a hand cursor for image map
  804. }
  805.  
  806. CTrigger.prototype.AddTargetID = function( strTargetID )
  807. {// add one target ID string to the objStrTarget
  808.     if( typeof(strTargetID) != "string" )
  809.         return ;
  810.     if( typeof(this.objStrTarget[strTargetID]) != "string" )
  811.         this.objStrTarget[strTargetID] = strTargetID;
  812. }
  813.  
  814. CTrigger.prototype.OnTriggerClick = function()
  815. {// to activate all asociated target
  816.     var strEventType = ( (this.nCounter++)% 2 == 0 ) ? 
  817.         "bssctrigger1" : "bssctrigger2";
  818.         
  819.     // to enumerate associative target element's ID string
  820.     for( var strTargetID in this.objStrTarget ) 
  821.         CEngine.SendEventToOneTarget( strTargetID, strEventType );
  822. }
  823. //End the definition of class CTrigger
  824.  
  825. //Begin the definition of class CTarget
  826. function CTarget( TargetElement )
  827. {
  828.     // object : the target element. Never be null.
  829.     this.eleTarget = TargetElement;
  830.     this.objManager = new Object(); // object: the event manager
  831.  
  832. CTarget.nPageClickCounter = 0;// static class property.
  833.  
  834. CTarget.prototype.GetAgencyObject = function(str_action_type,action_setting )
  835. {// return the action agency ( effect )object's refernece 
  836.     switch( str_action_type )
  837.     {
  838.     case "show":return new CAgencyShow( this.eleTarget, true ) ;
  839.     case "hide":return new CAgencyShow( this.eleTarget, false ) ;
  840.  
  841.     case "flyin" : 
  842.         return new CAgencyFly(this.eleTarget, action_setting, true);
  843.     case "flyout" : 
  844.         return new CAgencyFly(this.eleTarget, action_setting, false);
  845.     case "spiralin" : 
  846.         return new CAgencySpiral(this.eleTarget, action_setting, true);
  847.     case "spiralout" : 
  848.         return new CAgencySpiral(this.eleTarget, action_setting, false);
  849.     case "zoomin" :
  850.         return new CAgencyZoom(this.eleTarget, action_setting, true);
  851.     case "zoomout" : 
  852.         return new CAgencyZoom(this.eleTarget, action_setting, false);
  853.     case "elastic" : 
  854.         return new CAgencyElastic(this.eleTarget, action_setting);
  855.         
  856.     case "fadein" : 
  857.         return (CCSSP.bIsIE4)? new CAgencyAlpha(this.eleTarget, action_setting, true) : null;
  858.     case "fadeout" :
  859.         return (CCSSP.bIsIE4)? new CAgencyAlpha(this.eleTarget, action_setting, false) : null;
  860.     case "rockrollstatic" :
  861.     case "rockroll" :
  862.         return (CCSSP.bIsIE4)? new CAgencyWave(this.eleTarget, action_setting, false) : null;
  863.  
  864.     case "glow":
  865.         return (CCSSP.bIsIE4)? new CAgencyGlow(this.eleTarget,action_setting) : null;
  866.     case "dropshadow":
  867.         return (CCSSP.bIsIE4)? new CAgencyDropShadow(this.eleTarget,action_setting) : null;
  868.     case "transition" :
  869.         return (CCSSP.bIsIE4)? new CAgencyRevealTrans(this.eleTarget,action_setting) : null;
  870.     case "blur" :
  871.         return (CCSSP.bIsIE4)? new CAgencyBlur(this.eleTarget,action_setting) : null;
  872.  
  873.     case "fliph" : // all these 4 do NOT need any parameters
  874.     case "flipv" :
  875.     case "invert":
  876.     case "gray" :
  877.         return (CCSSP.bIsIE4)? new CAgencyChangeFilter(this.eleTarget, str_action_type) : null;
  878.     
  879.     case "fontchange": // the effects below change the style on the fly, so won't work in Navigator
  880.         return (CCSSP.bIsIE4)? new CAgencyFontChange(this.eleTarget,action_setting) : null;
  881.     case "boderchange": 
  882.     case "stylechange":
  883.         return (CCSSP.bIsIE4)? new CAgencyChangeStyle(this.eleTarget,action_setting) : null;
  884.  
  885.     default: return null;
  886.     }
  887. }
  888.  
  889. CTarget.prototype.SetEventManager = function( 
  890.     one_event_type,str_action_type,action_setting,event_additional)
  891. {// to set the event manager with specified action 
  892.     if( typeof( one_event_type ) != "string" ||    
  893.         typeof( str_action_type ) != "string"||
  894.         typeof( action_setting ) != "string" )
  895.         return false;
  896.     if( typeof(this.objManager[one_event_type]) == "undefined" )
  897.     {
  898.         this.objManager[one_event_type] = new Object();
  899.         this.objManager[one_event_type].length = 0;
  900.     }
  901.     
  902.     var eventAgency = this.GetAgencyObject(str_action_type,action_setting);
  903.     if( eventAgency != null )
  904.     {
  905.         var ct = this.objManager[one_event_type].length ++;
  906.         this.objManager[one_event_type][ct] = eventAgency;
  907.         
  908.         if( one_event_type == "bsscpageclick" )
  909.         {// to deal with the "number of pageclick" stuff
  910.             if( typeof(event_additional) == "number" )
  911.                 this.objManager[one_event_type][ct].nPageClick = event_additional;
  912.             else // set the default number 
  913.                 this.objManager[one_event_type][ct].nPageClick = 1;
  914.             
  915.             if( (typeof(this.objManager.nMinPageClickIndex) == "undefined") ||
  916.                 (this.objManager[one_event_type][ct].nPageClick < 
  917.                     this.objManager[one_event_type][this.objManager.nMinPageClickIndex].nPageClick) )
  918.                 this.objManager.nMinPageClickIndex = ct;
  919.         }
  920.         
  921.         //hide the object blindly,SetState function will take care of the final correct state
  922.         if( ((one_event_type == "bsscpageclick") && 
  923.              (this.objManager[one_event_type][ct].nPageClick == 1)) ||
  924.             one_event_type == "bsscpageload" ||
  925.             one_event_type == "bssctrigger1" )
  926.             CCSSP.ShowObject( this.eleTarget, false );
  927.         
  928.         if( one_event_type == "bssctrigger1" || one_event_type == "bssctrigger2" )
  929.             if( typeof( this.strTriggerEvent ) == "undefined" )
  930.                 this.strTriggerEvent = ( one_event_type == "bssctrigger1" ) ? "bssctrigger2" : "bssctrigger1";
  931.             
  932.         return true;
  933.     }
  934.     return false;
  935. }
  936.  
  937. CTarget.prototype.OnEvent = function( strBsscEvent )
  938. {// response to the event ( bssc format )
  939.     if( typeof(this.objManager[strBsscEvent]) == "object" )
  940.     { // to get the event agency from the event manager
  941.         var eventAgency = this.objManager[strBsscEvent];
  942.         for( var i = 0; i < eventAgency.length; i++ )
  943.         {
  944.             if( strBsscEvent == "bsscpageclick" && 
  945.                  eventAgency[i].nPageClick != CTarget.nPageClickCounter )
  946.                  continue;
  947.             else if( strBsscEvent == "bsschover" && event.type == "mouseout" )
  948.                 eventAgency[i].EndEffect();
  949.             else // to invoke the unified function in effect object    
  950.                 eventAgency[i].UpdateEffect(); 
  951.         }
  952.     }
  953. }
  954.  
  955. CTarget.prototype.SetState = function( strBsscEvent )
  956. {
  957.     if( typeof(this.objManager[strBsscEvent]) != "object" )
  958.         return false;
  959.  
  960.     // to get the event agency from the event manager
  961.     var eventAgency = this.objManager[strBsscEvent];
  962.     
  963.     if( strBsscEvent == "bsscpageclick" )
  964.     {// we only set the initial state for the minium number of pageclick 
  965.         eventAgency[this.objManager.nMinPageClickIndex].PrepareEffect();
  966.         return true;
  967.     }
  968.     else
  969.     {
  970.         for( var i = 0; i < eventAgency.length; i++ )
  971.             eventAgency[i].PrepareEffect(); // to invoke the unified function in effect object     
  972.         if( i > 0 )
  973.             return true;
  974.         else
  975.             return false;
  976.     }
  977. }
  978. //End the definition of class CTarget
  979.  
  980. //Begin the definition of CEngine class
  981. function CEngine(){}// all properities are going be "class" properities
  982.  
  983. // object : as associative array of trigger objects
  984. CEngine.objTrigger = new Object();
  985. // object : as associative array of target objects 
  986. CEngine.objTarget = new Object(); 
  987.  
  988. // Array : each element is a CAgencyXXX animation object
  989. CEngine.arrAnimation = new Array();
  990. CEngine.PerformAnimation = function( nIndex )
  991. {// animation : update effects function
  992.     CEngine.arrAnimation[nIndex].UpdateEffect();
  993. }
  994.  
  995. CEngine.AddOneTrigger = function(TriggerID,TriggerElement)
  996. {// add one Trigger object into the trigger array
  997.     if( typeof(TriggerID) != "string" || TriggerElement == null ||
  998.         typeof(TriggerElement) != "object" )
  999.         return;
  1000.     if( typeof(CEngine.objTrigger[TriggerID] ) != "object" )
  1001.         CEngine.objTrigger[TriggerID] = new CTrigger(TriggerElement);
  1002. }
  1003.     
  1004. CEngine.AddOneTarget = function(TargetID, TargetElement)
  1005. {// add one Target object into the target array
  1006.     if( typeof(TargetID) != "string" || TargetElement == null ||
  1007.         typeof(TargetElement) != "object" )
  1008.         return;
  1009.     if( typeof(CEngine.objTarget[TargetID]) != "object" )
  1010.         CEngine.objTarget[TargetID] = new CTarget( TargetElement );
  1011. }
  1012.  
  1013. CEngine.SendEventToOneTarget = function(strTargetID, strBsscEvent )
  1014. {// to activate one target object
  1015.     if( typeof(CEngine.objTarget[strTargetID]) == "object" ) 
  1016.     {
  1017.         if( strBsscEvent == "bssctrigger1" || strBsscEvent == "bssctrigger2" )
  1018.         {//now, the "bssctrigger1" and "bssctrigger2" work like a toggle
  1019.             if( strBsscEvent == CEngine.objTarget[strTargetID].strTriggerEvent )
  1020.                 strBsscEvent = (strBsscEvent == "bssctrigger1") ? "bssctrigger2" : "bssctrigger1";
  1021.             CEngine.objTarget[strTargetID].strTriggerEvent = strBsscEvent;
  1022.         }
  1023.         CEngine.objTarget[strTargetID].OnEvent( strBsscEvent );
  1024.     }
  1025. }
  1026.  
  1027. CEngine.SendEventToAllTarget = function( strBsscEvent )
  1028. { //to activate all target associative to the BSSC event
  1029.     for( var strTargetID in CEngine.objTarget ) //to enumerate all target
  1030.         CEngine.SendEventToOneTarget( strTargetID, strBsscEvent );
  1031. }
  1032.  
  1033. CEngine.SetOneTargetInitialState = function( strTargetID )
  1034. {// only invoked after ALL effects for the target have been set
  1035.     if( typeof(CEngine.objTarget[strTargetID]) == "object" ) 
  1036.     {// to get target object
  1037.         var objTarget = CEngine.objTarget[strTargetID];
  1038.         if( objTarget.SetState( "bsscpageload" ) == false )
  1039.         {
  1040.             objTarget.SetState( "bsscpageclick" );
  1041.             objTarget.SetState( "bssctrigger1" );
  1042.         }
  1043.     }
  1044. }
  1045.  
  1046. CEngine.AdjustPageClickCounter = function()
  1047. {
  1048.     var nAdjustedClickCounter = CTarget.nPageClickCounter;
  1049.     var bAdjusted = false;
  1050.     for( var strTargetID in CEngine.objTarget ) //to enumerate all target
  1051.     {// try to find the minum pageCliclConter greater than CTarget.nPageClickCounter
  1052.         var objEventPageClick = CEngine.objTarget[strTargetID].objManager.bsscpageclick;
  1053.         if( objEventPageClick != null )
  1054.         {
  1055.             for( var i = 0; i < objEventPageClick.length; i++ )
  1056.             {
  1057.                 var nOtherPageClick = objEventPageClick[i].nPageClick;
  1058.                 if( nOtherPageClick == CTarget.nPageClickCounter )
  1059.                     return;
  1060.                 if( nOtherPageClick > CTarget.nPageClickCounter )
  1061.                 {
  1062.                     if( !bAdjusted )
  1063.                     {
  1064.                         nAdjustedClickCounter = nOtherPageClick;
  1065.                         bAdjusted = true;
  1066.                     }
  1067.                     else if( nOtherPageClick < nAdjustedClickCounter )
  1068.                         nAdjustedClickCounter = nOtherPageClick;
  1069.                 }
  1070.             }
  1071.         }
  1072.     }
  1073.     CTarget.nPageClickCounter = nAdjustedClickCounter;
  1074. }
  1075.  
  1076. CEngine.OnPageLoad = function()
  1077. {     
  1078.     // first, to set all target's initial state
  1079.     for( var strTargetID in CEngine.objTarget )
  1080.         CEngine.SetOneTargetInitialState( strTargetID );
  1081.     
  1082.     // to invoke all target's onpageload handler
  1083.     CEngine.SendEventToAllTarget( "bsscpageload" );
  1084. }
  1085.  
  1086. CEngine.OnPageClick = function()
  1087. { // to invoke all target's onpageclick handler
  1088.     var src = CCSSP.GetEventElement( arguments[0] );
  1089.     if( src == null )
  1090.         return;
  1091.         
  1092.     var objClickedTrigger = null;
  1093.     for( var strTriggerID in CEngine.objTrigger )
  1094.     { // to detect which trigger is clicked
  1095.         if( CCSSP.IsDescendant( CEngine.objTrigger[strTriggerID].eleTrigger,src) )
  1096.         {
  1097.             objClickedTrigger = CEngine.objTrigger[strTriggerID];
  1098.             break;
  1099.         }
  1100.     }
  1101.     
  1102.     if( objClickedTrigger != null) // the clicked trigger found
  1103.         objClickedTrigger.OnTriggerClick();
  1104.     else // no trigger is clicked
  1105.     { // to send PageClick event to all target
  1106.         CTarget.nPageClickCounter++;
  1107.         CEngine.AdjustPageClickCounter();
  1108.         CEngine.SendEventToAllTarget( "bsscpageclick" );
  1109.     }
  1110. }    
  1111.  
  1112. CEngine.OnMouseOver = function()
  1113. { // to invoke all target's onpageload handler
  1114.     var src = CCSSP.GetEventElement( arguments[0] );
  1115.     if( src == null )
  1116.         return;
  1117.         
  1118.     var strHoveredTargetID = null;
  1119.     for( var strTargetID in CEngine.objTarget )
  1120.     { // to detect which Target is hovering on
  1121.         if( CCSSP.IsDescendant( CEngine.objTarget[strTargetID].eleTarget, src ) )
  1122.         {
  1123.             strHoveredTargetID = strTargetID;
  1124.             break;
  1125.         }
  1126.     }
  1127.     
  1128.     if( strHoveredTargetID != null ) // the hovered target found
  1129.         CEngine.SendEventToOneTarget( strHoveredTargetID, "bsschover" );
  1130. }
  1131.  
  1132. CEngine.BuildTargetObject = function(target_ID,event_type,action_type,
  1133.             action_setting, event_additional)
  1134. {// to build target object 
  1135.     // to get the target object
  1136.     if( typeof( CEngine.objTarget[target_ID] ) != "object" )
  1137.         return false;// the engine's AddOneTarget function might have failed.
  1138.     var TargetObject = CEngine.objTarget[target_ID];
  1139.     
  1140.     // to prepare the parameters for the event manager
  1141.     var arrEvent = event_type.split("|"); // to split the combined event_type string
  1142.     var arrAction = action_type.split("|");//to split the combined action_type string
  1143.     for( var trim = 0; trim < arrEvent.length; trim++ )
  1144.         arrEvent[trim] = CCSSP.TrimSpace(arrEvent[trim]);
  1145.     
  1146.     for( trim = 0; trim < arrAction.length; trim++ )
  1147.         arrAction[trim] = CCSSP.TrimSpace(arrAction[trim]);
  1148.     
  1149.     var arrSetting = new Array(); 
  1150.     if( typeof(action_setting) == "string" )
  1151.         arrSetting = action_setting.split("|");// to split the combined action_setting string
  1152.     // to calibrate the arrays
  1153.     for( var i = arrSetting.length; i < arrAction.length; i++ )
  1154.     {
  1155.         if( typeof(arrSetting[i]) != "string" )
  1156.              arrSetting[i] = "";
  1157.     }                 
  1158.  
  1159.     // to prepare for dealing with the absolute posioning element
  1160.     TargetObject.eleTarget.ABSX = CCSSP.GetObjectLeft( TargetObject.eleTarget );
  1161.     TargetObject.eleTarget.ABSY = CCSSP.GetObjectTop( TargetObject.eleTarget );
  1162.  
  1163.     if( arrEvent.length > 1 )
  1164.     {// if event is combined, it must be : "bssctrigger1 | bssctrigger2"
  1165.         if( arrAction.length != 2 )
  1166.             return false; // if event is combined, there must be 2 actions
  1167.         for( i = 0 ; i < 2; i++ )
  1168.         {
  1169.             if( TargetObject.SetEventManager(arrEvent[i], arrAction[i], 
  1170.                 arrSetting[i], event_additional) == false )
  1171.                 return false; // the event manager has not been set up
  1172.         }
  1173.     }
  1174.     else // the event_type string is not combined
  1175.     {
  1176.         for( i = 0 ; i < arrAction.length; i++ )
  1177.         {
  1178.             TargetObject.SetEventManager(event_type, arrAction[i], arrSetting[i], event_additional);
  1179.             // to validate the event manager
  1180.             if( typeof(TargetObject.objManager[event_type]) != "object" ||
  1181.                     typeof(TargetObject.objManager[event_type][i]) != "object" )
  1182.                 return false; // the event manager has not been set up
  1183.         }
  1184.     }
  1185.     return true;
  1186. }
  1187.  
  1188. CEngine.BuildTriggerObject = function(trigger_ID, target_ID)
  1189. {// to build the trigger object
  1190.     var arrTrigger = trigger_ID.split("|"); // to split the combined trigger_ID string
  1191.     for( var i = 0; i < arrTrigger.length; i ++ )
  1192.     {// to get the trigger element then add it to the trigger list
  1193.         arrTrigger[i] = CCSSP.TrimSpace( arrTrigger[i] );
  1194.         var eleTrigger = CCSSP.GetObject( arrTrigger[i] );
  1195.         if( eleTrigger == null )
  1196.             continue; // the trigger_ID string in the HTML code maybe wrong
  1197.         CEngine.AddOneTrigger( arrTrigger[i], eleTrigger );
  1198.  
  1199.         // to get the target object
  1200.         if( typeof( this.objTrigger[arrTrigger[i]] ) != "object" )
  1201.             continue;// the engine's AddOneTarget function might have failed.
  1202.         CEngine.objTrigger[arrTrigger[i]].AddTargetID( target_ID );
  1203.     }
  1204. }
  1205. //End the definition of CEngine class
  1206.  
  1207. /// Section End  - CCSSP DHTM 1 (JavaScript 1.2)
  1208.  
  1209. /// Section Begin  - CCSSP DHTM 2 (JavaScript 1.2)
  1210.  
  1211. //Begin the definition of CAgencyXXXX classes
  1212.  
  1213. //Begin of the CAgencyShow definition
  1214. function CAgencyShow( element, bIsShow )
  1215. {
  1216.     this.ele = element;
  1217.     this.bIsShow = bIsShow;
  1218. }
  1219.  
  1220. CAgencyShow.prototype.PrepareEffect = function()
  1221. {
  1222.     CCSSP.ShowObject( this.ele, !this.bIsShow );
  1223. }
  1224.  
  1225. CAgencyShow.prototype.UpdateEffect = function()
  1226. {
  1227.     CCSSP.ShowObject( this.ele, this.bIsShow );
  1228. }
  1229.  
  1230. CAgencyShow.prototype.EndEffect = function()
  1231. {
  1232.     CCSSP.ShowObject( this.ele, !this.bIsShow );
  1233. }
  1234. // End of the CAgencyShow definition
  1235.  
  1236. // Begin of CAgencyFly definition
  1237. function CAgencyFly( element, settings, bIsIn )
  1238. {
  1239.     this.ele = element;
  1240.     this.bIsIn = bIsIn;
  1241.     this.duration = 1000; // default
  1242.     this.direction = "right";
  1243.  
  1244.     var arrAllSet = settings.split(",");
  1245.     for( var i = 0; i < arrAllSet.length; i ++ )
  1246.     {// to retrieve the setting
  1247.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1248.         var arrOneSet = arrAllSet[i].split("=");
  1249.         for( var j = 0; j < arrOneSet.length; j++ )
  1250.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1251.         switch( arrOneSet[0] )
  1252.         {
  1253.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  1254.         case "direction" : this.direction = arrOneSet[1]; break;
  1255.         }
  1256.     }
  1257.         
  1258.     if( CCSSP.bIsIE5 && this.ele.style.position != "absolute" )
  1259.         this.ele.style.position = "relative";
  1260.     this.timer = null;
  1261.     this.aniIndex = CEngine.arrAnimation.length;
  1262.     CEngine.arrAnimation[this.aniIndex] = this;
  1263. }
  1264.  
  1265. CAgencyFly.prototype.PrepareEffect = function()
  1266. {
  1267.     CCSSP.ShowObject(this.ele, !this.bIsIn );
  1268. }
  1269.  
  1270. CAgencyFly.prototype.UpdateEffect = function()
  1271. {
  1272.     if( this.timer == null )
  1273.         this.ResetParameters();
  1274.  
  1275.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1276.     if( percent >= 1.0 )
  1277.         this.EndEffect();
  1278.     else
  1279.     {
  1280.         var newX = this.startX*(1.0-percent) +  this.finalX*percent;
  1281.         var newY = this.startY*(1.0-percent) +  this.finalY*percent;
  1282.         CCSSP.MoveObjectTo(this.ele, newX, newY);
  1283.         if( this.timer == null )
  1284.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  1285.     }
  1286. }
  1287.  
  1288. CAgencyFly.prototype.EndEffect = function()
  1289. {
  1290.     clearInterval( this.timer );
  1291.     this.timer = null;
  1292.  
  1293.     if( this.bIsIn ) // FlyIn
  1294.         CCSSP.MoveObjectTo(this.ele, this.finalX, this.finalY);
  1295.     else // FlyOut
  1296.         CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  1297.     CCSSP.ShowObject(this.ele, this.bIsIn );
  1298. }
  1299.  
  1300. CAgencyFly.prototype.ResetParameters = function()
  1301. {
  1302.     this.PrepareEffect();
  1303.     CCSSP.ShowObject(this.ele, true );
  1304.  
  1305.     this.startX = 0;
  1306.     this.startY = 0;
  1307.     this.finalX = 0;
  1308.     this.finalY = 0; 
  1309.     
  1310.     var offsetLeft = CCSSP.GetObjectWindowLeft(this.ele) + this.ele.offsetWidth;
  1311.     var offsetTop = CCSSP.GetObjectWindowTop(this.ele) + this.ele.offsetHeight;
  1312.     var offsetRight = CCSSP.GetWindowRight();
  1313.     var offsetBottom = CCSSP.GetWindowBottom();
  1314.  
  1315.     if( this.bIsIn )
  1316.     { // FlyIn
  1317.         this.finalX = this.ele.ABSX;
  1318.         this.finalY = this.ele.ABSY;
  1319.  
  1320.         switch( this.direction )
  1321.         {
  1322.         case "right": this.startX = offsetRight; this.startY = this.finalY; break;
  1323.         case "left": this.startX = -offsetLeft;  this.startY = this.finalY; break;
  1324.         case "down": this.startY = offsetBottom; this.startX = this.finalX; break;
  1325.         case "up":  this.startY = -offsetTop;    this.startX = this.finalX; break;
  1326.         case "downright":
  1327.               this.startX = ( offsetBottom < offsetRight) ? offsetBottom : offsetRight;
  1328.             this.startY = this.startX;        break;
  1329.         case "upright":
  1330.               this.startX = (offsetTop < offsetRight)? offsetTop : offsetRight;
  1331.             this.startY = -this.startX;        break;
  1332.         case "upleft":
  1333.             this.startX = -((offsetTop < offsetRight)? offsetTop : offsetRight);
  1334.             this.startY = this.startX;        break;
  1335.         case "downleft":
  1336.             this.startX = -(( offsetBottom < offsetRight) ? offsetBottom : offsetRight);
  1337.             this.startY = -this.startX;     break;
  1338.         }
  1339.     }
  1340.     else
  1341.     { // FlyOut
  1342.         this.startX = this.ele.ABSX;
  1343.         this.startY = this.ele.ABSY;
  1344.  
  1345.         switch( this.direction )
  1346.         {
  1347.         case "right": this.finalX = offsetRight;  this.finalY = this.startY; break;
  1348.         case "left": this.finalX = -offsetLeft;   this.finalY = this.startY;  break;
  1349.         case "down": this.finalY = offsetBottom;  this.finalX = this.startX; break;
  1350.         case "up":  this.finalY = -offsetTop;     this.finalX = this.startX; break;
  1351.         case "downright":
  1352.               this.finalX = ( offsetBottom < offsetRight) ? offsetBottom : offsetRight;
  1353.             this.finalY = this.finalX;        break;
  1354.         case "upright":
  1355.               this.finalX = (offsetTop < offsetRight)? offsetTop : offsetRight;
  1356.             this.finalY = -this.finalX;        break;
  1357.         case "upleft":
  1358.             this.finalX = -((offsetTop < offsetRight)? offsetTop : offsetRight);
  1359.             this.finalY = this.finalX;        break;
  1360.         case "downleft":
  1361.             this.finalX = -(( offsetBottom < offsetRight) ? offsetBottom : offsetRight);
  1362.             this.finalY = -this.finalX;     break;
  1363.         }
  1364.     }
  1365.     CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  1366.     this.startTime = (new Date()).getTime();
  1367. }
  1368. // End of the CAgencyFly definition
  1369.  
  1370. // Begin of CAgencySpiral
  1371. function CAgencySpiral( element, settings, bIsIn )
  1372. {
  1373.     this.ele = element;
  1374.     this.bIsIn = bIsIn;
  1375.     this.duration = 1000; // default
  1376.  
  1377.     var arrAllSet = settings.split(",");
  1378.     for( var i = 0; i < arrAllSet.length; i ++ )
  1379.     {// to retrieve the setting
  1380.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1381.         var arrOneSet = arrAllSet[i].split("=");
  1382.         for( var j = 0; j < arrOneSet.length; j++ )
  1383.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1384.         switch( arrOneSet[0] )
  1385.         {
  1386.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  1387.         }
  1388.     }
  1389.  
  1390.     if( CCSSP.bIsIE5 && this.ele.style.position != "absolute" )
  1391.         this.ele.style.position = "relative";
  1392.     this.timer = null;
  1393.     this.aniIndex = CEngine.arrAnimation.length;
  1394.     CEngine.arrAnimation[this.aniIndex] = this;
  1395. }
  1396.  
  1397. CAgencySpiral.prototype.PrepareEffect = function()
  1398. {
  1399.     CCSSP.ShowObject(this.ele, !this.bIsIn );
  1400. }
  1401.  
  1402. CAgencySpiral.prototype.UpdateEffect = function()
  1403. {
  1404.     if( this.timer == null )
  1405.         this.ResetParameters();
  1406.  
  1407.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1408.     if( percent >= 1.0 )
  1409.         this.EndEffect();
  1410.     else
  1411.     {
  1412.         var rf = (this.bIsIn)? (1.0 - percent) : percent; 
  1413.         var t = (1.0-rf) * 4.0 * Math.PI
  1414.         var rxP = (this.bIsIn)? this.startX : this.finalX; 
  1415.         var ryP = (this.bIsIn)? this.startY : this.finalY; 
  1416.         var rx = (Math.abs(rxP) < 200) ? Math.abs(rxP) : 200;
  1417.         var ry = (Math.abs(ryP) < 200) ? Math.abs(ryP) : 200;
  1418.  
  1419.         var newX = Math.ceil(-rf*Math.cos(t)*rx) + this.ele.ABSX;
  1420.         var newY = Math.ceil(-rf*Math.sin(t)*ry) + this.ele.ABSY;
  1421.         CCSSP.MoveObjectTo(this.ele, newX, newY);
  1422.         if( this.timer == null )
  1423.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  1424.     }
  1425. }
  1426.  
  1427. CAgencySpiral.prototype.EndEffect = function()
  1428. {
  1429.     clearInterval( this.timer );
  1430.     this.timer = null;
  1431.     
  1432.     if( this.bIsIn ) // In
  1433.         CCSSP.MoveObjectTo(this.ele, this.finalX, this.finalY);
  1434.     else // Out
  1435.         CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  1436.     CCSSP.ShowObject(this.ele, this.bIsIn );
  1437. }
  1438.  
  1439. CAgencySpiral.prototype.ResetParameters = function()
  1440. {
  1441.     this.PrepareEffect();
  1442.     CCSSP.ShowObject(this.ele, true );
  1443.     this.startX = (this.bIsIn)? CCSSP.GetWindowRight() : this.ele.ABSX;
  1444.     this.startY = (this.bIsIn)? CCSSP.GetWindowBottom() : this.ele.ABSY;
  1445.     this.finalX = (this.bIsIn)? this.ele.ABSX : CCSSP.GetWindowRight();
  1446.     this.finalY = (this.bIsIn)? this.ele.ABSY : CCSSP.GetWindowBottom(); 
  1447.     
  1448.     CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  1449.     this.startTime = (new Date()).getTime();
  1450. }
  1451. // End of CAgencySpiral
  1452.  
  1453. // Begin of CAgencyElastic
  1454. function CAgencyElastic( element, settings)
  1455. {
  1456.     this.ele = element;
  1457.     this.duration = 1000; // default
  1458.     this.direction = "right";
  1459.  
  1460.     var arrAllSet = settings.split(",");
  1461.     for( var i = 0; i < arrAllSet.length; i ++ )
  1462.     {// to retrieve the setting
  1463.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1464.         var arrOneSet = arrAllSet[i].split("=");
  1465.         for( var j = 0; j < arrOneSet.length; j++ )
  1466.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1467.         switch( arrOneSet[0] )
  1468.         {
  1469.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  1470.         case "direction" : this.direction = arrOneSet[1]; break;
  1471.         }
  1472.     }
  1473.         
  1474.     if( CCSSP.bIsIE5 && this.ele.style.position != "absolute" )
  1475.         this.ele.style.position = "relative";
  1476.     this.timer = null;
  1477.     this.aniIndex = CEngine.arrAnimation.length;
  1478.     CEngine.arrAnimation[this.aniIndex] = this;
  1479. }
  1480.  
  1481. CAgencyElastic.prototype.PrepareEffect = function()
  1482. {
  1483.     CCSSP.ShowObject(this.ele, false );
  1484. }
  1485.  
  1486. CAgencyElastic.prototype.UpdateEffect = function()
  1487. {
  1488.     if( this.timer == null )
  1489.         this.ResetParameters();
  1490.  
  1491.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1492.     if( percent >= 1.0 )
  1493.         this.EndEffect();
  1494.     else
  1495.     {
  1496.         var newX = this.startX;
  1497.         var newY = this.startY;
  1498.         var rf = Math.exp(-percent*3);
  1499.         var t = percent * 1.5 * Math.PI
  1500.         var rx = (Math.abs(this.startX) > Math.abs(this.startY)) ? this.startX : this.startY;
  1501.         switch (this.direction )
  1502.         {
  1503.         case "left":   
  1504.         case "right" : newX = rf*Math.cos(t)*rx + this.ele.ABSX; break;
  1505.         case "up":       
  1506.         case "down" :  newY = rf*Math.cos(t)*rx + this.ele.ABSX; break;
  1507.         }
  1508.         CCSSP.MoveObjectTo(this.ele, newX, newY);
  1509.         if( this.timer == null )
  1510.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  1511.     }
  1512. }
  1513.  
  1514. CAgencyElastic.prototype.EndEffect = function()
  1515. {
  1516.     CCSSP.MoveObjectTo(this.ele, this.finalX, this.finalY);
  1517.     clearInterval( this.timer );
  1518.     this.timer = null;
  1519. }
  1520.  
  1521. CAgencyElastic.prototype.ResetParameters = function()
  1522. {
  1523.     CCSSP.ShowObject(this.ele, true );
  1524.     this.startX = this.ele.ABSX;
  1525.     this.finalX = this.ele.ABSX;
  1526.     this.startY = this.ele.ABSY;
  1527.     this.finalY = this.ele.ABSY;
  1528.     
  1529.     switch (this.direction)
  1530.     { 
  1531.     case "left":  this.startX = -this.ele.offsetWidth; break;
  1532.     case "right": this.startX = this.ele.offsetWidth;  break;
  1533.     case "up":    this.startY = -this.ele.offsetHeight;break;
  1534.     case "down":  this.startY = this.ele.offsetHeight; break;
  1535.     }
  1536.     CCSSP.MoveObjectTo(this.ele, this.startX, this.startY);
  1537.     this.startTime = (new Date()).getTime();
  1538. }
  1539. // End of CAgencyElastic
  1540.  
  1541. // Begin of CAgencyZoom
  1542. function CAgencyZoom( element, settings, bIsIn)
  1543. {
  1544.     this.ele = element;
  1545.     this.duration = 1000; // default
  1546.     
  1547.     var arrAllSet = settings.split(",");
  1548.     for( var i = 0; i < arrAllSet.length; i ++ )
  1549.     {// to retrieve the setting
  1550.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1551.         var arrOneSet = arrAllSet[i].split("=");
  1552.         for( var j = 0; j < arrOneSet.length; j++ )
  1553.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1554.         switch( arrOneSet[0] )
  1555.         {
  1556.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  1557.         }
  1558.     }
  1559.  
  1560.     this.bIsIn = bIsIn;
  1561.     this.timer = null;
  1562.     this.aniIndex = CEngine.arrAnimation.length;
  1563.     CEngine.arrAnimation[this.aniIndex] = this;
  1564. }
  1565.  
  1566. CAgencyZoom.prototype.PrepareEffect = function()
  1567. {
  1568.     CCSSP.ShowObject(this.ele, false);
  1569. }
  1570.  
  1571. CAgencyZoom.prototype.UpdateEffect = function()
  1572. {
  1573.     if( this.timer == null )
  1574.         this.ResetParameters();
  1575.  
  1576.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1577.     if( percent >= 1.0 )
  1578.         this.EndEffect();
  1579.     else
  1580.     {
  1581.         var nFactorIn = Math.ceil(50+50*percent);
  1582.         var nFactorOut = Math.ceil(100+200*(1-percent));
  1583.         var AlterFontsize = ((this.bIsIn)? nFactorIn : nFactorOut) + "%";
  1584.         var AlterFactor = ((this.bIsIn)? nFactorIn : nFactorOut) / 100;
  1585.         
  1586.         this.UpdateEffectAllChildren(this.ele, AlterFontsize, AlterFactor);
  1587.         for(var index = 0; index < this.ele.all.length; index++)
  1588.             this.UpdateEffectAllChildren(this.ele.all[index], AlterFontsize, AlterFactor);
  1589.             
  1590.         if( this.timer == null )
  1591.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  1592.     }
  1593. }
  1594.  
  1595. CAgencyZoom.prototype.UpdateEffectAllChildren = function(child, FontSize, Factor)
  1596. {
  1597.     if( CCSSP.IsTextTag(child) )
  1598.         child.style.fontSize = FontSize;
  1599.     else
  1600.     {
  1601.         if( typeof(child.orgWidth) == "number" )
  1602.             child.style.width = Factor * child.orgWidth;
  1603.         if( typeof(child.orgHeight) == "number" )
  1604.             child.style.height = Factor * child.orgHeight;
  1605.     }
  1606. }
  1607.  
  1608. CAgencyZoom.prototype.EndEffect = function()
  1609. {
  1610.     this.EndEffectAllChildren(this.ele);
  1611.     for(var index = 0; index < this.ele.all.length; index++)
  1612.         this.EndEffectAllChildren(this.ele.all[index]);
  1613.     
  1614.     clearInterval( this.timer );
  1615.     this.timer = null;
  1616. }
  1617.  
  1618. CAgencyZoom.prototype.EndEffectAllChildren = function( child )
  1619. {    
  1620.     if( CCSSP.IsTextTag(child) )
  1621.         child.style.fontSize = child.orgFontSize;
  1622.     else
  1623.     {
  1624.         if( typeof(child.intactWidth) != "undefined" )
  1625.         {
  1626.             child.width = child.intactWidth;
  1627.             child.height = child.intactHeight;
  1628.         }
  1629.         else if( typeof(child.style.intactPixelWidth) != "undefined" )
  1630.         {
  1631.             child.style.pixelWidth = child.style.intactPixelWidth;
  1632.             child.style.pixelHeight = child.style.intactPixelHeight;
  1633.         }
  1634.     }
  1635. }
  1636.  
  1637. CAgencyZoom.prototype.ResetParameters = function()
  1638. {
  1639.     this.PrepareEffect();
  1640.     this.ResetParametersAllChildren( this.ele );
  1641.     for(var index = 0; index < this.ele.all.length; index++)
  1642.         this.ResetParametersAllChildren(this.ele.all[index]);
  1643.         
  1644.     this.startTime = (new Date()).getTime();
  1645. }
  1646.  
  1647. CAgencyZoom.prototype.ResetParametersAllChildren = function( child )
  1648. {
  1649.     CCSSP.ShowObject(child, true );
  1650.     if( (child.tagName == "DIV") && (child.parentElement.tagName == "TD") )
  1651.         child.width = "100%";// if the div is inside a cell of table, we need the this hack
  1652.     
  1653.     if( CCSSP.IsTextTag(child) )
  1654.         child.orgFontSize = child.style.fontSize;
  1655.     else
  1656.     {
  1657.         if( child.width > "" || child.height > "" )
  1658.         {
  1659.             child.orgWidth = child.intactWidth = child.width;
  1660.             child.orgHeight = child.intactHeight = child.height;
  1661.         }
  1662.         else if( ( typeof(child.orgWidth) != "number" ) && (typeof(child.orgHeight) != "number") )
  1663.         {
  1664.             child.orgWidth = child.style.intactPixelWidth = child.style.pixelWidth;
  1665.             child.orgHeight = child.style.intactPixelHeight = child.style.pixelHeight;
  1666.         }
  1667.     }
  1668. }
  1669. // End of CAgencyZoom
  1670.  
  1671. //// the following effects will use IE's exclusive "filter" function ////
  1672. // Begin of CAgencyAlpha definition
  1673. function CAgencyAlpha( element, settings, bIsIn )
  1674. {// because of "visual filter" style, this won't work in Navigator
  1675.     this.ele = element;
  1676.     this.bIsIn = bIsIn;
  1677.  
  1678.     // to set the default value
  1679.     this.startOpacity = (this.bIsIn) ? 0 : 100;
  1680.     this.endOpacity = (this.bIsIn) ? 100 : 0;
  1681.     
  1682.     this.duration = 1000; // default
  1683.     
  1684.     var arrAllSet = settings.split(",");
  1685.     for( var i = 0; i < arrAllSet.length; i ++ )
  1686.     {// to retrieve the setting
  1687.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1688.         var arrOneSet = arrAllSet[i].split("=");
  1689.         for( var j = 0; j < arrOneSet.length; j++ )
  1690.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1691.         switch( arrOneSet[0] )
  1692.         {
  1693.         case "speed" : this.duration = 100000/arrOneSet[1]; break;
  1694.         }
  1695.     }
  1696.     
  1697.     this.timer = null;
  1698.     this.aniIndex = CEngine.arrAnimation.length;
  1699.     CEngine.arrAnimation[this.aniIndex] = this;
  1700. }
  1701.  
  1702. CAgencyAlpha.prototype.PrepareEffect = function()
  1703. {// to set the visual filter function
  1704.     // the visual filter ONLY work when set by "Width and Height" or
  1705.     // absolute position for DIV, SPAN and normal tag ( such as p )
  1706.     // but, "absolute" cause the following elements overlap, so:
  1707.     CCSSP.PrepareFilter( this.ele );
  1708.     CCSSP.ShowObject(this.ele, !this.bIsIn );
  1709. }
  1710.  
  1711. CAgencyAlpha.prototype.UpdateEffect = function()
  1712. {// to set the visual filter function
  1713.     if( this.timer == null )
  1714.         this.ResetParameters();
  1715.     if( typeof(this.ele.filters.alpha) != "object" )
  1716.     {
  1717.         this.EndEffect();
  1718.         return;
  1719.     }
  1720.  
  1721.     var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1722.     if( percent >= 1.0 )
  1723.         this.EndEffect();
  1724.     else if( typeof(this.ele.filters.alpha) == "object" )
  1725.     {
  1726.         this.ele.filters.alpha.opacity = this.startOpacity*(1.0-percent) + this.endOpacity*percent;
  1727.         if( this.timer == null )
  1728.             this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 20 );
  1729.     }
  1730. }
  1731.  
  1732. CAgencyAlpha.prototype.EndEffect = function()
  1733. {// to remove the visual filter function
  1734.     clearInterval( this.timer );
  1735.     this.timer = null;
  1736.     this.ele.style.filter = "";
  1737.     CCSSP.ShowObject(this.ele, this.bIsIn );
  1738. }
  1739.  
  1740. CAgencyAlpha.prototype.ResetParameters = function()
  1741. {
  1742.     this.PrepareEffect();
  1743.     CCSSP.ShowObject(this.ele, true );
  1744.     this.ele.style.filter = "alpha(opacity=" + this.startOpacity + ")";
  1745.     this.startTime = (new Date()).getTime();
  1746. }
  1747. // End of the CAgencyAlpha definition
  1748.  
  1749. // Begin of CAgencyWave definition
  1750. function CAgencyWave( element, settings )
  1751. {// because of "visual filter" style, this won't work in Navigator
  1752.     this.ele = element;
  1753.  
  1754.     this.duration = 0; // default
  1755.     this.strength = 10;
  1756.     this.freq = 1;
  1757.     this.lightstrength = 1;
  1758.     
  1759.     var arrAllSet = settings.split(",");
  1760.     for( var i = 0; i < arrAllSet.length; i ++ )
  1761.     {// to retrieve the setting
  1762.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1763.         var arrOneSet = arrAllSet[i].split("=");
  1764.         for( var j = 0; j < arrOneSet.length; j++ )
  1765.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1766.         switch( arrOneSet[0] )
  1767.         {
  1768.         case "duration" : this.duration = 100000/arrOneSet[1]; break;
  1769.         case "strength" : this.strength = arrOneSet[1]; break;
  1770.         case "freq" : this.freq = arrOneSet[1]; break;
  1771.         case "lightstrength" : this.lightstrength = arrOneSet[1]; break;
  1772.         }
  1773.     }
  1774.  
  1775.     this.timer = null;
  1776.     this.aniIndex = CEngine.arrAnimation.length;
  1777.     CEngine.arrAnimation[this.aniIndex] = this;
  1778. }
  1779.  
  1780. CAgencyWave.prototype.PrepareEffect = function()
  1781. {// to set the visual filter function
  1782.     CCSSP.PrepareFilter(this.ele);
  1783.  
  1784.     CCSSP.ShowObject(this.ele, true );
  1785. }
  1786.  
  1787. CAgencyWave.prototype.UpdateEffect = function()
  1788. {// to set the visual filter function
  1789.     if( this.timer == null )
  1790.         this.ResetParameters();
  1791.     if( typeof(this.ele.filters.wave) != "object" )
  1792.     {
  1793.         this.EndEffect();
  1794.         return;
  1795.     }
  1796.  
  1797.     if( this.duration > 0 )
  1798.     {
  1799.         var percent = ((new Date()).getTime() - this.startTime)/this.duration;
  1800.         if( percent >= 1.0 )
  1801.         {
  1802.             this.EndEffect();
  1803.             return;
  1804.         }
  1805.     }
  1806.     
  1807.     this.ele.filters.wave.phase += 5;
  1808.     this.ele.filters.wave.phase %= 100;
  1809.     if( this.timer == null )
  1810.         this.timer = setInterval("CEngine.PerformAnimation(" + this.aniIndex + ")", 50 );
  1811. }
  1812.  
  1813. CAgencyWave.prototype.EndEffect = function()
  1814. {// to remove the visual filter function
  1815.     this.ele.style.filter = "";
  1816.     clearInterval( this.timer );
  1817.     this.timer = null;
  1818. }
  1819.  
  1820. CAgencyWave.prototype.ResetParameters = function()
  1821. {
  1822.     this.PrepareEffect();
  1823.     this.ele.style.filter = "wave(strength=" + this.strength + ",freq=" + 
  1824.      this.freq +", lightstrength=" + this.lightstrength +",phase=0);";
  1825.     this.startTime = (new Date()).getTime();
  1826. }
  1827. // End of the CAgencyWave definition
  1828.  
  1829. // Begin of CAgencyGlow definition
  1830. function CAgencyGlow( element, settings )
  1831. {// because of "visual filter" style, this won't work in Navigator
  1832.     this.ele = element;
  1833.  
  1834.     // to set the default value
  1835.     this.glowColor = "green";
  1836.     this.glowStrength = "3";
  1837.     
  1838.     var arrAllSet = settings.split(",");
  1839.     for( var i = 0; i < arrAllSet.length; i ++ )
  1840.     {
  1841.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1842.         var arrOneSet = arrAllSet[i].split("=");
  1843.         for( var j = 0; j < arrOneSet.length; j++ )
  1844.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1845.         switch( arrOneSet[0] )
  1846.         {
  1847.         case "color" : this.glowColor = arrOneSet[1]; break;
  1848.         case "strength" : this.glowStrength = arrOneSet[1]; break;
  1849.         }
  1850.     }
  1851. }
  1852.  
  1853. CAgencyGlow.prototype.PrepareEffect = function()
  1854. {
  1855.     CCSSP.PrepareFilter(this.ele);
  1856.     CCSSP.ShowObject(this.ele, true );
  1857.     if( this.ele.style.backgroundColor != "" )
  1858.     {//style.backgroundColor somehow stop the visual filter
  1859.         this.ele.intactBackgroundColor = this.ele.style.backgroundColor;
  1860.         this.ele.style.backgroundColor = "";
  1861.     }
  1862. }
  1863.  
  1864. CAgencyGlow.prototype.UpdateEffect = function()
  1865. {// to set the visual filter function
  1866.     this.PrepareEffect();
  1867.     this.ele.style.filter = "glow(Color=" + this.glowColor + ", Strength=" + 
  1868.         this.glowStrength + ", enabled=true" +")";
  1869. }
  1870.  
  1871. CAgencyGlow.prototype.EndEffect = function()
  1872. {// to remove the visual filter function
  1873.     this.ele.style.filter = "";
  1874.     if( typeof(this.ele.intactBackgroundColor) != "undefined" )
  1875.         this.ele.style.backgroundColor = this.ele.intactBackgroundColor;
  1876. }
  1877. // End of the CAgencyGlow definition
  1878.  
  1879. // Begin of CAgencyDropShadow definition
  1880. function CAgencyDropShadow( element, settings )
  1881. {// because of "visual filter" style, this won't work in Navigator
  1882.     this.ele = element;
  1883.  
  1884.     // to set the default value
  1885.     this.shadowColor = "black"; 
  1886.     this.shadowOffx = "1";
  1887.     this.shadowOffy = "1";
  1888.     
  1889.     var arrAllSet = settings.split(",");
  1890.     for( var i = 0; i < arrAllSet.length; i ++ )
  1891.     {
  1892.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1893.         var arrOneSet = arrAllSet[i].split("=");
  1894.         for( var j = 0; j < arrOneSet.length; j++ )
  1895.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1896.         switch( arrOneSet[0] )
  1897.         {
  1898.         case "color" : this.shadowColor = arrOneSet[1]; break;
  1899.         case "offx" : this.shadowOffx = arrOneSet[1]; break;
  1900.         case "offy" : this.shadowOffy = arrOneSet[1]; break;
  1901.         }
  1902.     }
  1903. }
  1904.  
  1905. CAgencyDropShadow.prototype.PrepareEffect = function()
  1906. {
  1907.     CCSSP.PrepareFilter(this.ele);
  1908.     CCSSP.ShowObject(this.ele, true );
  1909.     
  1910.     if( this.ele.style.backgroundColor != "" )
  1911.     {//style.backgroundColor somehow stop the visual filter
  1912.         this.ele.intactBackgroundColor = this.ele.style.backgroundColor;
  1913.         this.ele.style.backgroundColor = "";
  1914.     }
  1915. }
  1916.  
  1917. CAgencyDropShadow.prototype.UpdateEffect = function()
  1918. {// to set the visual filter function
  1919.     this.PrepareEffect();
  1920.     this.ele.style.filter = "dropshadow(color=" + this.shadowColor + ", offx=" + 
  1921.         this.shadowOffx + ", offy=" + this.shadowOffy + ")";
  1922. }
  1923.  
  1924. CAgencyDropShadow.prototype.EndEffect = function()
  1925. {// to remove the visual filter function
  1926.     this.ele.style.filter = "";
  1927.     if( typeof(this.ele.intactBackgroundColor) != "undefined" )
  1928.         this.ele.style.backgroundColor = this.ele.intactBackgroundColor;
  1929. }
  1930. // End of the CAgencyDropShadow definition
  1931.  
  1932. // Begin of CAgencyRevealTrans definition
  1933. function CAgencyRevealTrans( element, settings )
  1934. {// because of "visual filter" style, this won't work in Navigator
  1935.     this.ele = element;
  1936.  
  1937.     // to set the default value
  1938.     this.duration = 1.0; //The value is specified in seconds.milliseconds format (0.0000).
  1939.     this.transition = 0;
  1940.     
  1941.     var arrAllSet = settings.split(",");
  1942.     for( var i = 0; i < arrAllSet.length; i ++ )
  1943.     {
  1944.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  1945.         var arrOneSet = arrAllSet[i].split("=");
  1946.         for( var j = 0; j < arrOneSet.length; j++ )
  1947.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  1948.         switch( arrOneSet[0] )
  1949.         {
  1950.         case "type" : this.transition = arrOneSet[1]; break;
  1951.         case "duration" : this.duration = 100/arrOneSet[1];    break;
  1952.         }
  1953.     }
  1954. }
  1955.  
  1956. CAgencyRevealTrans.prototype.PrepareEffect = function()
  1957. {
  1958.     CCSSP.PrepareFilter(this.ele);
  1959.     CCSSP.ShowObject( this.ele, false);
  1960. }
  1961.  
  1962. CAgencyRevealTrans.prototype.UpdateEffect = function()
  1963. {// to set the visual filter function
  1964.     if( typeof( this.ele.filters.RevealTrans ) == "object" )
  1965.     {
  1966.         if( this.ele.filters.RevealTrans.status == 2 )
  1967.             this.ele.filters.RevealTrans.stop();  
  1968.     }
  1969.  
  1970.     this.PrepareEffect();
  1971.     
  1972.     this.ele.style.filter = "RevealTrans(duration=" + this.duration + 
  1973.         ", transition=" + this.transition + ")";
  1974.     
  1975.     if( typeof( this.ele.filters.RevealTrans ) == "object" )
  1976.     {
  1977.         this.ele.filters.RevealTrans.apply();
  1978.         CCSSP.ShowObject( this.ele, true);
  1979.         this.ele.filters.RevealTrans.play();  
  1980.     }
  1981.     else
  1982.         CCSSP.ShowObject( this.ele, true);
  1983. }
  1984.  
  1985. CAgencyRevealTrans.prototype.EndEffect = function()
  1986. {
  1987.     if( typeof( this.ele.filters.RevealTrans ) == "object" )
  1988.         this.ele.filters.RevealTrans.stop();  
  1989.     this.ele.style.filter = "";
  1990. }
  1991. // End of the CAgencyRevealTrans definition
  1992.  
  1993. // Begin of CAgencyBlur definition
  1994. function CAgencyBlur( element, settings )
  1995. {// because of "visual filter" style, this won't work in Navigator
  1996.     this.ele = element;
  1997.  
  1998.     // to set the default value
  1999.     this.strength = "5";
  2000.     this.direction = "90";
  2001.     
  2002.     var arrAllSet = settings.split(",");
  2003.     for( var i = 0; i < arrAllSet.length; i ++ )
  2004.     {
  2005.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  2006.         var arrOneSet = arrAllSet[i].split("=");
  2007.         for( var j = 0; j < arrOneSet.length; j++ )
  2008.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  2009.         switch( arrOneSet[0] )
  2010.         {
  2011.         case "strength" : this.strength = arrOneSet[1]; break;
  2012.         case "direction" : this.direction = arrOneSet[1]; break;
  2013.         }
  2014.     }
  2015. }
  2016.  
  2017. CAgencyBlur.prototype.PrepareEffect = function()
  2018. {
  2019.     CCSSP.PrepareFilter(this.ele);
  2020.     CCSSP.ShowObject(this.ele, true );
  2021. }
  2022.  
  2023. CAgencyBlur.prototype.UpdateEffect = function()
  2024. {// to set the visual filter function
  2025.     CCSSP.PrepareFilter(this.ele);
  2026.     this.ele.style.filter = "blur(strength=" + this.strength + 
  2027.         ", direction=" + this.direction + ")";
  2028. }
  2029.  
  2030. CAgencyBlur.prototype.EndEffect = function()
  2031. {// to remove the visual filter function
  2032.     this.ele.style.filter = "";
  2033. }
  2034. // End of the CAgencyBlur definition
  2035.  
  2036. // Begin of CAgencyChangeFilter definition
  2037. function CAgencyChangeFilter( element, settings ) // flipH, flipV, invert, grey,
  2038. {// because of "visual filter" style, this won't work in Navigator
  2039.     this.ele = element;
  2040.  
  2041.     // to set the default value
  2042.     this.filterFunction = settings;
  2043. }
  2044.  
  2045. CAgencyChangeFilter.prototype.PrepareEffect = function()
  2046. {
  2047.     CCSSP.PrepareFilter(this.ele);
  2048.     CCSSP.ShowObject(this.ele, true );
  2049. }
  2050.  
  2051. CAgencyChangeFilter.prototype.UpdateEffect = function()
  2052. {// to set the visual filter function
  2053.     CCSSP.PrepareFilter(this.ele);
  2054.     this.ele.style.filter = this.filterFunction;
  2055. }
  2056.  
  2057. CAgencyChangeFilter.prototype.EndEffect = function()
  2058. {// to remove the visual filter function
  2059.     this.ele.style.filter = "";
  2060. }
  2061. // End of the CAgencyChangeFilter definition
  2062.  
  2063. // The effects below change the style on the fly, so they won't work in Navigator
  2064.  
  2065. // Begin of CAgencyFontChange definition, 
  2066. function CAgencyFontChange( element, settings )
  2067. {//this class can be replace by CAgencyChangeStyle,provided the "settings" is standard CSS string.
  2068.     this.ele = element;
  2069.     
  2070.     // to retrieve the original font style
  2071.     this.RetrieveOldFont( this.ele );
  2072.     
  2073.     // to set the default font to change
  2074.     this.newfontFamily = this.ele.oldFontFamily;
  2075.     this.newfColor = this.ele.oldColor;
  2076.     this.newtextDecoration = this.ele.oldTextDecoration;
  2077.     this.newfontWeight = this.ele.oldFontWeight;
  2078.     this.newfontStyle = this.ele.oldFontStyle;
  2079.     this.newfontSize = this.ele.oldFontSize;
  2080.     this.newBackgroundColor = this.ele.oldBackgroundColor;
  2081.     
  2082.     var arrAllSet = settings.split(",");
  2083.     for( var i = 0; i < arrAllSet.length; i ++ )
  2084.     {// to retrieve the setting
  2085.         arrAllSet[i] = CCSSP.TrimSpace(arrAllSet[i]);
  2086.         var arrOneSet = arrAllSet[i].split("=");
  2087.         for( var j = 0; j < arrOneSet.length; j++ )
  2088.             arrOneSet[j] = CCSSP.TrimSpace(arrOneSet[j]);
  2089.         switch( arrOneSet[0] )
  2090.         {
  2091.         case "font-family" : this.newfontFamily = arrOneSet[1]; break;
  2092.         case "color" : this.newfColor = arrOneSet[1]; break;
  2093.         case "underline" : this.newtextDecoration = (arrOneSet[1]=="on")? "underline" : "none"; break;
  2094.         case "bold" : this.newfontWeight = (arrOneSet[1]=="on")? "bold" : "normal"; break;
  2095.         case "italic" : this.newfontStyle = (arrOneSet[1]=="on")? "italic" : "normal"; break;
  2096.         case "size" : this.newfontSize = arrOneSet[1]; break;
  2097.         case "background-color" : this.newBackgroundColor = arrOneSet[1]; break;
  2098.         }
  2099.     }
  2100. }
  2101.  
  2102. CAgencyFontChange.prototype.RetrieveOldFont = function(objChild)
  2103. {
  2104.     if( typeof(objChild.oldFontFamily) == "undefined" )
  2105.         objChild.oldFontFamily = objChild.style.fontFamily;
  2106.     if( typeof(objChild.oldColor) == "undefined" )
  2107.         objChild.oldColor = objChild.style.color;
  2108.     if( typeof(objChild.oldTextDecoration) == "undefined" )
  2109.         objChild.oldTextDecoration = objChild.style.textDecoration;
  2110.     if( typeof(objChild.oldFontWeight) == "undefined" )
  2111.         objChild.oldFontWeight = objChild.style.fontWeight;
  2112.     if( typeof(objChild.oldFontStyle) == "undefined" )
  2113.         objChild.oldFontStyle = objChild.style.fontStyle;
  2114.     if( typeof(objChild.oldFontSize) == "undefined" )
  2115.         objChild.oldFontSize = objChild.style.fontSize;
  2116.     if( typeof(objChild.oldBackgroundColor) == "undefined" )
  2117.         objChild.oldBackgroundColor = objChild.style.backgroundColor;
  2118. }
  2119.  
  2120. CAgencyFontChange.prototype.PrepareEffect = function()
  2121. {
  2122.     // as for expanding text, the child is created after the constructor called
  2123.     for(var index = 0; index < this.ele.all.length; index++)
  2124.         this.RetrieveOldFont(this.ele.all[index]);
  2125.     CCSSP.ShowObject(this.ele, true );
  2126. }
  2127.  
  2128. CAgencyFontChange.prototype.UpdateEffect = function()
  2129. {// to change the font
  2130.     this.PrepareEffect();
  2131.     this.UpdateEffectAllChildren( this.ele );
  2132.     for( var index = 0; index < this.ele.all.length; index++)
  2133.         this.UpdateEffectAllChildren(this.ele.all[index]);
  2134. }
  2135.  
  2136. CAgencyFontChange.prototype.UpdateEffectAllChildren = function(objChild)
  2137. {
  2138.     objChild.style.fontFamily = this.newfontFamily;
  2139.     objChild.style.color = this.newfColor;
  2140.     objChild.style.textDecoration = this.newtextDecoration;
  2141.     objChild.style.fontWeight = this.newfontWeight;
  2142.     objChild.style.fontStyle = this.newfontStyle;
  2143.     objChild.style.fontSize = this.newfontSize;
  2144.     objChild.style.backgroundColor = this.newBackgroundColor;
  2145. }
  2146.  
  2147. CAgencyFontChange.prototype.EndEffect = function()
  2148. {// to reinstate the original font style
  2149.     this.EndEffectAllChildren( this.ele );
  2150.     for( var index = 0; index < this.ele.all.length; index++)
  2151.         this.EndEffectAllChildren(this.ele.all[index]);
  2152. }
  2153.  
  2154. CAgencyFontChange.prototype.EndEffectAllChildren = function( objChild )
  2155. {
  2156.     if( typeof(objChild.oldFontFamily) != "undefined" )
  2157.         objChild.style.fontFamily = objChild.oldFontFamily;
  2158.     if( typeof(objChild.oldColor) != "undefined" )
  2159.         objChild.style.color = objChild.oldColor;
  2160.     if( typeof(objChild.oldFontWeight) != "undefined" )
  2161.         objChild.style.fontWeight = objChild.oldFontWeight;
  2162.     if( typeof(objChild.oldFontStyle) != "undefined" )
  2163.         objChild.style.fontStyle = objChild.oldFontStyle;
  2164.     if( typeof(objChild.oldFontSize) != "undefined" )
  2165.         objChild.style.fontSize = objChild.oldFontSize;
  2166.     if( typeof(objChild.oldTextDecoration) != "undefined" )
  2167.         objChild.style.textDecoration = objChild.oldTextDecoration;
  2168.     if( typeof(objChild.oldBackgroundColor) != "undefined" )
  2169.         objChild.style.backgroundColor = objChild.oldBackgroundColor;
  2170. }
  2171. // End of the CAgencyFontChange definition
  2172.  
  2173. // Begin of the CAgencyChangeStyle definition
  2174. function CAgencyChangeStyle( element, settings )
  2175. {//this class can be replace by CAgencyChangeStyle,provided the "settings" is standard CSS string.
  2176.     this.ele = element;
  2177.     
  2178.     // to retrieve the original style
  2179.     this.oldstyle = this.ele.style.cssText;
  2180.     
  2181.     // to set the default style
  2182.     this.newStyle = this.oldstyle;
  2183.     
  2184.     if( typeof(settings) == "string" && settings.length > 1 )
  2185.         this.newStyle = this.oldstyle + " " + settings;
  2186. }
  2187.  
  2188. CAgencyChangeStyle.prototype.PrepareEffect = function()
  2189. {
  2190.     CCSSP.ShowObject(this.ele, true );
  2191. }
  2192.  
  2193. CAgencyChangeStyle.prototype.UpdateEffect = function()
  2194. {// to change the style
  2195.     this.ele.style.cssText = this.newStyle;
  2196. }
  2197.  
  2198. CAgencyChangeStyle.prototype.EndEffect = function()
  2199. {// to reinstate the original style
  2200.     this.ele.style.cssText = this.oldStyle;
  2201. }
  2202. // End of the CAgencyChangeStyle definition
  2203.  
  2204. //End the definition of CAgencyXXXX classes
  2205.  
  2206. //Begin to collaborate with other event handler settings 
  2207. CCSSP.RegisterEventHandler( window, "onload", "CEngine.OnPageLoad();BSSCOnLoad();kadovInitTriggersInHead();");
  2208. CCSSP.RegisterEventHandler( document, "onclick", "CEngine.OnPageClick();BSSCOnClick();");
  2209. CCSSP.RegisterEventHandler( document, "onmouseover", "CEngine.OnMouseOver();BSSCOnMouseOver();" );
  2210. CCSSP.RegisterEventHandler( document, "onmouseout", "CEngine.OnMouseOver();BSSCOnMouseOut();" );
  2211. CCSSP.RegisterEventHandler( window, "onunload", "BSSCOnUnload();");
  2212. //End to collaborate with other event handler settings
  2213.  
  2214.  
  2215. /// Section End  - CCSSP DHTM 2 (JavaScript 1.2)
  2216.  
  2217. //// Segment End -- (JavaScript 1.2)
  2218.