/*
**
**    index.js - Script support for index.html in the
**                  Cuddly Critters website.
**
** 01/25/07 - jf - Created.
**
*/


DEBUG_INDEX = 0                             /* For debugging, prints all the info */

BROSWER_IE = 0                              /* Current browser is IE */
BROWSER_NET_FF = 1                          /* Current browser is Netscape or FireFox */


var browserType = new Number(BROSWER_IE)    /* Default is IE */


/*
**    Gets the browser name and version.
*/

function get_browser_info()
{
var browName = new String(navigator.appName)

    if (browName.substring(0, 5) == "Netsc")    /* "Netscape" is what FireFox returns for it's name */
    {
        browserType = BROSWER_NET_FF;
    }
    else
    {
        browserType = BROSWER_IE;
    }

    if (DEBUG_INDEX)
    {
        document.writeln("<p align=\"center\"><b>");
        document.writeln("<br><br><br><br>");
        document.writeln("<u>Browser Info</u><br>Name: " + navigator.appName + "<br>Version: " + navigator.appVersion);
        document.writeln("<br>Global var = " + browserType);
        document.writeln("</p></b>");
    }
}
