home *** CD-ROM | disk | FTP | other *** search
/ Hentai 69 / HENTAI69.iso / Extra / MPSetup.exe / 1033 / RCDATA / CABINET / wmploc.DLL / HTML / NAVBUTTON.HTC < prev    next >
Text File  |  2002-12-14  |  3KB  |  100 lines

  1. <PUBLIC:COMPONENT lightWeight=true>
  2. <PUBLIC:ATTACH EVENT="oncontentready" ONEVENT="load()" />
  3. <PUBLIC:PROPERTY NAME="enabled" PUT='setEnabled' GET='getEnabled'/>
  4. <PUBLIC:PROPERTY NAME="text" />
  5. <PUBLIC:PROPERTY NAME="image" />
  6. <PUBLIC:PROPERTY NAME="code" />
  7. <PUBLIC:ATTACH EVENT="onmouseout"  ONEVENT="mouseout()" />
  8. <PUBLIC:ATTACH EVENT="onmouseover" ONEVENT="mouseover()" />
  9. <PUBLIC:ATTACH EVENT="onmousedown" ONEVENT="clickIt()" />
  10. <PUBLIC:ATTACH EVENT="onmouseup" ONEVENT="clicked()" />
  11. <PUBLIC:METHOD NAME="colorChange" />
  12.  
  13. <SCRIPT LANGUAGE="JScript">
  14.  
  15. var iEnabled = 1, fLoaded = false;
  16. var aEnabled = new Array('#d6d6d6', 'white');
  17. var aImgExt = new Array('dis', 'def', 'hvr', 'dwn');
  18.  
  19. var ex;
  20.  
  21. function load() 
  22.     ex = window.external;
  23.     if (!ex.appColorLight)
  24.     {
  25.         ex = new Object;
  26.         ex.appColorButtonHoverFace = 'red';
  27.         ex.appColorButtonShadow = 'orange';
  28.         ex.appColorButtonHighlight = 'purple';
  29.     }
  30.     
  31.     var s = '<table title="' + text + '" style="cursor:default; border:1 solid; border-color: ' + getCurrentColor() + '" id="' + element.uniqueID + 'button" border=0 height=22 cellpadding=0 cellspacing=0><tr>';
  32.     s += '<td width=2></td><td><img height=15 align=absmiddle border=0 id="' + element.uniqueID + 'img" src="nav\\' + image + '-' + aImgExt[iEnabled] + '.gif"></td><td width=4></td>';
  33.     s += '<td nowrap class=smtext id="' + element.uniqueID + 'text"><a href="X" onclick="return false" id="' + element.uniqueID + 'link" style="color:' + aEnabled[iEnabled] + '" class=smtext>' + text + '</a></td><td width=6></td>';
  34.     element.innerHTML = s + '</tr></table></td></tr></table>';
  35.     fLoaded = true;
  36. }
  37.  
  38. function setEnabled(iE)
  39. {
  40.     if (iE == 0)
  41.         iEnabled = 0;
  42.     else
  43.         iEnabled = 1;
  44.  
  45.     if (fLoaded)
  46.         element.document.all(element.uniqueID + 'link').style.color = aEnabled[iEnabled];
  47. }
  48.  
  49. function getEnabled() { return iEnabled; }
  50.  
  51. var fOver = false;
  52. function mouseout()
  53. {
  54.     fOver = false;
  55.     var sty = element.document.all(element.uniqueID + 'button').style
  56.     sty.backgroundColor = getCurrentColor();
  57.     sty.borderColor = getCurrentColor();
  58.     element.document.all(element.uniqueID + 'img').src = 'nav\\' + image + '-' + aImgExt[iEnabled] + '.gif';
  59. }
  60.  
  61.  
  62. function mouseover()
  63. {
  64.     if (iEnabled)
  65.     {
  66.         fOver = true;
  67.         var but = element.document.all(element.uniqueID + 'button')
  68.         but.style.backgroundColor = ex.appColorButtonHoverFace;
  69.         but.style.borderColor = ex.appColorButtonHighlight + ' ' + ex.appColorButtonShadow + ' ' + ex.appColorButtonShadow + ' ' + ex.appColorButtonHighlight;
  70.         element.document.all(element.uniqueID + 'img').src = 'nav\\' + image + '-' + aImgExt[2] + '.gif';
  71.     }
  72. }
  73.  
  74. function clickIt()
  75. {
  76.     if (iEnabled)
  77.     {
  78.         var but = element.document.all(element.uniqueID + 'button')
  79.         element.document.all(element.uniqueID + 'img').src = 'nav\\' + image + '-' + aImgExt[3] + '.gif';
  80.         but.style.borderColor = ex.appColorButtonShadow + ' ' + ex.appColorButtonHighlight + ' ' + ex.appColorButtonHighlight + ' ' + ex.appColorButtonShadow;
  81.     }
  82. }
  83.  
  84. function clicked()
  85. {
  86. }
  87.  
  88. function colorChange()
  89. {
  90.     if (!fOver)
  91.     {
  92.         var sty = element.document.all(element.uniqueID + 'button').style
  93.         sty.backgroundColor = getCurrentColor();
  94.         sty.borderColor = getCurrentColor();
  95.     }
  96. }
  97. </SCRIPT>
  98. </PUBLIC:COMPONENT>
  99.