//
//	FLASH OBJECT            
//	---------------------------------
//	Insert flash code with flash detection, 
//	html alternative and fix eolas
//

//flash detection player version 6 and higher
var MM_contentVersion = 6;
var lastSection = "restaurace";
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}

//insert flash code
function insertFlashObj(fileName,w,h,params,bgc,flashContainer,wmode){
	if (bgc == ""){
		bgc = "ffffff";
	}
	var  flashSource = "";
	if ( MM_FlashCanPlay ) {
		flashSource += "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" ";
		flashSource += "id=\"flashItem\" width=\""+w+"\" height=\""+h+"\" border=\"0\">";
		flashSource += "<param name=\"movie\" value=\""+fileName+"\" /><param name=\"loop\" value=\"false\" /><param name=\"menu\" value=\"false\">";
		if (wmode) flashSource += "<param name=\"wmode\" value=\"transparent\">";
		flashSource += "<param name=\"quality\" value=\"high\" /><param name=\"scale\" value=\"noscale\" /><param name=\"salign\" value=\"lt\" /><param name=\"bgcolor\" value=\"#"+bgc+"\" />";
		if (params != "") flashSource += "<param name=\"flashvars\" value=\""+params+"\" />";
		flashSource += "<embed src=\""+fileName+"\" loop=\"false\" menu=\"false\" quality=\"high\" bgcolor=\"#"+bgc+"\"";
		if (wmode) flashSource += " wmode=\"transparent\"";
		flashSource += " swLiveConnect=\"false\" width=\""+w+"\" height=\""+h+"\" name=\"flashItem\"";
		flashSource += " type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"";
		if (params!="") flashSource += " flashvars=\""+params+"\"";
		flashSource += ">";
		flashSource += "</embed>";
		flashSource += "</object>";
		document.getElementById(flashContainer).innerHTML = flashSource;
	} else {
		document.getElementById("alternative").className = "visible";
	}
}

function section(sectionId){
	if (!document.getElementById)
		return false;
	document.getElementById(lastSection).className = "hidden";
	document.getElementById(sectionId).className = "visible";
	lastSection = sectionId;

}
