activateMenu = function(nav) {
    /* currentStyle restricts the Javascript to IE only */
	if (document.all && document.getElementById(nav).currentStyle) {  
		var navroot = document.getElementById(nav);
        /* Get all the list items within the menu */
        var lis=navroot.getElementsByTagName("LI");  
		for (i=0; i<lis.length; i++) {
			/*alert(i);*/
            lis[i].onmouseover=function() {
				/*alert('over');*/
				this.className += (this.className?' ':'') + 'CSStoHighlight';
				for( var x = 0; this.childNodes[x]; x++ ){
					if( this.childNodes[x].tagName == 'UL' ) { this.childNodes[x].className += (this.childNodes[x].className?' ':'') + 'CSStoShow'; }
					if( this.childNodes[x].tagName == 'A' ) { this.childNodes[x].className += (this.childNodes[x].className?' ':'') + 'CSStoHighLink'; }
					}
				}
			lis[i].onmouseout=function() {  
				/*alert('out');*/
				this.className = this.className.replace(/ ?CSStoHighlight$/,'');
				for( var x = 0; this.childNodes[x]; x++ ){
					if( this.childNodes[x].tagName == 'UL' ) { this.childNodes[x].className = this.childNodes[x].className.replace(/ ?CSStoShow$/,''); }
					if( this.childNodes[x].tagName == 'A' ) { this.childNodes[x].className = this.childNodes[x].className.replace(/ ?CSStoHighLink$/,''); }
					}
				}
		}
	}
}

window.onload= function(){
	var ag=navigator.userAgent
	var isIE=ag.indexOf('compatible') && ag.indexOf('MSIE') && !(ag.indexOf('Opera')>-1)
	if(isIE)
	{
		var reIE=new RegExp("MSIE (\\d+\\.\\d+);");
		reIE.test(ag)
		var IEv=parseFloat(RegExp["$1"]);
		if (IEv>=5 && IEv<6.5)
		{
			activateMenu('topmenu');
		}
	}
}

