var locationHref = location.href;
var winPop;
var _SWF = null;

function newHeight(newH)
{
	if (_SWF != null)
	{
		newH = newH + "px";
		_SWF.height = newH;
		_SWF.style.height = newH;
		pageFocus();
	}
}

function setPage(pagePath)
{
	var vendor = "" + navigator.vendor;
	if(vendor.indexOf("Apple") > -1) // Safari
	{
		doPassVar(pagePath);
	}
	else
	{
		cntPage = document.getElementById("pageHistory");
		cntPage.src = "history.aspx?pagePath=" + escape(pagePath);
	}
}

function doPassVar(pagePath)
{
	if(_SWF != null)
	{
		_SWF.SetVariable('/eventHandler:eventId', pagePath);
		_SWF.TCallLabel('/eventHandler', 'onEvent');
	}
}

function pageFocus()
{
	self.focus();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
	winPop = window.open(theURL,winName,features);
	winPop.focus();
}
				
function init()
{
	UFO.init();		
	if (readCookie("flashVersion") == null)
	{
		if (!UFO.hasFlashVersion(8, 0) && readCookie("flashVersion") != "8")
		{		
			window.location = "/flashdetect.htm";
		}
	}
	
	var winH = document.documentElement.clientHeight + "px";
	locationHref = location.href;
	var FO = { movie:"/Flash/SWF/index.swf", id:"flashMovieIndex", flashvars:"locationHref="+locationHref+"&langId="+lang+"&xmlPath=/Flash/XML/&startPageId="+startPageId, width:"100%", height:winH, scale:"noscale", loop:"false", bgcolor:"#E6EFF5", allowscriptaccess:"sameDomain", majorversion:"8", build:"0", xi:"true",allowfullscreen:"true",setcontainercss:"true" };
	UFO.create(FO, "gbgplusflash");	
}