// JavaScript Document
// this function finds the browser Document Object Model (DOM)
var isDHTML = 0;
var isID = 0;
var isAll = 0;
var isLayers = 0;

//detect the browser DOM
if (document.getElementByID) //if W3C ID
	{
		isID = 1;
		isDHTML = 1;
	}
else
	{
		if (document.all) //if Internet Explorer
		{
			isAll = 1;
			isDHTML = 1;
		}
		else //browser is Netscape 4
		{
			browserVersion = parseInt(navigator.appVersion);
			if ((navigator.appName.indexOf('Netscape') != -1) &&
				(browserVersion == 4))
				{
					isLayers = 1;
					isDHTML = 1;
				}
		
			else //browser is Netscape 5 or above
			{
				browserVersion = parseInt(navigator.appVersion);
				if ((navigator.appName.indexOf('Netscape') != -1) &&
					(browserVersion == 5))
					{
						isID = 1;
						isDHTML = 1;
					}
			}
		}
	}

// once browser type has been detected, build the DOM statement and return it to calling page
function findDOM(objectID, withStyle)
	{
		if (withStyle == 1) // if function called to use object's styles
		{
			if (isID) // if W3C ID
			{
				return(document.getElementById(objectID).style);
			}
			else
			{
				if (isAll) // if IE
				{
					return(document.all[objectID].style);
				}
				else
				{
					if(isLayers) // if Netscape
					{
						return(document.getElementById(objectID).style);
					}
				};
			}
		}
		else // function called without styles
		{
			if(isID) // if W3C ID
			{
				return(document.getElementById(objectID));
			}
			else
			{
				if(isAll) // if IE
				{
					return(document.all[objectID]);
				}
				else
				{
					if(isLayers) // if Netscape
					{
						return(document.layers[objectID]);
					}
				};
			}
		}
	}