
		function DivSetVisible(divid, divshimid) {
		  if(document.all && (navigator.userAgent.indexOf("Opera") == -1)) {
		  		
		      var DivRef = document.getElementById(divid);
		      var IfrRef = document.getElementById(divshimid); 

		      DivRef.style.display = "block";

		      IfrRef.style.width = DivRef.offsetWidth;
		      IfrRef.style.height = DivRef.offsetHeight - 2;
		      IfrRef.style.top = DivRef.style.top;
		      IfrRef.style.left = DivRef.style.left;
		      IfrRef.style.zIndex = DivRef.style.zIndex - 1;
		      IfrRef.style.display = "block";
		 	}
		}
		function DivSetInvisible(divid, divshimid) {
		   if(document.all && (navigator.userAgent.indexOf("Opera") == -1)) {
		      var DivRef = document.getElementById(divid);
		      var IfrRef = document.getElementById(divshimid);
		      DivRef.style.display = "none";
		      IfrRef.style.display = "none";
		   }
		}

		EPSSite = {};

		EPSSite._menu = Class.create();
		EPSSite._menu.prototype = {

		initialize: function() {
			// initialize the dom elements ondomready
			Event.onDOMReady( function() {			
				var menuid=1;
				var menuno=1;
				var menuwidths=$A([76,41,58,138,118,97,57,55]);
				//console.log(menuwidths[1]);
				
				mainMenu.subMenus.each(function(mainname)
				{
					var topmenutxt='';
					if(menuid!=1) topmenutxt+='<li class="headdivide"></li>';
					topmenutxt+='<li id="nav' + menuid + '" class="topnavhead" onMouseOver="this.className=\'sfhover\';';
					if (mainname.menuItems.length>0) topmenutxt+=' DivSetVisible(\'navitem' + menuno + '\', \'ulShim' + menuno + '\'); ';

					 topmenutxt+='" onMouseOut="this.className=\'topnavhead\';';
					 
					 if (mainname.menuItems.length>0)topmenutxt+=' DivSetInvisible(\'navitem' + menuno + '\', \'ulShim' + menuno + '\');';

					 topmenutxt+='" style="width: ' + menuwidths[menuid-1] + 'px;"><a href="' + mainname.urlValue + '" class="headnavref">' + mainname.name + '</a></li>';
					
					//console.log(topmenutxt);
					new Insertion.Bottom('topnav', topmenutxt);
					if (mainname.menuItems.length>0) {
						//console.log('<ul id="navitem' + menuno + '"></ul><iframe id="ulShim' + menuno + '" src="/2005redesign/iframe_blank.html" scrolling="no" frameborder="0" style="position:absolute; top:0px; left:0px; display:none;"></iframe>');
						new Insertion.Bottom('nav' + menuid, '<ul style="z-index:80" id="navitem' + menuno + '"></ul><iframe id="ulShim' + menuno + '" src="/2005redesign/iframe_blank.html" scrolling="no" frameborder="0" style="position:absolute; top:0px; left:0px; display:none;"></iframe>');
						mainname.menuItems.each(function(subitems) {						
							new Insertion.Bottom('navitem' + menuno, '<li><a href="' + subitems.urlValue + '">' + subitems.menuItemName + '</a></li>');
							});		 	
						menuno++;
						}
					menuid++;	
					});
				});
			}
		}
		
		EPSSite.menu = new EPSSite._menu();