//* Detect.js -- Detect Javascript features and browser version

//* Variables determine type of DOM support
var isDHTML = 0		//  Support for one of the following DOMs:
var isID = 0		//  W3C DOM
var isAll = 0		//  IE4 DOM
var isLayers = 0	//  NN4 DOM

//* Use feature sensing to determine DOM support
if (document.getElementById) {isID = 1; isDHTML = 1;}
if (document.all) {isAll = 1; isDHTML = 1;}
if (document.layers) {isLayers = 1; isDHTML = 1;}

//* Use browser sensing to work around possible Navigator 4 bug
if (!isDHTML) {
	if ( (navigator.appName.indexOf('Netscape') != -1) && (parseInt(navigator.appVersion) == 4) ) {isLayers = 1; isDHTML = 1;}
}

//* Function to return ID of an Object
function getObjectID (objectID) {

	if (isID) { return (document.getElementById(objectID)) }
	else {
		if (isAll) { return (document.all[objectID]) }
		if (isLayers) { return (document.layers[objectID]) }	
	}
}

//* Function to return ID of an Object for accessing style property
function getObjectStyle (objectID) {

	if (isID) { return (document.getElementById(objectID).style) }
	else {
		if (isAll) { return (document.all[objectID].style) }
		if (isLayers) { return (document.layers[objectID]) }	
	}
}