if (window.attachEvent) {window.attachEvent('onload', shared);}
else {window.addEventListener('load', shared, false);}

function shared() {
	topnav();	
}

function topnav() {
	if (document.getElementById('topnav')) {
		var lis = document.getElementById('topnav').getElementsByTagName('li');
		for (i=0;i<lis.length;i++) {
			if (lis[i].className.search(/\btoplvl\b/) != -1) {
				lis[i].onmouseover = function() {
					if (this.className.search(/\bopen\b/) == -1) {
						this.className += ' open';	
					}
				}
				lis[i].onmouseout = function() {
					if (this.className.search(/\bopen\b/) != -1) {
						this.className = this.className.replace(/\bopen\b/g,'');	
					}
				}
			}
		}
	}
}
