home *** CD-ROM | disk | FTP | other *** search
/ PC World 2004 April / PCWorld_2004-04_cd.bin / software / vyzkuste / spysweeper / ssfsetup1_9199452.exe / SpyHelp.chm / scripts / page.js < prev    next >
Text File  |  2003-10-24  |  2KB  |  85 lines

  1. // Copyright (c) 2002-2003 Quadralay Corporation.  All rights reserved.
  2. //
  3.  
  4. function  HTMLHelpUtility_NotifyClickedPopup()
  5. {
  6.   // Not a member function, need to access via variable
  7.   //
  8.   VarHTMLHelp.mbPopupClicked = true;
  9. }
  10.  
  11. function  HTMLHelp_Object()
  12. {
  13.   this.mbPopupClicked  = false;
  14.   this.mbOverPopupLink = false;
  15.   this.mEvent          = null;
  16.   this.mPopup          = new HTMLHelpPopup_Object("VarHTMLHelp.mPopup",
  17.                                                   "window",
  18.                                                   HTMLHelpUtility_NotifyClickedPopup,
  19.                                                   "HTMLHelpPopupDIV", "HTMLHelpPopupText",
  20.                                                   10, 12, 20, 400);
  21.  
  22.   this.fNotifyClicked  = HTMLHelp_NotifyClicked;
  23.   this.fMouseOverPopup = HTMLHelp_MouseOverPopup;
  24.   this.fMouseOutPopup  = HTMLHelp_MouseOutPopup;
  25.   this.fShowPopup      = HTMLHelp_ShowPopup;
  26.   this.fHidePopup      = HTMLHelp_HidePopup;
  27.   this.fPopupDivTag    = HTMLHelp_PopupDivTag;
  28. }
  29.  
  30. function  HTMLHelp_NotifyClicked()
  31. {
  32.   if (this.mbPopupClicked)
  33.   {
  34.     this.mbPopupClicked = false;
  35.   }
  36.   else if ( ! this.mbOverPopupLink)
  37.   {
  38.     this.fHidePopup();
  39.   }
  40. }
  41.  
  42. function  HTMLHelp_MouseOverPopup(ParamEvent)
  43. {
  44.   this.mbOverPopupLink = true;
  45.  
  46.   this.mEvent = new Object();
  47.   this.mEvent.x = ParamEvent.x;
  48.   this.mEvent.y = ParamEvent.y;
  49. }
  50.  
  51. function  HTMLHelp_MouseOutPopup()
  52. {
  53.   this.mbOverPopupLink = false;
  54. }
  55.  
  56. function  HTMLHelp_ShowPopup(ParamLink)
  57. {
  58.   var  VarHTML;
  59.  
  60.  
  61.   if (this.mEvent != null)
  62.   {
  63.     VarHTML = HTMLHelp_GetPopupHTML(ParamLink);
  64.     if ((VarHTML != null) &&
  65.         (VarHTML.length > 0))
  66.     {
  67.       this.mbPopupClicked = false;
  68.  
  69.       this.mPopup.fShow(VarHTML, this.mEvent);
  70.     }
  71.   }
  72.  
  73.   this.mEvent = null;
  74. }
  75.  
  76. function  HTMLHelp_HidePopup()
  77. {
  78.   this.mPopup.fHide();
  79. }
  80.  
  81. function  HTMLHelp_PopupDivTag()
  82. {
  83.   return this.mPopup.fDivTagText();
  84. }
  85.