//alert("linked"+navigator.userAgent);
function detectFlash()
{
	if ((navigator.userAgent.indexOf('MSIE') != -1)
		&& (navigator.userAgent.indexOf('Win') != -1))
	{
		document.writeln('<script language="VBscript">');
		document.writeln('Private i, x, ControlVersion');
		document.writeln('ON ERROR RESUME NEXT');
		document.writeln('x = null');
		document.writeln('ControlVersion = 0');
		document.writeln('var Flashmode');
		document.writeln('FlashMode = False');
		document.writeln('For i = 9 To 1 Step -1');
		document.writeln('	Set x = CreateObject("ShockwaveFlash.ShockwaveFlash." & i)');
		document.writeln('	ControlInstalled = IsObject(x)');
		document.writeln('	If ControlInstalled Then');
		document.writeln('		flash = CStr(i)');
		document.writeln('		Exit For');
		document.writeln('	End If');
		document.writeln('Next');
		document.writeln('</scr' + 'ipt>');

		// VB check failed
		// TODO: use alternative check
		if (flash == 0)
		{
			flash = 7;
		}
	} else {
		if (navigator.plugins && navigator.plugins.length > 0)
		{
			if (navigator.plugins["Shockwave Flash"])
			{
				flash = navigator.plugins["Shockwave Flash"].description;
				flashlong = flash;
				flashlong = flash.substring(flash.indexOf(".")-2, flash.indexOf("."));
				if(flashlong == 10)
				{
					flash = flashlong;
				}
				else
				{
					flash = flash.substring(flash.indexOf(".")-1);
				}
			}
		}
	}
	return parseInt(flash);
}

function maaktitel(text,width,height,target,size){
	var title = new String(text)
	title = escape(title);
	var agt=navigator.userAgent;
	var is_major = parseInt(navigator.appVersion);
	var is_minor = parseFloat(navigator.appVersion);
	var goodVersion = 7;
	var headerClass = "kop";
	var flashPath = "/images/flash/fl_header.swf";
	if(size && size == 'big')
	{
		var flashPath = "/images/flash/fl_header3.swf";
	} else if(size && size == 'medium')
	{
		var flashPath = "/images/flash/fl_header2.swf";
	}
	var _width = 533;
	var _height = 33;
	if(width && width!= null){
		_width = width;
	}
	if(height && height!= null){
		_height = height;
	}

	deadBrowser = ( navigator.appName.indexOf('Netscape')!=-1 && is_major < 5);

	if ((detectFlash()>= goodVersion ) && !deadBrowser) {
		hoppSWF(target, flashPath, _width, _height, 'titel='+title);
		/*outputHTML = '<object id="" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" style="width: '+_width+'px; height: '+_height+'px; text-align: center;">';
		outputHTML += '<param name="allowScriptAccess" value="always" />';
		outputHTML += '<param name="movie" value="'+flashPath+'?titel='+title+'" />';
		outputHTML += '<param name="quality" value="high" />';
		outputHTML += '<param name="wmode" value="transparent" />';
		outputHTML += '<param name="flashvars" value="titel='+title+'" />';
		outputHTML += '<embed src="'+flashPath+'?titel='+title+'" quality="high" style="width: '+_width+'px; height: '+_height+'px;" name="flashcontent" align="middle" allowscriptaccess="always" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
		outputHTML += '</object>';

		document.getElementById(target).innerHTML = outputHTML;*/
		//var o_swfObject = swfobject.createSWF({data: flashPath, width: _width, height: _height}, {flashvars:"titel="+title, wmode: "transparent",quality: "high"}, target);
	} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
		outputHTML = '<span class='+ headerClass +'> '+text+'</span>';
		document.getElementById(target).innerHTML = outputHTML;
	}
}

