/* The following functions are callbacks from the flash menu */
function swfGoHome(str) 
{
	document.getElementById("status").innerHTML = "Home";
}
function swfSelectWork(workId) 
{
	//alert(base_url + 'page/exhibition/516/' + workId);
	updatePage(base_url + 'page/exhibition/516/' + workId);
	//document.getElementById("status").innerHTML = "Selected work: " + workId;
}
function swfSelectEvent(eventId) 
{
	//alert('swfSelectEvent');
	updatePage(base_url + 'page/event/517/' + eventId);
}
function swfSelectExternalEvent(eventId) 
{
	//alert('swfSelectExternalEvent');
	
}

/* The following functions are wrappers for functions in the flash menu */
function jsGoHome() 
{
	//getMovieName("menu").jsGoHome();
}
function jsSelectWork(workId) 
{
	getMovieName("menu").jsSelectWork(workId);
}
function jsSetActiveWork(workId) 
{
	getMovieName("menu").jsSetActiveWork(workId);
}
function jsSetTranslations(values)
{
	getMovieName("menu").jsSetTranslations( values );
}

/* This utility function resolves the string movieName to a Flash object reference based on browser type. */
function getMovieName(movieName) 
{
	if (navigator.appName.indexOf("Microsoft") != -1) 
	{
		return window[movieName]
	}
	else 
	{
		return document[movieName]
	}
}  
