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 / hcdropdown.htc < prev    next >
Text File  |  2003-06-18  |  2KB  |  72 lines

  1. <PUBLIC:COMPONENT URN="-/msmny:dropdown/-">
  2. <PUBLIC:ATTACH FOR="element" EVENT="ondocumentready" ONEVENT="Main()" />
  3.  
  4. <PRIVATE:PROPERTY NAME="ActiveColor" />
  5. <PRIVATE:PROPERTY NAME="InactiveColor" />
  6. <PRIVATE:PROPRETY NAME="RelatedField" />
  7.  
  8. <SCRIPT TYPE="text/jscript" LANGUAGE="JScript">
  9. <!--
  10. @set @debughelp = false;
  11.  
  12. function Main()
  13. {
  14.     RelatedField = element.document.getElementById(element.getAttribute("FieldToToggle"));
  15.     if(RelatedField)
  16.     {
  17.         ActiveColor   = "purple";
  18.         InactiveColor = "#0000ff";
  19.         with(element)
  20.         {
  21.             style.color          = InactiveColor;
  22.             style.cursor         = "hand";
  23.             style.textDecoration = "none";
  24.             onmouseover = function()
  25.             {
  26.                 this.style.textDecoration = "underline";
  27.             }
  28.             onmouseout = function()
  29.             {
  30.                 this.style.textDecoration = "none";
  31.             }
  32.             onclick = function()
  33.             {
  34.                 var bRotation;
  35.                 try
  36.                 {
  37.                     if("none" == RelatedField.currentStyle.display)
  38.                     {
  39.                         bRotation = 3;
  40.                         RelatedField.style.display = "block";
  41.                         RelatedField.scrollIntoView(false);
  42.                     }
  43.                     else
  44.                     {
  45.                         bRotation = 0;
  46.                         RelatedField.style.display = "none";
  47.                     }
  48.                     this.children[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(rotation=" + bRotation + ")";
  49.                 }
  50.                 catch(exception)
  51.                 {
  52.                     // 
  53.                 }
  54.                 this.runtimeStyle.color = ActiveColor;
  55.                 this.style.fontStyle = ("normal" == this.currentStyle.fontStyle)
  56.                     ?
  57.                     "italic"
  58.                     :
  59.                     "normal"
  60.                     ;
  61.             }
  62.         }
  63.     }
  64.     else
  65.     {
  66.         /*@if(@debughelp) alert("Assert: malformed XML\n\nCannot locate text field.") @end @*/
  67.         element.style.display = "none";
  68.     }
  69. }
  70. //-->
  71. </SCRIPT>
  72. </PUBLIC:COMPONENT>