// ******************************************************************************
// unction getStyleObject(string) -> returns style object
// the function returns the stylesheet of that object or false if it can't find a stylesheet.	Handles cross-browser compatibility issues.
// ******************************************************************************
function getStyleObject(objectId) {
	// cross-browser function to get an object's style object given its id
	if(document.getElementById && document.getElementById(objectId)) {	// W3C DOM
		return document.getElementById(objectId).style;
	} else if (document.all && document.all(objectId)) {				// MSIE 4 DOM
		return document.all(objectId).style;
	} else if (document.layers && document.layers[objectId]) {			// NN 4 DOM.. note: this won't find nested layers

		return document.layers[objectId];
	} else {
		return false;
	}
}


// ******************************************************************************
// This function will show and hide a <div> content
//
// <a href="#" onclick="showhide('dhtml'); return(false);">Show / Hide</a>
// <div style="display: none;" id="dhtml"> SHOW ME AND HIDE ME</div>
// ******************************************************************************
function showhide(id) {
	obj = getStyleObject(id);
	obj.display = (obj.display == 'none')? '' : 'none';
}
