window.addEvent('domready', function() {
									 
/*	$('header').addEvent('mouseover', function(event) {toggleMenu($$('.navItem UL UL'), 'off');});
	
	var navItems = $(document.body).getElements('LI.navItem');
	navItems.each(function(itm,idx){
		itm.addEvent('mouseenter', function(event) {toggleMenu(this, 'on');});	
    });
	
	var navSubItems = $$('.navItem UL');
	navSubItems.each(function(itm,idx){
		var offset = (itm.getParent().getSize().x - itm.getSize().x) / 2
		itm.setStyle('left', offset);
		itm.set('reveal', {duration: 250}).dissolve();
		itm.addEvent('mouseleave', function(){toggleMenu(this.getParent(), 'off')})
	});*/

});

function toggleMenu(itm, state){
	
	//Hide any currently open menus
	$$('.navItem UL').each(function(itm,idx){
		if(itm.style.display == "block"){itm.dissolve()};
	});
	
	var menuTarget = itm.getElements('ul');
	if (menuTarget[0]){
		if (state == 'off'){
			menuTarget.dissolve();
		}else if(state == 'on'){
			menuTarget.reveal();
		}else{
			menuTarget[0].style.display == "block" ? menuTarget.dissolve() : menuTarget.reveal();
		}
	}
}

//MOD JF
function openWin(name,location,width,height)
{

	if (window.showModalDialog) 	
	{
		//some browsers will let you do this
		window.showModalDialog(location,name,"dialogWidth:"+width+"px;dialogHeight:"+height+"px;scroll:auto;unadorned:no;");
	}
	else
	{
		//otherwise there is no way around the pop-up blocker
		window.open(location,name,"height="+height+",width="+width+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,left=325,top=0");
	}
}
//END MOD JF

function applyFilter(myDDL)
{
    //allows industry filter to switch pages for demo
    var myindex = myDDL.selectedIndex;
    var myURL = myDDL.options[myindex].value;
    if(myURL !="")
    {
        top.location.href = myURL;
    }
}

function multiMenu(linker)
{
	linker.each(function(itm,idx){
		var myKids = itm.getChildren('ul');
		var activeKids = myKids.getChildren('li.active');
		
		if (myKids != ""){		
			if (activeKids[0] == ""){
				myKids.set('reveal', {duration: 500}).dissolve();				
			}

			itm.addEvent('click', function(event) {
				event.stopPropagation();
				myKids[0].style.display == "block" ? myKids.dissolve() : myKids.reveal();
			});
		}
	});
};
