<!--
/* Resolve the location */
var loc=String(this.location);

/* Remove slashes from path */
loc=loc.split("/");

/* This amazing little creature seems to essentially grab the name of the current page, and then the name of the current directory; it then proceeds to concatenate those two strings into one, whilst removing some of the characters. For example, www.mri.popinteractive.com/showroom/POP/pkg-3-and-4-designs.htm becomes 'POPpkg-3-and-4-designs' */
/* This drives the sub nav menu highlighting, based ont he entries contained in the subnav_events_ javascript files for each section  */

var locbit=loc[loc.length-1].split(".");
loc = loc[loc.length-2] + locbit[locbit.length-2];


/* Menu generating function */
function dyn_menu_gen(){
	for(var i=0; i<links.length; i++) {  
		if(loc==links[i])  {   
			document.write('<a href="' + links_url[i] + '" id="highlight" ' + links_style[i] + '>' + links_text[i] + '</a>' );  
		}  else  {   
			document.write('<a href="' + links_url[i] + '" ' + links_style[i] + '>' + links_text[i] + '</a>');  
		}  
	}
}
/* Generate the menu */
	dyn_menu_gen()
//-->