home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Best Rated Educational Internet Sites / BREIS.iso / pc / win32 / nav40l.z / Topic.js < prev    next >
Text File  |  1997-10-22  |  2KB  |  47 lines

  1. /* ==================================================================
  2. FILE:   Topic.js
  3. DESCR:  Topic library file for Netscape Help implementation.
  4. NOTES:  
  5. ================================================================== */
  6.  
  7. // Make system object easily available to topics. Note that
  8. // when a topic file is printed, the browser reloads the document
  9. // internally out of the frameset context. This means that these
  10. // references may be undefined, so test first.
  11. var system
  12. if ( typeof top.SystemFrame != "undefined" ) {
  13.    system = top.SystemFrame.systemObj
  14. }
  15.  
  16. function onload()
  17. {
  18.    //top.SystemFrame.trace( "topic.js onload()" )
  19.    //alert( "topic.js onload()" )
  20.  
  21.    // Same print issue.
  22.    if ( typeof top.SystemFrame == "undefined" ) return
  23.  
  24.    // Bind events to global event handlers.
  25.    top.bindDocEvts( document )
  26.  
  27.    // Verify all hrefs are nethelp: URLs.
  28.    if ( top.SystemFrame.CHECK_HREFS ) {
  29.       for ( i = 0; i < document.links.length; i++ ) {
  30.  
  31.          // Exempt certain schemes.
  32.          var href = document.links[ i ].href.toLowerCase()
  33.          if ( href.indexOf( "javascript:" ) != -1 ) break
  34.          if ( href.indexOf( "mailto:" ) != -1 ) break
  35.    
  36.          // Verify nethelp: URL.
  37.          if ( href.indexOf( "nethelp:" ) == -1 ) system.badURLerror( href )
  38.       }
  39.    }
  40.  
  41.    top.StatusFrame.setStatusClear()
  42.  
  43.    // Manage layered topics. We travel here even if the system is not using
  44.    // layered topics.
  45.    system.manageLayers()
  46. }
  47.