/* ==================================================================

FILE:   Topic.js

DESCR:  Topic library file for Netscape Help implementation.

NOTES:  

================================================================== */



// Make system object easily available to topics. Note that

// when a topic file is printed, the browser reloads the document

// internally out of the frameset context. This means that these

// references may be undefined, so test first.

var system

if ( typeof top.SystemFrame != "undefined" ) {

   system = top.SystemFrame.systemObj

}



function onload()

{

   //top.SystemFrame.trace( "topic.js onload()" )

   //alert( "topic.js onload()" )



   // Same print issue.

   if ( typeof top.SystemFrame == "undefined" ) return



   // Bind events to global event handlers.

   top.bindDocEvts( document )



   // Verify all hrefs are nethelp: URLs.

   if ( top.SystemFrame.CHECK_HREFS ) {

      for ( i = 0; i < document.links.length; i++ ) {



         // Exempt certain schemes.

         var href = document.links[ i ].href.toLowerCase()

         if ( href.indexOf( "javascript:" ) != -1 ) break

         if ( href.indexOf( "mailto:" ) != -1 ) break

   

         // Verify nethelp: URL.

         if ( href.indexOf( "nethelp:" ) == -1 ) system.badURLerror( href )

      }

   }



   top.StatusFrame.setStatusClear()



   // Manage layered topics. We travel here even if the system is not using

   // layered topics.

   system.manageLayers()

}

