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 / hctoc.htc < prev    next >
Text File  |  2003-06-18  |  3KB  |  99 lines

  1. <PUBLIC:COMPONENT URN="-/msmny:dropdown/-">
  2.  
  3. <PUBLIC:PROPERTY NAME="IsInitialized"/>
  4. <PUBLIC:PROPERTY NAME="Companion"/>
  5. <PUBLIC:PROPERTY NAME="IsExpanded"/>
  6.  
  7. <PUBLIC:METHOD NAME="QueryEvent"/>
  8.  
  9. <PUBLIC:ATTACH FOR="element" EVENT="onclick" HANDLER="QueryEvent"/>
  10. <PUBLIC:ATTACH FOR="element" EVENT="onmouseover" HANDLER="QueryEvent"/>
  11. <PUBLIC:ATTACH FOR="element" EVENT="onmouseout" HANDLER="QueryEvent"/>
  12.  
  13. <SCRIPT TYPE="text/jscript" LANGUAGE="JScript">
  14.  
  15. function QueryEvent()
  16. {
  17.     switch(window.event.type)
  18.     {
  19.         case "mouseover" :
  20.         element.style.textDecoration = "underline";
  21.         break;
  22.         
  23.         case "mouseout" :
  24.         element.style.textDecoration = "none";
  25.         break;
  26.         
  27.         case "click" :
  28.         if(null == IsInitialized)
  29.         {
  30.             var hTest;
  31.             var szTag;
  32.             var szClss;
  33.             var bResult = -1;
  34.             var bIndx   = element.sourceIndex;
  35.             var rgDoc   = window.document.all;
  36.  
  37.             while(bResult == -1)
  38.             {
  39.                 hTest  = rgDoc(bIndx);
  40.                 szTag  = hTest.tagName.toUpperCase();
  41.                 szClss = hTest.className;
  42.                 if(null != szClss) 
  43.                 {
  44.                     if((szTag == "DIV") && (szClss.toUpperCase() == "COLLAPSEDTOC"))
  45.                     {
  46.                         bResult       = 1;
  47.                         Companion     = hTest;
  48.                         Companion.id  = element.document.uniqueID;
  49.                         IsExpanded    = false;
  50.                         IsInitialized = true;
  51.                     }
  52.                 }
  53.                 if((bIndx == (rgDoc.length - 1)) && (bResult != 1))
  54.                 {
  55.                     var hElmnt = element.document.createElement("DIV");
  56.                     var hGuid  = element.document.uniqueID;
  57.                     hElmnt.id  = hGuid;
  58.                     hElmnt.style.paddingRight  = "5px";
  59.                     hElmnt.style.paddingLeft   = "5px";
  60.                     hElmnt.style.paddingBottom = "5px";
  61.                     hElmnt.innerHTML = "<P><IMG SRC='important.gif' BORDER=0 STYLE='margin-right:2px;'><SPAN STYLE='font-weight:bold;'>Notice</SPAN>: An error has occurred in the program that will not allow you to view this portion of the topic.  Click "" + element.innerText + "" again to cancel this message.</P>";
  62.                     element.insertAdjacentElement("AfterEnd",hElmnt);
  63.                     Companion     = element.document.getElementById(hGuid);
  64.                     bResult       = 1;
  65.                     IsExpanded    = false;
  66.                     IsInitialized = true;
  67.                 }
  68.                 else
  69.                 {
  70.                     bIndx++;
  71.                 }
  72.             }
  73.         }
  74.         if(IsInitialized)
  75.         {
  76.             Companion.className = (IsExpanded)
  77.                 ?
  78.                 "collapsedTOC"
  79.                 :
  80.                 "expandedTOC"
  81.                 ;
  82.             element.style.fontStyle = (IsExpanded)
  83.                 ?
  84.                 "normal"
  85.                 :
  86.                 "italic"
  87.                 ;
  88.             IsExpanded = (IsExpanded)
  89.                 ?
  90.                 false
  91.                 :
  92.                 true
  93.                 ;
  94.         }
  95.         break;
  96.     }
  97. }
  98. </SCRIPT>
  99. </PUBLIC:COMPONENT>