/*
    File:   check-browser.js
    Author: remco
    Date:   Sat Sep 12 23:21:59 PDT 2002

    Description:
      Browser check functions.

    Copyright (c) 2002-2003, Remco Teunen.  All Rights Reserved.
*/


/*---------------------------------------------------------------------------*
 * getIsBrowserOk
 *
 * Returns whether the browser is ok.
 *
 * Params:  None.
 *
 * Returns:  true if the browser is ok, false if not.
 *---------------------------------------------------------------------------*/
function getIsBrowserOk()
{
    // Check for certain functions to be available.
    if (!document.getElementById) return false;
    if (!Array.prototype.push) return false;
    if (!Array.call) return false;

    // Browser is ok.
    return true;

}   /* end getIsBrowserOk */


/*---------------------------------------------------------------------------*
 * checkBrowser
 *
 * Checks for the browser. If the browser isn't ok, then the function
 * displays a warning.
 *
 * Params:  None.
 *
 * Returns:  None
 *---------------------------------------------------------------------------*/
function checkBrowser()
{
    // If the browser is not ok, show a message.
    if (!getIsBrowserOk()) {
	
	document.write(
	    "<DIV Class = 'CheckBrowser'>" +
	    "Sorry, your browser might not process this page correctly." +
	    "</DIV>");
    }

}   /* end checkBrowser */

/* end check-browser.js */
