//////////////////////////////////////////////////////////////////////////////////////////
// Functions for the flash embedder user control.
//////////////////////////////////////////////////////////////////////////////////////////

function getParameterFromQueryString(parameterName)
{
	if(window.location.search != null && window.location.search.length > 0)
	{ 
		t=unescape(window.location.search);
		
		a=t.lastIndexOf(parameterName+"=")+(parameterName.length+1);
		if(a.length-(parameterName.length+1)==-1) 
		{
			return -1
		}
		b=t.substr(a);
		c=b.indexOf("&");
		if(c<0) {return b}
		else 
		{
			d=b.substring(0,c);
			return d
		}
	}
	
	return -1;
}


function activateInteractiveSeatingChart()
{
	if(parseInt(getParameterFromQueryString("installFlash")) != 1)
	{
		if(Sys.Browser.agent == Sys.Browser.Safari)
		{
			var openedWindow = window.open("http://www.macromedia.com/go/getflashplayer", "Get Flash Player");
		}
		else
		{
			if(window.location.href.indexOf("?") > -1)
				window.location = window.location.href + "&installFlash=1";
			else
				window.location = window.location.href + "?installFlash=1";
		}
	}
}
