var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);

var NS6 = (bName == "Netscape" && bVer >= 5);
var IE = document.all ? 1 : 0;
//var IE = (bName == "Microsoft Internet Explorer" && bVer >= 4);

function belso_writeFlash(objName,openID)
{
	var skip = "";
	if(location.search.indexOf("skipIntro=false") == -1)
		skip = "&skipIntro=true";

	if(NS6)
		write_out_flash(objName,'/belso2.swf', 200, 600,"?openID=" + openID + skip);
	else
		write_out_flash(objName,'/belso2.swf', 200, 600, "");
}

function belso_onload(objName,openID)
{
	// when sending more than one variable, send the 'openID' variable last!
	if(NS6)
		return;

	if(location.search.indexOf("skipIntro=false") != -1)
		send_data(objName,"openID",openID);
	else
		send_data(objName,"skipIntro","true","openID",openID);
}

function folap_writeFlash(objName,lang)
{
	var skip = "";
	if(location.search.indexOf("skipIntro=true") != -1)
		skip = "&skipIntro=true";

	if(NS6)
		write_out_flash(objName,'/folapmenu.swf', 473, 430, "?lang=" + lang + skip);
	else
		write_out_flash(objName,'/folapmenu.swf', 473, 430, "");
}

function folap_onload(objName,language)
{
	// when sending more than one variable, send the 'lang' variable last!
	if(NS6)
		return;

	if(location.search.indexOf("skipIntro=true") != -1)
		send_data(objName,"skipIntro","true","lang",language);
	else
		send_data(objName,"lang",language);
}

function send_data()
{
	if (!NS6 && arguments.length >= 3)
	{
		var flashObj = eval("document." + arguments[0]);
		for (i=1; i<arguments.length; i+=2)
		{
			flashObj.SetVariable(arguments[i], arguments[i+1]);
		}
	}
}

function write_out_flash(object_name, swf_name, width, height, qString)
{
	if (NS6)
		document.write('<OBJECT id="' + object_name + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"  WIDTH='  + width +' HEIGHT=' + height +'>  <PARAM NAME=movie VALUE="' + swf_name + qString + '"><PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED name="' + object_name + '"  src="' + swf_name + qString + '" quality=high swLiveConnect=true bgcolor=#FFFFFF  WIDTH=' + width + ' HEIGHT=' + height + ' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>');
	else
	  if (IE)
		document.write('<OBJECT id="' + object_name + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"  WIDTH='  + width +' HEIGHT=' + height +'>  <PARAM NAME=movie VALUE="' + swf_name + '"><PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED name="' + object_name + '"  src="' + swf_name + '" quality=high swLiveConnect=true bgcolor=#FFFFFF  WIDTH=' + width + ' HEIGHT=' + height + ' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>');
		
}

