//  Common Menu

function startNav() {
	if (document.getElementById) {
		navSwitch(document.getElementById("nav"));
	}
}
var _last;
function navSwitch(navRoot) {
var i,x, node, node2;

	if(navRoot)
	for (i=0; i<navRoot.childNodes.length; i++) {
		node = navRoot.childNodes[i];
		if (node.nodeName=="LI") {
			node.onmouseover=function() {
				this.className=" over";
			}
			node.onmouseout=function() {
				this.className=this.className.replace(" over", " off");
				_last = this;
				window.setTimeout(function () { repaint(); }, 1);
			}
			for (x=0; x<node.childNodes.length; x++) {
				node2 = node.childNodes[x];
				if (node2.nodeName=="UL") navSwitch(node2);
			}
		}
	}
}

// for IE7
function repaint() {
	if (_last.className) _last.className = _last.className;
}

