
//*********************
// SHOWONLY
//*********************

// Hide all elements of type tagName,
// which are directly below an element with id parentId
// An element with id 'showId' is set to display.
//
// Hint: to hide all alements, give an non-existing id for showId
//
// Arguments:
//    showId    element to show
//    parentId  parent element to search in
//    tagName   type of tag to search for (default DIV)

function showOnly(showId, parentId, tagName) {
	var parObj = document.getElementById(parentId);
	var tagType = "DIV";
	if (tagName) {
		tagType = tagName.toUpperCase();
	}
	if (parObj) {
		var children = parObj.childNodes;
		// alert(db_DumpTree(children, ''));
		for(c = 0; c < children.length; c++) {
			if (children[c].nodeName == tagType ) {
				if (children[c].id == showId) {
					children[c].style.display = 'block';
				} else {
					children[c].style.display = 'none';
				}
			}
		}
	}
}


