home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 January / 01_02.iso / software / jukeboxwin / MUSICMATCH_7000135.exe / data1.cab / HTML_HELP / bsscdht1.js < prev    next >
Encoding:
JavaScript  |  2001-11-13  |  31.3 KB  |  905 lines

  1. //////////BSSCDHTML Section 1//////////
  2. // RoboHELP« Dynamic HTML Effects Script
  3. // Copyright ⌐ 1998-2000 eHelp Corporation.  All rights reserved.
  4.  
  5. // Version=3.56
  6.  
  7. // Warning:  Do not modify this file.  It is generated by RoboHELP« and changes will be overwritten.
  8.  
  9. //{{HH_SYMBOL_SECTION
  10. var HH_ChmFilename = "";
  11. var HH_WindowName = "";
  12. var HH_GlossaryFont = "";
  13. var HH_Glossary = "";
  14. var HH_Avenue = "";
  15. var HH_ActiveX = false;
  16. //}}HH_SYMBOL_SECTION
  17.  
  18. var gbNav4 = false;
  19. var gbIE4 = false;
  20. var gbIE = false;
  21. var gbIE5 = false;
  22. var gbIE55 = false;
  23. var gAgent = navigator.userAgent.toLowerCase(); 
  24. var gbMac = (gAgent.indexOf("mac") != -1);
  25. var gbWindows = ((gAgent.indexOf("win") != -1) || (gAgent.indexOf("16bit") != -1));
  26.  
  27. var error_count = 0;
  28.  
  29. gbIE = (navigator.appName.indexOf("Microsoft") != -1);
  30. if (parseInt(navigator.appVersion) >= 4) {
  31.     gbNav4 = (navigator.appName == "Netscape");
  32.     gbIE4 = (navigator.appName.indexOf("Microsoft") != -1);
  33.  
  34.     if (gbIE4) {
  35.         if (gAgent.indexOf("msie 5.0") != -1) {
  36.             gbIE5 = true;
  37.         }
  38.         if (gAgent.indexOf("msie 5.5") != -1) { // curently IE 5.5 has some buggy stuff. we need do some remedy to our code.
  39.             gbIE55 = true;
  40.         }
  41.     }
  42. }
  43.  
  44. function HHActivateComponents()
  45. {
  46.     if (HH_ActiveX && (HH_ChmFilename != "") && ((self == top) || (self == top.frames[0])))
  47.     {
  48.         var objBody = document.all.tags("BODY")[0];
  49.         if( typeof(objBody) == "object" )
  50.         {
  51.             objBody.insertAdjacentHTML("beforeEnd", '<OBJECT ID="HHComponentActivator" CLASSID="CLSID:399CB6C4-7312-11D2-B4D9-00105A0422DF" width=0 height=0></OBJECT>');
  52.             if (HHComponentActivator.object)
  53.             {
  54.                 HHComponentActivator.Activate(HH_ChmFilename, HH_WindowName, HH_GlossaryFont, HH_Glossary, HH_Avenue);
  55.             }
  56.         }
  57.     }
  58. }
  59.  
  60. var gAmc = new Array();
  61. var BSSCSequenceIndex = 0;
  62.  
  63. function animationContext(el, progressAnimation, finishAnimiation, animationDuration, animationPeriod)
  64. {
  65.     this.el = el;
  66.     this.progressAnimation = progressAnimation;
  67.     this.finishAnimiation = finishAnimiation;
  68.     this.animationDuration = parseFloat(animationDuration);
  69.     this.animationPeriod = animationPeriod;
  70.     this.animationStartTime = (new Date()).getTime();
  71.     this.continueAnimation = true;
  72. }
  73.  
  74. function progressFade(ndx)
  75. {
  76.     if( typeof( gAmc[ndx].el.filters.alpha ) != "object" )
  77.         return;
  78.     
  79.     percent = ((new Date()).getTime() - gAmc[ndx].animationStartTime)/gAmc[ndx].animationDuration;
  80.     if (percent > 1.0){
  81.         percent = 1.0;
  82.         gAmc[ndx].continueAnimation = false;
  83.     }
  84.     gAmc[ndx].el.filters.alpha.opacity = gAmc[ndx].initialOpacity*(1.0-percent) +  gAmc[ndx].finalOpacity*percent;
  85.     
  86. }
  87.  
  88. function finishFade(ndx)
  89. {
  90.     if( typeof( gAmc[ndx].el.filters.alpha ) == "object" )
  91.         gAmc[ndx].el.filters.alpha.opacity = parseInt(gAmc[ndx].finalOpacity);
  92. }
  93.  
  94. function progressTranslation(ndx)
  95. {
  96.     percent = ((new Date()).getTime() - gAmc[ndx].animationStartTime)/gAmc[ndx].animationDuration;
  97.     if (percent > 1.0)    {
  98.         percent = 1.0;
  99.         gAmc[ndx].continueAnimation = false;
  100.     }
  101.     gAmc[ndx].el.style.pixelLeft = gAmc[ndx].startX*(1.0-percent) +  gAmc[ndx].finalX*percent;
  102.     gAmc[ndx].el.style.pixelTop = gAmc[ndx].startY*(1.0-percent) +  gAmc[ndx].finalY*percent;
  103. }
  104. function progressSpiral(ndx)
  105. {
  106.     percent = ((new Date()).getTime() - gAmc[ndx].animationStartTime)/gAmc[ndx].animationDuration;
  107.     if (percent > 1.0)    {
  108.         percent = 1.0;
  109.         gAmc[ndx].continueAnimation = false;
  110.     }
  111.     rf = 1.0 - percent
  112.     t = percent * 2.0*Math.PI
  113.     rx = Math.max(Math.abs(gAmc[ndx].el.initLeft), 200)
  114.     ry = Math.max(Math.abs(gAmc[ndx].el.initTop),  200)
  115.     gAmc[ndx].el.style.pixelLeft = Math.ceil(-rf*Math.cos(t)*rx)
  116.     gAmc[ndx].el.style.pixelTop  = Math.ceil(-rf*Math.sin(t)*ry)
  117.     gAmc[ndx].el.style.visibility="visible"    
  118. }
  119.  
  120. function progressElasticFromRight(ndx)
  121. {
  122.     percent = ((new Date()).getTime() - gAmc[ndx].animationStartTime)/gAmc[ndx].animationDuration;
  123.     if (percent > 1.0)    {
  124.         percent = 1.0;
  125.         gAmc[ndx].continueAnimation = false;
  126.     }
  127.     rf=Math.exp(-percent*7)
  128.     t = percent * 1.5*Math.PI
  129.     rx =Math.abs(gAmc[ndx].el.initLeft)
  130.     gAmc[ndx].el.style.pixelLeft = rf*Math.cos(t)*rx
  131.     gAmc[ndx].el.style.pixelTop = 0
  132.     gAmc[ndx].el.style.visibility="visible"    
  133. }
  134. function progressElasticFromBottom(ndx)
  135. {
  136.     percent = ((new Date()).getTime() - gAmc[ndx].animationStartTime)/gAmc[ndx].animationDuration;
  137.     if (percent > 1.0)    {
  138.         percent = 1.0;
  139.         gAmc[ndx].continueAnimation = false;
  140.     }
  141.     rf=Math.exp(-percent*7)
  142.     t = percent * 1.5*Math.PI
  143.     rx =Math.abs(gAmc[ndx].el.initTop)
  144.     gAmc[ndx].el.style.pixelLeft = 0
  145.     gAmc[ndx].el.style.pixelTop = rf*Math.cos(t)*rx
  146.     gAmc[ndx].el.style.visibility="visible"    
  147. }
  148.  
  149. function progressZoomIn(ndx)
  150. {
  151.     percent = ((new Date()).getTime() - gAmc[ndx].animationStartTime)/gAmc[ndx].animationDuration;
  152.     if (percent > 1.0)    {
  153.         percent = 1;
  154.         gAmc[ndx].continueAnimation = false;
  155.     }
  156.     for (var index=0; index<gAmc[ndx].el.all.length; index++) {
  157.         gAmc[ndx].el.all[index].style.fontSize = Math.ceil(50+50*percent) + "%"
  158.     }
  159.     gAmc[ndx].el.posLeft = 100
  160.     gAmc[ndx].el.style.visibility="visible"
  161.  
  162.     if (percent >= 1.0)    {
  163.         finishZoom(ndx);
  164.     }
  165. }
  166.  
  167. function progressZoomOut(ndx)
  168. {
  169.     percent = ((new Date()).getTime() - gAmc[ndx].animationStartTime)/gAmc[ndx].animationDuration;
  170.     if (percent > 1.0)    {
  171.         percent = 1.0;
  172.         gAmc[ndx].continueAnimation = false;
  173.     }
  174.  
  175.     for (var index=0; index<gAmc[ndx].el.all.length; index++)
  176.         gAmc[ndx].el.all[index].style.fontSize = Math.ceil(100+200*(1-percent)) + "%"
  177.     gAmc[ndx].el.posLeft = 0
  178.     gAmc[ndx].el.style.visibility="visible"
  179.  
  180.     if (percent >= 1.0)    {
  181.         finishZoom(ndx);
  182.     }
  183. }
  184. function finishTranslation(ndx)
  185. {
  186.     gAmc[ndx].el.style.pixelLeft = parseInt(gAmc[ndx].finalX);
  187.     gAmc[ndx].el.style.pixelTop = parseInt(gAmc[ndx].finalY);
  188. }
  189. function finishZoom(ndx)
  190. {
  191.     for (i=0; i<gAmc[ndx].el.all.length; i++)
  192.         gAmc[ndx].el.all[i].style.fontSize = gAmc[ndx].OldFont
  193.  
  194.  
  195. function animationPump(ndx)
  196. {
  197.     gAmc[ndx].progressAnimation(ndx);
  198.     if (gAmc[ndx].continueAnimation)
  199.         gAmc[ndx].tm = setTimeout("animationPump(" + ndx + ");", gAmc[ndx].animationPeriod);
  200. }
  201.  
  202. function clearAnimations()
  203. {
  204.     for (var index=0; index<gAmc.length; index++) {
  205.         gAmc[index].finishAnimiation(index);
  206.         clearTimeout(gAmc[index].tm);
  207.     }
  208.     gAmc = new Array();
  209. }
  210.  
  211. function startNextAnimationSet()
  212. {
  213.     clearAnimations();
  214.     bStarted = false;
  215.     bFound = false
  216.  
  217.     // Determine the next sequence number
  218.     divElements = document.all.tags("DIV");
  219.     for (var index = 0; index < divElements.length; index++) 
  220.     {
  221.         el = divElements[index];
  222.         objectOrder = el.getAttribute("BSSCObjectOrder", false);
  223.         if(null != objectOrder)
  224.         {
  225.             objectOrder = parseInt(objectOrder);
  226.             if (objectOrder > BSSCSequenceIndex && (!bFound || objectOrder < minBSSCSequenceIndexFound))
  227.             {
  228.                 minBSSCSequenceIndexFound = objectOrder;
  229.                 bFound = true;
  230.             }
  231.         }
  232.     }
  233.  
  234.     if (bFound)
  235.     {
  236.         BSSCSequenceIndex = minBSSCSequenceIndexFound;
  237.         bStarted = startAnimationSet(BSSCSequenceIndex);
  238.     }
  239. }
  240.  
  241. function getOffsetFromTopOfBrowser(el)
  242. {
  243.     if (null == el.offsetParent)
  244.         return el.offsetTop;
  245.     else
  246.         return el.offsetTop + getOffsetFromTopOfBrowser(el.offsetParent);
  247. }
  248.  
  249. function startAnimationSet(ndx)
  250. {
  251.     var m = 0;
  252.     bStarted = false;
  253.  
  254.     // Find document elements with "BSSCAnimationType" attribute
  255.     divElements = document.all.tags("DIV");
  256.     for (var index = 0; index < divElements.length; index++)
  257.     {
  258.         el = divElements[index];
  259.         
  260.         animationType = el.getAttribute("BSSCAnimationType", false);
  261.         if(null != animationType)
  262.         {
  263.             framePeriod = el.getAttribute("BSSCFramePeriod", false);
  264.             frameCount = el.getAttribute("BSSCFrameCount", false);
  265.             sequenceIndex = el.getAttribute("BSSCObjectOrder", false);
  266.  
  267.             // Stop any currently running RevealTrans filters
  268.             if ("RevealTrans" == animationType && parseInt(sequenceIndex) == ndx-1 && gbWindows)
  269.                 el.filters.RevealTrans.stop();  
  270.             // Filter on ndx
  271.             if (0 == ndx && null == sequenceIndex ||
  272.                 ndx == parseInt(sequenceIndex))
  273.             {
  274.                 if ("FlyInFromRight" == animationType)
  275.                 {
  276.                     animationDuration = el.getAttribute("BSSCDuration", false);
  277.                     if (null == animationDuration)
  278.                         animationDuration = 1000; // default to 1s
  279.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  280.                     gAmc[m].startX = document.body.clientWidth + document.body.scrollLeft;
  281.                     gAmc[m].startY = 0;
  282.                     gAmc[m].finalX = 0;
  283.                     gAmc[m].finalY = 0;
  284.                     animationPump(m++);
  285.                     bStarted = true;
  286.                 }
  287.                 if ("FlyOutToRight" == animationType)
  288.                 {
  289.                     animationDuration = el.getAttribute("BSSCDuration", false);
  290.                     if (null == animationDuration)
  291.                         animationDuration = 1000; // default to 1s
  292.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  293.                     gAmc[m].startX = 0;
  294.                     gAmc[m].startY = 0;
  295.                     gAmc[m].finalX = document.body.clientWidth + document.body.scrollWidth;
  296.                     gAmc[m].finalY = 0;
  297.                     animationPump(m++);
  298.                     bStarted = true;
  299.                 }
  300.                 if ("FlyInFromLeft" == animationType)
  301.                 {
  302.                     animationDuration = el.getAttribute("BSSCDuration", false);
  303.                     if (null == animationDuration)
  304.                         animationDuration = 1000; // default to 1s
  305.                     for (childIndex=0; childIndex<el.children.length; childIndex++)
  306.                     {
  307.                         if ("left" == el.children[childIndex].style.textAlign)
  308.                             el.children[childIndex].style.textAlign = "right";
  309.                     }
  310.                     pixelsToTranslate = document.body.clientWidth;
  311.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  312.                     gAmc[m].startX = -(document.body.clientWidth + document.body.scrollLeft);
  313.                     gAmc[m].startY = 0;
  314.                     gAmc[m].finalX = 0;
  315.                     gAmc[m].finalY = 0;
  316.                     animationPump(m++);
  317.                     bStarted = true;
  318.                 }
  319.                 if ("FlyOutToLeft" == animationType)
  320.                 {
  321.                     animationDuration = el.getAttribute("BSSCDuration", false);
  322.                     if (null == animationDuration)
  323.                         animationDuration = 1000; // default to 1s
  324.                     for (childIndex=0; childIndex<el.children.length; childIndex++)
  325.                     {
  326.                         if ("left" == el.children[childIndex].style.textAlign)
  327.                             el.children[childIndex].style.textAlign = "right";
  328.                     }
  329.                     pixelsToTranslate = document.body.clientWidth;
  330.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  331.                     gAmc[m].startX = 0;
  332.                     gAmc[m].startY = 0;
  333.                     gAmc[m].finalX = -(document.body.clientWidth + document.body.scrollWidth);
  334.                     gAmc[m].finalY = 0;
  335.                     animationPump(m++);
  336.                     bStarted = true;
  337.                 }
  338.                 if ("FlyInFromBottom" == animationType)
  339.                 {
  340.                     animationDuration = el.getAttribute("BSSCDuration", false);
  341.                     if (null == animationDuration)
  342.                         animationDuration = 1000; // default to 1s
  343.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  344.                     gAmc[m].startX = 0;
  345.                     gAmc[m].startY = document.body.clientHeight + document.body.scrollTop;
  346.                     gAmc[m].finalX = 0;
  347.                     gAmc[m].finalY = 0;
  348.                     animationPump(m++);
  349.                     bStarted = true;
  350.                 }
  351.                 if ("FlyOutToBottom" == animationType)
  352.                 {
  353.                     animationDuration = el.getAttribute("BSSCDuration", false);
  354.                     if (null == animationDuration)
  355.                         animationDuration = 1000; // default to 1s
  356.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  357.                     gAmc[m].startX = 0;
  358.                     gAmc[m].startY = 0;
  359.                     gAmc[m].finalX = 0;
  360.                     gAmc[m].finalY = document.body.clientHeight + document.body.scrollHeight;
  361.                     animationPump(m++);
  362.                     bStarted = true;
  363.                 }
  364.                 if ("FlyInFromTop" == animationType)
  365.                 {
  366.                     animationDuration = el.getAttribute("BSSCDuration", false);
  367.                     if (null == animationDuration)
  368.                         animationDuration = 1000; // default to 1s
  369.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  370.                     gAmc[m].startX = 0;
  371.                     gAmc[m].startY = -getOffsetFromTopOfBrowser(el) - el.offsetHeight;
  372.                     gAmc[m].finalX = 0;
  373.                     gAmc[m].finalY = 0;
  374.                     animationPump(m++);
  375.                     bStarted = true;
  376.                 }
  377.                 if ("FlyOutToTop" == animationType)
  378.                 {
  379.                     animationDuration = el.getAttribute("BSSCDuration", false);
  380.                     if (null == animationDuration)
  381.                         animationDuration = 1000; // default to 1s
  382.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  383.                     gAmc[m].startX = 0;
  384.                     gAmc[m].startY = 0;
  385.                     gAmc[m].finalX = 0;
  386.                     gAmc[m].finalY = -getOffsetFromTopOfBrowser(el) - el.offsetHeight;
  387.                     animationPump(m++);
  388.                     bStarted = true;
  389.                 }
  390.                 if ("FlyInFromBottomRight" == animationType)
  391.                 {
  392.                     animationDuration = el.getAttribute("BSSCDuration", false);
  393.                     if (null == animationDuration)
  394.                         animationDuration = 1000; // default to 1s
  395.                     pixelsToTranslate = document.body.clientWidth + document.body.scrollLeft;
  396.                     if (document.body.clientHeight + document.body.scrollTop - el.offsetTop < pixelsToTranslate)
  397.                         pixelsToTranslate = document.body.clientHeight + document.body.scrollTop - el.offsetTop;
  398.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  399.                     gAmc[m].startX = pixelsToTranslate;
  400.                     gAmc[m].startY = pixelsToTranslate;
  401.                     gAmc[m].finalX = 0;
  402.                     gAmc[m].finalY = 0;
  403.                     animationPump(m++);
  404.                     bStarted = true;
  405.                 }
  406.                 if ("FlyOutToBottomRight" == animationType)
  407.                 {
  408.                     animationDuration = el.getAttribute("BSSCDuration", false);
  409.                     if (null == animationDuration)
  410.                         animationDuration = 1000; // default to 1s
  411.                     pixelsToTranslate = document.body.clientWidth + document.body.scrollLeft;
  412.                     if (document.body.clientHeight + document.body.scrollTop - el.offsetTop < pixelsToTranslate)
  413.                         pixelsToTranslate = document.body.clientHeight +document.body.scrollTop - el.offsetTop;
  414.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  415.                     gAmc[m].startX = 0;
  416.                     gAmc[m].startY = 0;
  417.                     gAmc[m].finalX = pixelsToTranslate;
  418.                     gAmc[m].finalY = pixelsToTranslate;
  419.                     animationPump(m++);
  420.                     bStarted = true;
  421.                 }
  422.                 if ("FlyInFromTopRight" == animationType)
  423.                 {
  424.                     animationDuration = el.getAttribute("BSSCDuration", false);
  425.                     if (null == animationDuration)
  426.                         animationDuration = 1000; // default to 1s
  427.                     pixelsToTranslate = document.body.clientWidth;
  428.                     offsetFromTopOfBrowser = getOffsetFromTopOfBrowser(el);
  429.                     if (offsetFromTopOfBrowser + el.offsetHeight < pixelsToTranslate)
  430.                         pixelsToTranslate = offsetFromTopOfBrowser + el.offsetHeight;
  431.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  432.                     gAmc[m].startX = pixelsToTranslate;
  433.                     gAmc[m].startY = -pixelsToTranslate;
  434.                     gAmc[m].finalX = 0;
  435.                     gAmc[m].finalY = 0;
  436.                     animationPump(m++);
  437.                     bStarted = true;
  438.                 }
  439.                 if ("FlyOutToTopRight" == animationType)
  440.                 {
  441.                     animationDuration = el.getAttribute("BSSCDuration", false);
  442.                     if (null == animationDuration)
  443.                         animationDuration = 1000; // default to 1s
  444.                     pixelsToTranslate = document.body.clientWidth;
  445.                     offsetFromTopOfBrowser = getOffsetFromTopOfBrowser(el);
  446.                     if (offsetFromTopOfBrowser + el.offsetHeight < pixelsToTranslate)
  447.                         pixelsToTranslate = offsetFromTopOfBrowser + el.offsetHeight;
  448.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  449.                     gAmc[m].startX = 0;
  450.                     gAmc[m].startY = 0;
  451.                     gAmc[m].finalX = pixelsToTranslate;
  452.                     gAmc[m].finalY = -pixelsToTranslate;
  453.                     animationPump(m++);
  454.                     bStarted = true;
  455.                 }
  456.                 if ("FlyInFromTopLeft" == animationType)
  457.                 {
  458.                     animationDuration = el.getAttribute("BSSCDuration", false);
  459.                     if (null == animationDuration)
  460.                         animationDuration = 1000; // default to 1s
  461.                     for (childIndex=0; childIndex<el.children.length; childIndex++)
  462.                     {
  463.                         if ("left" == el.children[childIndex].style.textAlign)
  464.                             el.children[childIndex].style.textAlign = "right";
  465.                     }
  466.                     pixelsToTranslate = document.body.clientWidth + document.body.scrollLeft;
  467.                     offsetFromTopOfBrowser = getOffsetFromTopOfBrowser(el);
  468.                     if (offsetFromTopOfBrowser + el.offsetHeight < pixelsToTranslate)
  469.                         pixelsToTranslate = offsetFromTopOfBrowser + el.offsetHeight;
  470.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  471.                     gAmc[m].startX = -pixelsToTranslate;
  472.                     gAmc[m].startY = -pixelsToTranslate;
  473.                     gAmc[m].finalX = 0;
  474.                     gAmc[m].finalY = 0;
  475.                     animationPump(m++);
  476.                     bStarted = true;
  477.                 }
  478.                 if ("FlyOutToTopLeft" == animationType)
  479.                 {
  480.                     animationDuration = el.getAttribute("BSSCDuration", false);
  481.                     if (null == animationDuration)
  482.                         animationDuration = 1000; // default to 1s
  483.                     for (childIndex=0; childIndex<el.children.length; childIndex++)
  484.                     {
  485.                         if ("left" == el.children[childIndex].style.textAlign)
  486.                             el.children[childIndex].style.textAlign = "right";
  487.                     }
  488.                     pixelsToTranslate = document.body.clientWidth + document.body.scrollLeft;
  489.                     offsetFromTopOfBrowser = getOffsetFromTopOfBrowser(el);
  490.                     if (offsetFromTopOfBrowser + el.offsetHeight < pixelsToTranslate)
  491.                         pixelsToTranslate = offsetFromTopOfBrowser + el.offsetHeight;
  492.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  493.                     gAmc[m].startX = 0;
  494.                     gAmc[m].startY = 0;
  495.                     gAmc[m].finalX = -pixelsToTranslate;
  496.                     gAmc[m].finalY = -pixelsToTranslate;
  497.                     animationPump(m++);
  498.                     bStarted = true;
  499.                 }
  500.                 if ("FlyInFromBottomLeft" == animationType)
  501.                 {
  502.                     animationDuration = el.getAttribute("BSSCDuration", false);
  503.                     if (null == animationDuration)
  504.                         animationDuration = 1000; // default to 1s
  505.                     for (childIndex=0; childIndex<el.children.length; childIndex++)
  506.                     {
  507.                         if ("left" == el.children[childIndex].style.textAlign)
  508.                             el.children[childIndex].style.textAlign = "right";
  509.                     }
  510.                     pixelsToTranslate = document.body.clientWidth + document.body.scrollLeft;
  511.                     if (document.body.clientHeight + document.body.scrollTop - el.offsetTop < pixelsToTranslate)
  512.                         pixelsToTranslate = document.body.clientHeight + document.body.scrollTop - el.offsetTop;
  513.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  514.                     gAmc[m].startX = -pixelsToTranslate;
  515.                     gAmc[m].startY = pixelsToTranslate;
  516.                     gAmc[m].finalX = 0;
  517.                     gAmc[m].finalY = 0;
  518.                     animationPump(m++);
  519.                     bStarted = true;
  520.                 }
  521.                 if ("FlyOutToBottomLeft" == animationType)
  522.                 {
  523.                     animationDuration = el.getAttribute("BSSCDuration", false);
  524.                     if (null == animationDuration)
  525.                         animationDuration = 1000; // default to 1s
  526.                     for (childIndex=0; childIndex<el.children.length; childIndex++)
  527.                     {
  528.                         if ("left" == el.children[childIndex].style.textAlign)
  529.                             el.children[childIndex].style.textAlign = "right";
  530.                     }
  531.                     pixelsToTranslate = document.body.clientWidth + document.body.scrollLeft;
  532.                     if (document.body.clientHeight + document.body.scrollTop - el.offsetTop < pixelsToTranslate)
  533.                         pixelsToTranslate = document.body.clientHeight +document.body.scrollTop - el.offsetTop;
  534.                     gAmc[m] = new animationContext(el, progressTranslation, finishTranslation, animationDuration, 10);
  535.                     gAmc[m].startX = 0;
  536.                     gAmc[m].startY = 0;
  537.                     gAmc[m].finalX = -pixelsToTranslate;
  538.                     gAmc[m].finalY = pixelsToTranslate;
  539.                     animationPump(m++);
  540.                     bStarted = true;
  541.                 }
  542.                 if ("FadeIn" == animationType)
  543.                 {
  544.                     if (gbWindows)
  545.                     {
  546.                         animationDuration = el.getAttribute("BSSCDuration", false);
  547.                         if (null == animationDuration)
  548.                             animationDuration = 1000; // default to 1s
  549.                         finalOpacity = el.getAttribute("BSSCFinalOpacity", false);
  550.                         if (null == finalOpacity)
  551.                             finalOpacity = 100;
  552.                         initialOpacity = el.getAttribute("BSSCInitialOpacity", false);
  553.                         if (null == initialOpacity)
  554.                             initialOpacity = 0;
  555.                         gAmc[m] = new animationContext(el, progressFade, finishFade, animationDuration, 50);
  556.                         el.filters.opacity = initialOpacity;
  557.                         gAmc[m].initialOpacity = initialOpacity;
  558.                         gAmc[m].finalOpacity = finalOpacity;
  559.                         animationPump(m++);
  560.                         bStarted = true;
  561.                     } else {
  562.                         el.style.visibility = "";
  563.                     }
  564.                 }
  565.                 if ("Spiral" == animationType)
  566.                 {
  567.                     animationDuration = el.getAttribute("BSSCDuration", false);
  568.                     if (null == animationDuration)
  569.                         animationDuration = 1000; // default to 1s
  570.  
  571.                     gAmc[m] = new animationContext(el, progressSpiral, finishTranslation, animationDuration, 10);
  572.                     gAmc[m].el.initLeft = el.offsetLeft+document.body.clientWidth;
  573.                     gAmc[m].el.initTop = document.body.scrollTop+el.offsetTop+document.body.clientHeight;
  574.                     gAmc[m].el.endLeft = gAmc[m].el.posLeft;
  575.                     gAmc[m].el.endTop  = gAmc[m].el.posTop;
  576.                     gAmc[m].finalX = 0;
  577.                     gAmc[m].finalY = 0;
  578.                     gAmc[m].steps = 0;
  579.                     animationPump(m++);
  580.                     bStarted = true;
  581.                 }
  582.                 if ("ElasticFromRight" == animationType)
  583.                 {
  584.                     animationDuration = el.getAttribute("BSSCDuration", false);
  585.                     if (null == animationDuration)
  586.                         animationDuration = 1000; // default to 1s
  587.                     gAmc[m] = new animationContext(el, progressElasticFromRight, finishTranslation, animationDuration, 10);
  588.                     gAmc[m].el.initLeft = el.offsetLeft+document.body.clientWidth;
  589.                     gAmc[m].el.initTop = gAmc[m].el.posTop;
  590.                     gAmc[m].el.endLeft = gAmc[m].el.posLeft;
  591.                     gAmc[m].el.endTop  = gAmc[m].el.posTop;
  592.                     gAmc[m].finalX = 0;
  593.                     gAmc[m].finalY = 0;
  594.                     gAmc[m].steps = 0;
  595.                     animationPump(m++);
  596.                     bStarted = true;
  597.                 }
  598.                 if ("ElasticFromBottom" == animationType)
  599.                 {
  600.                     animationDuration = el.getAttribute("BSSCDuration", false);
  601.                     if (null == animationDuration)
  602.                         animationDuration = 1000; // default to 1s
  603.                     gAmc[m] = new animationContext(el, progressElasticFromBottom, finishTranslation, animationDuration, 10);
  604.                     gAmc[m].el.initLeft = gAmc[m].el.posLeft;
  605.                     gAmc[m].el.initTop = document.body.scrollTop-el.offsetTop-el.offsetHeight;
  606.                     gAmc[m].el.endLeft = gAmc[m].el.posLeft;
  607.                     gAmc[m].el.endTop  = gAmc[m].el.posTop;
  608.                     gAmc[m].finalX = 0;
  609.                     gAmc[m].finalY = 0;
  610.                     gAmc[m].steps = 0;
  611.                     animationPump(m++);
  612.                     bStarted = true;
  613.                 }
  614.                 if ("ZoomIn" == animationType)
  615.                 {
  616.                     animationDuration = el.getAttribute("BSSCDuration", false);
  617.                     if (null == animationDuration)
  618.                         animationDuration = 1000; // default to 1s
  619.                     gAmc[m] = new animationContext(el, progressZoomIn, finishZoom, animationDuration, 10);
  620.                     gAmc[m].OldFont = gAmc[m].el.all[0].style.fontSize;
  621.                     animationPump(m++);
  622.                     bStarted = true;
  623.                 }
  624.                 if ("ZoomOut" == animationType)
  625.                 {
  626.                     animationDuration = el.getAttribute("BSSCDuration", false);
  627.                     if (null == animationDuration)
  628.                         animationDuration = 1000; // default to 1s
  629.                     gAmc[m] = new animationContext(el, progressZoomOut, finishZoom, animationDuration, 10);
  630.                     gAmc[m].OldFont = gAmc[m].el.all[0].style.fontSize;
  631.                     animationPump(m++);
  632.                     bStarted = true;
  633.                 }
  634.                 if ("RevealTrans" == animationType)
  635.                 {
  636.                     if (gbWindows) {
  637.                         Duration = el.getAttribute("BSSCDuration", false);
  638.                         if (null == Duration)
  639.                             Duration = 1000; // default to 1s
  640.                         Transition = el.getAttribute("BSSCTransition", false);
  641.                         if (null == Transition)
  642.                             Transition = 0;
  643.                         el.style.filter = "RevealTrans();";
  644.                         el.filters.RevealTrans.Transition = Transition;
  645.                         el.filters.RevealTrans.apply();
  646.                         el.style.visibility = ""; 
  647.                         el.filters.RevealTrans.play(parseInt(Duration)/1000.0);  
  648.                         bStarted = true;
  649.                     } else {
  650.                         el.style.visibility = "";
  651.                     }
  652.                 }
  653.             }
  654.         }
  655.     }
  656.     return bStarted;
  657. }
  658.  
  659. function ApplyTextFormatting(divEl, childEl)
  660. {
  661.     childEl.setAttribute("BSSCOriginalStyle", childEl.style);
  662.  
  663.     // Text Change
  664.     hoverColor = divEl.getAttribute("BSSCHoverColor", false);
  665.     if ("Default" != divEl.getAttribute("BSSCHoverColorName"))
  666.     {
  667.         childEl.setAttribute("BSSCOriginalColor", childEl.style.color);
  668.         childEl.style.color = hoverColor;
  669.     }
  670.     hoverFontName = divEl.getAttribute("BSSCHoverFontName", false);
  671.     if (null != hoverFontName && hoverFontName != "*Default*")
  672.     {
  673.         hoverFontFamily = divEl.getAttribute("BSSCHoverFontFamily", false);
  674.         if (null != hoverFontFamily)
  675.         {
  676.             childEl.setAttribute("BSSCOriginalFontFamily", childEl.style.fontFamily);
  677.             childEl.style.fontFamily = hoverFontFamily;
  678.         }
  679.     }
  680.     hoverFontSize = divEl.getAttribute("BSSCHoverFontSize", false);
  681.     {
  682.         if (null != hoverFontSize && hoverFontSize != "*")
  683.         {
  684.             childEl.setAttribute("BSSCOriginalFontSize", childEl.style.fontSize);
  685.             childEl.style.fontSize = hoverFontSize + "pt";
  686.         }
  687.     }
  688.     hoverFontStyle = divEl.getAttribute("BSSCHoverFontStyle", false);
  689.     if (null != hoverFontStyle && "Regular" != hoverFontStyle)
  690.     {
  691.         if ("Italic" == hoverFontStyle)
  692.         {
  693.             childEl.setAttribute("BSSCOriginalFontStyle", childEl.style.fontStyle);
  694.             childEl.style.fontStyle = "italic";
  695.         }
  696.         else if ("Bold" == hoverFontStyle)
  697.         {
  698.             childEl.setAttribute("BSSCOriginalFontWeight", childEl.style.fontWeight);
  699.             childEl.style.fontWeight = "bold";
  700.         }
  701.         else if ("Bold Italic" == hoverFontStyle)
  702.         {
  703.             childEl.setAttribute("BSSCOriginalFontStyle", childEl.style.fontStyle);
  704.             childEl.style.fontStyle = "italic";
  705.             childEl.setAttribute("BSSCOriginalFontWeight", childEl.style.fontWeight);
  706.             childEl.style.fontWeight = "bold";
  707.         }
  708.     }
  709.     hoverUnderline = divEl.getAttribute("BSSCHoverUnderLine", false);
  710.     if (null != hoverUnderline && hoverUnderline == "TRUE")
  711.     {
  712.         childEl.setAttribute("BSSCOriginalTextDecoration", childEl.style.textDecoration);
  713.         childEl.style.textDecoration = "underline";
  714.     }
  715. }
  716.  
  717. function RemoveTextFormatting(el)
  718. {
  719.     originalColor = el.getAttribute("BSSCOriginalColor", false);
  720.     if (null != originalColor)
  721.         el.style.color = originalColor;
  722.     originalFontFamily = el.getAttribute("BSSCOriginalFontFamily", false);
  723.     if (null != originalFontFamily)
  724.         el.style.fontFamily = originalFontFamily;
  725.     originalFontSize = el.getAttribute("BSSCOriginalFontSize", false);
  726.     if (null != originalFontSize)
  727.         el.style.fontSize = originalFontSize;
  728.     originalFontStyle = el.getAttribute("BSSCOriginalFontStyle", false);
  729.     if (null != originalFontStyle)
  730.         el.style.fontStyle = originalFontStyle;
  731.     originalFontWeight = el.getAttribute("BSSCOriginalFontWeight", false);
  732.     if (null != originalFontWeight)
  733.         el.style.fontWeight = originalFontWeight;
  734.     originalTextDecoration = el.getAttribute("BSSCOriginalTextDecoration", false);
  735.     if (null != originalTextDecoration)
  736.         el.style.textDecoration = originalTextDecoration;
  737. }
  738.  
  739. function BSSCOnMouseOver(el)
  740. {
  741.     // Text Formatting
  742.     hoverColor = el.getAttribute("BSSCHoverColor", false);
  743.     if (null != hoverColor)
  744.         for (var index=0; index<el.all.length; index++)
  745.             ApplyTextFormatting(el, el.all[index]);
  746.  
  747.     // Glow
  748.     glowColor = el.getAttribute("BSSCGlowColor", false);
  749.     if (null != glowColor)
  750.     {
  751.         glowStrength = el.getAttribute("BSSCGlowStrength", false);
  752.         if (null == glowStrength)
  753.             glowStrength = "3";
  754.         glowColorName = el.getAttribute("BSSCGlowColorName");
  755.         if ("Default" == glowColorName)
  756.             el.style.filter = "glow(Strength=" + glowStrength + ", enabled=1)";
  757.         else
  758.             el.style.filter = "glow(Color=#" + glowColor + ", Strength=" + glowStrength + ", enabled=1)";
  759.     }
  760. }
  761.  
  762. function BSSCOnMouseOut(el)
  763. {
  764.     // Text Formatting
  765.     hoverColor = el.getAttribute("BSSCHoverColor", false);
  766.     if (null != hoverColor)
  767.         for (var index=0; index<el.all.length; index++)
  768.             RemoveTextFormatting(el.all[index]);
  769.  
  770.     // Glow
  771.     glowColor = el.getAttribute("BSSCGlowColor", false);
  772.     if (null != glowColor)
  773.         el.style.filter="";
  774. }
  775.  
  776. function doStaticEffects()
  777. {
  778.     divElements = document.all.tags("DIV");
  779.     for (var index = 0; index < divElements.length; index++)
  780.     {
  781.         el = divElements[index];
  782.         
  783.         dropShadowColor = el.getAttribute("BSSCDropShadowColor");
  784.         if (null != dropShadowColor)
  785.         {
  786.             dropShadowXOffset = el.getAttribute("BSSCDropShadowXOffset");
  787.             if (null == dropShadowXOffset)
  788.                 dropShadowXOffset = 0;
  789.             dropShadowYOffset = el.getAttribute("BSSCDropShadowYOffset");
  790.             if (null == dropShadowYOffset)
  791.                 dropShadowYOffset = 0;
  792.             dropShadowColorName = el.getAttribute("BSSCDropShadowColorName");
  793.             if ("Default" == dropShadowColorName)
  794.                 el.style.filter = "DropShadow(OffX=" + dropShadowXOffset + ", OffY=" + dropShadowYOffset + ")";
  795.             else
  796.                 el.style.filter = "DropShadow(Color=" + dropShadowColor + ", OffX=" + dropShadowXOffset + ", OffY=" + dropShadowYOffset + ")";
  797.         }
  798.     }
  799. }
  800.  
  801. function drop( targetId )
  802.     target = document.all( targetId );
  803.     if (target.style.display == 'none') {
  804.        target.style.display = "" ;
  805.     } else {
  806.        target.style.display = "none";
  807.     }
  808.     event.cancelBubble = true;
  809. }
  810.  
  811. function checkParent(src,dest)
  812. {
  813.     //Search for a specific parent of the current element.
  814.     while(src !=null)
  815.     {
  816.         if(src.tagName == dest)
  817.         {
  818.             return src;
  819.         }
  820.         src = src.parentElement;
  821.     }
  822.     return null;
  823. }
  824.  
  825. //Generic Display code
  826. function outline2()
  827. {
  828.     //Expand or collapse if a list item is clicked.
  829.     var open = event.srcElement;
  830.  
  831.     //Verify that the tag which was clicked was either the 
  832.     //trigger tag or nested within a trigger tag.
  833.     var el = checkParent(open,"CITE");
  834.     if(null != el)
  835.     {    
  836.         var incr=0;
  837.         var elmPos = 0;
  838.         var parentSpan;
  839.         var fBreak
  840.  
  841.         //Get the position of the element which was clicked
  842.         elemPos = window.event.srcElement.sourceIndex;
  843.  
  844.         //Search for a SPAN tag
  845.         for (parentSpan = window.event.srcElement.parentElement; parentSpan!=null;    parentSpan = parentSpan.parentElement) 
  846.         {
  847.             //test if already at a span tag 
  848.             if (parentSpan.tagName=="SPAN") {
  849.                 incr=1;
  850.                 break;
  851.             }
  852.             
  853.             //Test if the tag clicked was in a body tag or in any of the possible kinds of lists
  854.             //we perform this test because nested lists require special handling
  855.             if (parentSpan.tagName=="BODY" || parentSpan.tagName=="UL" || parentSpan.tagName=="OL") 
  856.             {
  857.                 //Determine where the span to be expanded is.  
  858.                 for (incr=1; (elemPos+incr) < document.all.length; incr++)
  859.                 {    
  860.                     //verify we are at an expandable Div tag
  861.                     if(document.all(elemPos+incr).tagName=="SPAN" && (document.all(elemPos+incr).className=="expanded" || document.all(elemPos+incr).className=="glossexpanded" || document.all(elemPos+incr).className=="glosscollapsed" || document.all(elemPos+incr).className=="collapsed"))
  862.                     {
  863.                         fBreak=1;
  864.                         break;
  865.                     }
  866.                     else if(document.all(elemPos+incr).tagName=="LI")
  867.                     {
  868.                         //If the next tag following the list item (li) is another list item(li) return in order to prevent accidentally opening the next span in the list
  869.                         return;
  870.                     }
  871.                 }
  872.             }
  873.             //determine if we need to break out of the while loop (kind of a kludge since theres no goto in javascript)
  874.             if(fBreak==1)
  875.             {
  876.                 break;
  877.             }
  878.         }
  879.     }
  880.     else
  881.     {
  882.         return;
  883.     }
  884.  
  885.     //Now that we've identified the span, expand or collapse it
  886.     if(document.all(elemPos+incr) == null) {    
  887.         return;
  888.     } else if(document.all(elemPos+incr).className=="collapsed") {
  889.         document.all(elemPos+incr).className="expanded";
  890.     } else if(document.all(elemPos+incr).className=="expanded")  {
  891.         document.all(elemPos+incr).className="collapsed";
  892.     } else if(document.all(elemPos+incr).className=="glosscollapsed") {
  893.         document.all(elemPos+incr).className="glossexpanded";
  894.     } else if(document.all(elemPos+incr).className=="glossexpanded") {
  895.         document.all(elemPos+incr).className="glosscollapsed";
  896.     } else    {
  897.         return;
  898.     }
  899.     event.cancelBubble = true;
  900. }
  901.  
  902.  
  903.