home *** CD-ROM | disk | FTP | other *** search
/ Chip 2009 November / Chip_2009.11_CD.iso / I386 / nusrmgr.cp_ / nusrmgr.cpl / HTML / POPUP.HTC < prev    next >
Encoding:
HTML Component  |  2008-04-14  |  1.1 KB  |  42 lines

  1. <PUBLIC:COMPONENT lightweight ><PUBLIC:PROPERTY name=ttText /><PUBLIC:PROPERTY name=ttWidth /><PUBLIC:PROPERTY name=ttDelay /><PUBLIC:METHOD name=ShowPopup /><PUBLIC:ATTACH event=onfocus onevent="onFocus();" /><PUBLIC:ATTACH event=onblur onevent="onBlur();" /><PUBLIC:ATTACH event=onmousemove onevent="onMouseMove();" /><PUBLIC:ATTACH event=onmouseout onevent="onMouseOut();" /><PUBLIC:ATTACH event=onclick onevent="onClick();" /></PUBLIC:COMPONENT lightweight ><SCRIPT language="JavaScript">
  2. if (!ttDelay) ttDelay = 250;
  3. var _tidDelay = null;
  4. function onFocus()
  5. {
  6. KillDelay();
  7. _tidDelay = window.setTimeout(uniqueID+".ShowPopup();", ttDelay);
  8. }
  9. function onBlur()
  10. {
  11. KillDelay();
  12. top.window.HidePopup();
  13. }
  14. function onMouseMove()
  15. {
  16. if (window.document.hasFocus())
  17. onFocus();
  18. }
  19. function onMouseOut()
  20. {
  21. if (!this.contains(event.toElement))
  22. onBlur();
  23. }
  24. function onClick()
  25. {
  26. ShowPopup();
  27. event.returnValue = false;
  28. }
  29. function ShowPopup()
  30. {
  31. KillDelay();
  32. top.window.ShowPopup(ttText, element, ttWidth);
  33. }
  34. function KillDelay()
  35. {
  36. if (_tidDelay)
  37. {
  38. window.clearInterval(_tidDelay);
  39. _tidDelay = null;
  40. }
  41. }
  42. </SCRIPT>