var LAYERSET_JS = true;

// Easily create and work with a "Layerset" array of all the DIV children of an object
// For best results, uses getelement.js

function ls_hide_func(element)
{
	// To allow easy switching of the method
	element.style.visibility = 'hidden';
}

function ls_show_func(element)
{
	// To allow easy switching of the method
	element.style.visibility = 'visible';
}

function layerset(root, tag)
{
	if (typeof(GETELEMENT_JS) != 'undefined') { root=getElementIfId(root); } // Custom function (included in getelement.js) that gEBIDs the parameter if it is a string
	if (!tag) { tag="div"; } // default
	
	return root.getElementsByTagName(tag);
}

function hide_all(set)
{
	var i;
	for (i=0; i<set.length; i++) {
		ls_hide_func(set[i]);
	}
}

function show_only(set, id)
{
	var i;
	for (i=0; i<set.length; i++) {
		if (set[i].id != id) {
			ls_hide_func(set[i]);
		}
		else {
			ls_show_func(set[i]);
		}
	}
}