window.onload = function() {
	var menu = document.getElementById('menu');
	if (menu != null) {
		var query = new QueryString();
		var nodes = menu.childNodes;
		for (var i = 0; i < nodes.length; i++) {
			var node = nodes[i];
			if (node.nodeType == 1) {
				if (node.id == query['page']) {
					node.id = 'active';
				}
				node.onclick = function() {
					if (this.id != 'active') {
						for (var j = 0, children = this.parentNode.childNodes; j < children.length; j++) {
							var child = children[j];
							if (child.nodeType == 1) {
								child.id = '';
							}
						}
						this.id = 'active';
					}
				};
			}
		}
	}
	var anchors = document.getElementsByTagName('a');
	for (var i = 0; i < anchors.length; i++) {
		var a = anchors[i];
/*
		a.onmouseover = function() {
			window.status = this.innerText;
			return true;
		};
		a.onmouseout = function() {
			window.status = '';
			return true;
		};
*/
	}
};
