/*
<a href="javascript:MM_openBrWindow('xxx.html','xxx','toolbar=no,resizable=no,scrollbars=no,width=xxx,height=xxx')">
*/

function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}

function $(e) { return document.getElementById(e); }
	
function addLoadEvent(func) {
	
	var oldonload = window.onload;
	
	if (typeof window.onload != 'function')
		window.onload = func;
	else {
		window.onload = function() {
			if (oldonload) oldonload();
				func();
			}
		}
	}
			
	document.getElementsByClassName = function(className, parentElement) {
		var children = ($(parentElement) || document.body).getElementsByTagName('*');
		var elements = [], child;

		for (var i = 0, length = children.length; i < length; i++) {
			child = children[i];
				
			if (child.className == className || 
				child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
				elements.push(child);
		}
		return elements;
	}
			
	addLoadEvent(function(){
		var menus = document.getElementsByClassName('sectmenus')[0].getElementsByTagName('ul')[0].getElementsByTagName('li');
							
		for (var item in menus) {
			menus[item].onmouseover = function() { this.oldclass = this.className; this.className = this.className+' hovered'; };
			menus[item].onmouseout  = function() { this.className = this.oldclass; };
		}
	});
