var MM_FlashCanPlay = 6;
function checkFlash(FLASHVERSION)
{

	var MM_contentVersion = FLASHVERSION;
	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]; 
	    }
		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');
		 }
	return MM_FlashCanPlay;
}



function CreateControl(DivID, CLSID, ObjectID,
                       WIDTH, HEIGHT, URL, AUTOSTART,VERVOLGURL,FLASHVERSION,IMG,WMODE)
{
	if(typeof(WMODE)=="undefined")
		WMODE = "";
	if(typeof(bgcolor)=="undefined" || bgcolor=="")
		bgcolor = "#99EBF9";
	var d = document.getElementById(DivID);

	if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.indexOf("Mac") != -1 ) 
	{ 
		location = "mac.html";
	}

	if(checkFlash(FLASHVERSION))
	{
		
		if(navigator.appName=="Microsoft Internet Explorer")
		{
			d.innerHTML = '<object style="display:inline;" classid=' + CLSID + ' id=' + ObjectID + ' width="' + WIDTH + '" height="' + HEIGHT +'" align=""><param name="wmode" value="opaque"><param name="wmode" value="opaque"><param name="menu" value="false"><param name="movie" value=' + URL + '><param name=quality value=high><param name=bgcolor value='+bgcolor+'><param name="autoStart" value=' + AUTOSTART + '/></object>';
		}
		else
		{
			d.innerHTML = '<EMBED src="'+URL+'" quality=high bgcolor='+bgcolor+'  WIDTH="'+WIDTH+'" HEIGHT="'+HEIGHT+'" ALIGN="" wmode="'+WMODE+'" menu="false" scale="exactfit" wmode="opaque" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>';
		}
	}
	else
	{
		if(IMG=="")
			location.href=VERVOLGURL;
		else
			d.innerHTML = '<img src="'+IMG+'" width="'+WIDTH+'" height="'+HEIGHT+'">';
	}
	bgcolor = "";
}


