var flashinstalled = 0, flashversion = 0;
function fdetect() {
	if (navigator.plugins && navigator.plugins.length) {
		var x = navigator.plugins["Shockwave Flash"];
		if (x) {
			flashinstalled = 2;
			if (x.description) {
				// y = ;
				// flashversion = y.charAt(y.indexOf('.')-1);
				flashversion = x.description.match(/^.* ([0-9]+)\./)[1];
			}
		} else
			flashinstalled = 1; // onbekend
			if (navigator.plugins["Shockwave Flash 2.0"]) {
				flashinstalled = 2;
				flashversion = 2;
			}
	} else if (navigator.mimeTypes && navigator.mimeTypes.length) {
		var x = navigator.mimeTypes['application/x-shockwave-flash'];
		if (x && x.enabledPlugin)
			flashinstalled = 2;
		else
			flashinstalled = 1;
	} else { // IE, 4+
		for (var i=20; i>0; i--) {
			flashversion = 0;
			try {
				var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
				flashversion = i;
				flashinstalled = 2;
				return;
			}
			catch(e){
				flashinstalled = 1;
			}
		}
	}
}
fdetect();
var flash_kan = (flashinstalled == 2 && flashversion > 4) ? true : false;
function plaatoffilm(plaat, film, pw, ph, fw, fh) {
	if (flash_kan) {
		document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" style="width: '+fw+'px; height: '+fh+'px">');
		document.writeln('<param name="movie" value="'+film+'" \/>');
		document.writeln('<param name="quality" value="high" \/>');
		document.writeln('<param name="bgcolor" value="#993300" \/>');
		document.writeln('<embed src="'+film+'" quality="high" bgcolor="#993300" style="width: '+fw+'px; height: '+fh+'px" type="application/x-shockwave-flash"><\/embed>');
		document.writeln('<\/object>');
	} else {
		document.writeln('<img src="'+plaat+'" width="'+pw+'" height="'+ph+'" alt="" id="hetplaatje" \/><\/a>');
	}
}

