//
// Filename : browser.js
// Author   : Wayne Howarth <wayne@pyesmeadow.fsnet.co.uk>
// Created  : 14th June 2002
//
// Routines for client side browser detection.
//
// Copyright (c) 2002 Wayne Howarth, All Rights Reserved
//
// Routines in this file may be freely distributed providing the above
// copyright message is preserved.
//

var bV   = parseInt( navigator.appVersion );
var NS4  = false;
var NS6  = false;
var IE4  = false;

// Determine the version of the client's browser.

if( document.all && bV >= 4 )
    IE4 = true;
else if( document.getElementById )
    NS6 = true;
else if( document.layers )
    NS4 = true;

function getItem( itemId )
{   //
    // getItem()
    // A generic function to return a reference to an object
    // on an HTML page.
    //
    // Compatibility:
    //   NS4 no, IE4+ yes, NS6 yes
    //

	var obj = null
	if( IE4 )
		obj = document.all[itemId];
	else if( NS6 )
		obj = document.getElementById(itemId);
	return obj
}