/*
 *  File:  include0.js
 *
 *  Include an HTML document into the current document
 *
 *  Example:  include0Test.html
 *
 *    <script type="text/javascript"
 *            src="http://www.bgsu.edu/scripts/include0.js">
 *    </script>
 *    <!-- Insert this code in the <body> of your document -->
 *    <script type="text/javascript">
 *      include( "foo.html" );
 *    </script>
 *
 */

// Include an HTML document into the current document:
function include( file ) {
  // Load script browser.js:
  document.writeln( '<script type="text/javascript"' );
  document.writeln( '        src="http://www.bgsu.edu/scripts/browser.js">' );
  document.writeln( '</script>');
  // If Netscape Navigator 4 or above, use <layer>, otherwise use <iframe>:
  if ( navigator.isNN4 ) {
    document.writeln( '<layer src="' + file + '">' );
    document.writeln( '  This browser does not support the &lt;layer&gt;element!' );
    document.writeln( '</layer>' );
  } else {
    document.writeln( '<iframe src="' + file + '" frameborder="0">' );
    document.writeln( '  This browser does not support the &lt;iframe&gt;element!' );
    document.writeln( '</iframe>' );
  }
}