function AppendMenuMouseEvents() {
	if (document.getElementById) {
		var navUl = document.getElementById("topmenulist");
        var navLI = navUl.getElementsByTagName('LI');
        var text_to_display = '';
		for (i=0; i<navLI.length; i++) {
            if (navLI[i].className.indexOf('image') != -1) {
                var navA = navLI[i].getElementsByTagName("A");
                for (a = 0; a < navA.length; a++) {
                    navA[a].onmouseover = function() {
                        var span = this.getElementsByTagName('SPAN');
                        if (span.length > 0)
                        {
                            if (span[0].hasChildNodes())
                            {
                                displayServiceName(span[0].firstChild.nodeValue);
                            }
                        }
                    }
                    navA[a].onmouseout = function() { 
                        hideServiceName();
                    }
                }
            }
		} 
	}
}
function displayServiceName(text) {
	if (document.getElementById) {
        var topmenu_popup = document.getElementById('topmenu_popup');
        var topmenu_popup_text = document.getElementById('topmenu_popup_text');
        if (topmenu_popup)
        {
            topmenu_popup.onmouseover = function() {
                this.style.display = "block";
            }
            topmenu_popup.onmouseout = function() {
                this.style.display = "none";
            }
            if (topmenu_popup_text.firstChild)
            {
                topmenu_popup_text.firstChild.nodeValue = text;
            }
            else
            {
                topmenu_popup_text.appendChild(document.createTextNode(text));
            }
            topmenu_popup.style.display = "block";
        }
	}
}
function hideServiceName() {
	if (document.getElementById) {
        var topmenu_popup = document.getElementById('topmenu_popup');
        if (topmenu_popup)
        {
            topmenu_popup.style.display = "none";
        }
	}
}

addEvent(window,"load",AppendMenuMouseEvents);