// created by: Geoff Pack, August 2009
// last modified: August 2009

function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

// Show/Hide functions clean up later...
function show(id) {
	document.getElementById(id).style.display = 'block';
}
function hide(id) {
	document.getElementById(id).style.display = 'none';
}


function showScroller(linkObj) {
	// find siblings of linkObj
	var sibs = linkObj.parentNode.childNodes;
	
	for (var i=0, j=sibs.length; i<j; i++) {
		var sib = sibs[i];
		if ((sib.nodeType == 1) && (sib.hash)) {
			// hide id corresponding to href each sibling
			hide(sib.hash.substr(1));				
		}
	}
	
	// show id corresponding to href of linkObj
	show(linkObj.hash.substr(1));
}

