home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 June / CHIP_CD_2004-06.iso / bonus / buhgal / files / M12USWEB.exe / RCDATA / CABINET / money.cab / msmoney.chm / hcglossary.htc < prev    next >
Text File  |  2003-06-18  |  1KB  |  55 lines

  1. <PUBLIC:COMPONENT URN="-/msmny:glossary/-">
  2. <PUBLIC:ATTACH FOR="element" EVENT="ondocumentready" ONEVENT="Main()" />
  3.  
  4. <PRIVATE:PROPERTY NAME="ActiveColor" />
  5. <PRIVATE:PROPERTY NAME="InactiveColor" />
  6.  
  7. <SCRIPT TYPE="text/jscript" LANGUAGE="JScript">
  8.  
  9. String.prototype.trim = function()
  10. {
  11.     return this.replace(/(^\s*)|(\s*$)/g,"");
  12. }
  13. function Main()
  14. {
  15.     var hTerm;
  16.     var szDfltColor;
  17.     
  18.     ActiveColor   = "purple";
  19.     InactiveColor = "blue";
  20.     szDfltColor   = element.currentStyle.color;
  21.     try
  22.     {
  23.         if("object" == typeof GlossaryData)
  24.         {
  25.             hTerm = (0 == element.getAttribute("tNum").length)
  26.                 ?
  27.                 GlossaryData.documentElement.selectSingleNode("term[title $ieq$ '" + element.innerText.trim() + "']/definition")
  28.                 :
  29.                 GlossaryData.documentElement.selectSingleNode("term[@tNum='" + element.getAttribute("tNum") + "']/definition")
  30.                 ;
  31.             element.title        = hTerm.text;
  32.             element.style.color  = InactiveColor;
  33.             element.style.cursor = "help";
  34.             
  35.             element.onmouseover = function()
  36.             {
  37.                 this.style.color          = ActiveColor;
  38.                 this.style.textDecoration = "underline";
  39.             }
  40.             element.onmouseout = function()
  41.             {
  42.                 this.style.color          = InactiveColor;
  43.                 this.style.textDecoration = "none";
  44.             }
  45.         }
  46.     }
  47.     catch(e)
  48.     {
  49.         element.title        = "";
  50.         element.style.color  = szDfltColor;
  51.         element.style.cursor = "default";
  52.     }
  53. }
  54. </SCRIPT>
  55. </PUBLIC:COMPONENT>