/*  displayBlock()
 *  show one fieldset block
 *	hides all the other ones in the group
 */
 
function displayBlock(group, id)
{
	$$(group).setStyle('display', 'none');

	$(id).setStyle('display', 'block');

	element = $('tab' + id);

	// update the menu item
	element.getParent('ul').getChildren('li').each(function(el){
		el.removeClass('active');
	});

	element.addClass('active');
}


/** Menu hover function
 */

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			if (this.className == "parent") {
				this.className+=" sfhover";
			} else {
				this.className+=" sf2hover";
			}
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			this.className=this.className.replace(new RegExp(" sf2hover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

