var hasDocumentAll = false;
if (document.all) hasDocumentAll = true;

var hasGetElByID = false;
if (document.getElementById) hasGetElByID = true;

var hasLayers = false;
if (document.layers) hasLayers = true;

//alert("Capability Determinations\nhasDocumentAll="+hasDocumentAll+"\nhasGetElByID="+hasGetElByID+"\nhasLayers="+hasLayers);

/* Access Layer Style Properties
	Jim Cummins - http://www.conxiondesigns.com
	Required components:  Javascript Browser Sniff 1.0

	Heavily modified by Phyrria to use simple object detection rather than Javascript Browser Sniff 1.0. */
function aLs(layerID) {
	var returnLayer;

	if (hasDocumentAll) {
		return eval("document.all." + layerID + ".style");
	}
	if (hasGetElByID) {
		return eval("document.getElementById('" + layerID + "').style");
	}
	if (hasLayers) {
		return eval("document." + layerID);
	}
	return "null";
}
/* End of Accessing Layer Style Properties */

/* HideShow 1.0
	Jim Cummins - http://www.conxiondesigns.com
	Required components:  Accessing Layer Style Properties (and Req. Comp.) */
function HideShow(ID) {
	if ((aLs(ID).visibility == "visible") || (aLs(ID).visibility == "")) {
		aLs(ID).visibility = "hidden";
	} else if(aLs(ID).visibility == "hidden") {
		aLs(ID).visibility = "visible";
	}
}
/* End of HideShow 1.0 */

/* Hide the 'layer' of the given ID. */
function Hide(ID) {
	if (aLs(ID)) {
    aLs(ID).visibility = "hidden";
	}
}

/* Show the 'layer' of the given ID. */
function Show(ID) {
	if (aLs(ID)) {
    aLs(ID).visibility = "visible";
	}
}
