HM_DOM = document.getElementById ? true : false;
HM_IE  = document.all ? true : false;
HM_NS4 = document.layers ? true : false;

/* Library Functions */
function getIdElement(item) { /* what can i do with an element: content discovery, ... */
	theElement = (HM_DOM) ? document.getElementById(item)
		: (HM_IE) ? document.all(item) : document.layers[item];
	return theElement;
}

function getIdAttribute(item, attrib) {
	return getElementAttribute(getIdElement(item), attrib);
}

function getElementAttribute(elem, attrib) {
	return elem[ attrib ];
}

function setIdAttribute(item, attrib, value) {
	setElementAttribute(getIdElement(item), attrib, value);
}

function setElementAttribute(elem, attrib, value) {
	elem[ attrib ] = value;
}

/* Library Functions */

/* App Functions */
var infoView=null;

function setFocus() {
	theElement = getIdElement("focusItem");
	theElement.focus();
}

function show(item) {
	if(infoView==item || (infoView && !item)) {
		if(infoView) hide(infoView);
		return;
	}
	if(infoView) hide(infoView);
	infoView=item;

	theElement = getIdElement(item);
	if(theElement) {
		theElement.style.display="block";
	}
	setFocus();
}

function hide(item) {
	theElement = getIdElement(item);
	if(theElement) {
		theElement.style.display="none";
	}
	infoView=null;
}
/* App Functions */

