function activateTopNav(whichNav)
	{
	document.getElementById(whichNav).className = 'top_nav_item_active';
	}
	
function getUrlVars()
	{
	var qs = location.search.substring(1);
	var nv = qs.split('&');
	var url = new Object();
	for(i = 0; i < nv.length; i++)
		{
		var val = nv[i].split('=');
		url[val[0]] = val[1];
		/*eq = nv[i].indexOf('=');
		url[nv[i].substring(0,eq).toLowerCase()] = unescape(nv[i].substring(eq + 1));*/
		}
	return url;
	}
	
function updateSectionDesc(desc)
	{
	document.getElementById('section_desc').innerHTML = desc;
	}
	
function writeSwf(filename, w, h)
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+ (w+20) +'" height="'+ (h+36) +'" id="swf_player" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="swf/swf_player_shell.swf" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#ebd377" />');
	document.write('<param name="FlashVars" value="path='+filename+'" />');
	document.write('<embed src="swf/swf_player_shell.swf" FlashVars="path='+filename+'" quality="high" bgcolor="#ebd377" width="'+ (w+20) +'" height="'+ (h+36) +'" name="swf_player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function launchInteractive(section) {
	winWidth = 650;
	winHeight = 522;
	windowOptions = "toolbar=0,menubar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,width="+winWidth+",height="+winHeight+",top=" + (( screen.height - winHeight )/2) + ",left=" + (( screen.width - winWidth )/2 );
	windowName = "VirtualExhibition";
	thisDocument = section == "white" ? "interactive/index_flash_white.html" : "interactive/index_flash.html";
	//if (section == null){
	//	thisDocument += "?" + section;
	//}
	eval (windowName + "= window.open(thisDocument,\"" + windowName + "\",\"" + windowOptions + "\")");
}

var popUpWin=0; 

function popUpWindow(URLStr, width, height) { 
	if(popUpWin) { 
		if(!popUpWin.closed) popUpWin.close(); 
		} 
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+''); 
}
