home *** CD-ROM | disk | FTP | other *** search
/ ftp.rsa.com / 2014.05.ftp.rsa.com.tar / ftp.rsa.com / pub / agents / RSASecurIDTokenAuto412x64.msi / Data1.cab / _20AB61481F79BB99DDAE4152EACACC61 < prev    next >
Text File  |  2014-03-12  |  2KB  |  79 lines

  1. ∩╗┐//    WebHelp 5.10.001
  2. // this value should be identical to the value used in whproxy.js
  3. window.whname = "wh_stub";
  4.  
  5. // this file will be used by Topic and NavBar and NavPane and other components
  6. // and this file is used in child frame html.
  7. // and the whstub.js will be used in the start page.
  8. // see reference in whstub.js.
  9. // Internal Area
  10. var gbInited = false;
  11. var gWndStubPage = null;
  12. function getStubPage()
  13. {
  14.     if (!gbInited)
  15.     {
  16.         gWndStubPage = getStubPage_inter(window);
  17.         gbInited = true;
  18.     }
  19.     return gWndStubPage;
  20. }
  21.  
  22. function getStubPage_inter(wCurrent) {
  23.     if (null == wCurrent.parent || wCurrent.parent == wCurrent)
  24.         return null;
  25.  
  26.     if (wCurrent.parent.whname && "wh_stub" == wCurrent.parent.whname) 
  27.         return wCurrent.parent;
  28.     else
  29.         if (wCurrent.parent.frames.length != 0 && wCurrent.parent != wCurrent)
  30.             return getStubPage_inter(wCurrent.parent);
  31.         else 
  32.             return null;
  33. }
  34.  
  35. // Public interface begin here................
  36. function RegisterListener(framename, nMessageId)
  37. {
  38.     var wStartPage = getStubPage();
  39.     if (wStartPage && wStartPage != this) {
  40.         return wStartPage.RegisterListener(framename, nMessageId);
  41.     }
  42.     else 
  43.         return false;
  44. }
  45.  
  46. function RegisterListener2(oframe, nMessageId)
  47. {
  48.     var wStartPage = getStubPage();
  49.     if (wStartPage && wStartPage != this) {
  50.         return wStartPage.RegisterListener2(oframe, nMessageId);
  51.     }
  52.     else 
  53.         return false;
  54. }
  55.  
  56. function UnRegisterListener2(oframe, nMessageId)
  57. {
  58.     var wStartPage = getStubPage();
  59.     if (wStartPage && wStartPage != this && wStartPage.UnRegisterListener2) {
  60.         return wStartPage.UnRegisterListener2(oframe, nMessageId);
  61.     }
  62.     else 
  63.         return false;
  64. }
  65.  
  66. function SendMessage(oMessage)
  67. {
  68.     var nMsgId = oMessage.nMessageId;
  69.     if (nMsgId == WH_MSG_ISINFRAMESET && oMessage.wSender != this)
  70.         return true;
  71.     var wStartPage = getStubPage();
  72.     if (wStartPage && wStartPage != this && wStartPage.SendMessage) 
  73.     {
  74.         return wStartPage.SendMessage(oMessage);
  75.     }
  76.     else 
  77.         return false;
  78. }
  79. var gbWhProxy=true;