function embedFlash(file,width,height,allowfs,base) 
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="'+ file +'" align="middle" height="'+ height +'" width="'+ width +'">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain">');
	document.write('<param name="movie" value="'+ file +'.swf">');
	document.write('<param name="allowFullScreen" value="'+ allowfs +'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="bgcolor" value="#f1f0ef">');
	document.write('<param name="base" value="'+ base +'">');
	document.write('<embed src="'+ file +'.swf" quality="high" bgcolor="#f1f0ef" name="'+file+'" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" base="'+ base +'" align="middle" allowFullScreen="'+ allowfs +'" height="'+ height +'" width="'+ width +'" ></embed>');
	document.write('<br />');
	document.write('</object>');
}
function detectFlashVersion()
{
	// Detect flash version
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description){
			PlayerVersion = (x.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".")[0]);
		} else PlayerVersion = 0;
	} else if (window.ActiveXObject){
		try {
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			PlayerVersion = (axo.GetVariable("$version").split(" ")[1].split(",")[0]);
		} catch (e) {
			PlayerVersion = 0;
		}
	}
	if((!PlayerVersion) || (PlayerVersion < 9)) {
		
		cf = confirm('Du har ikke den seneste version af Flash installeret\nKlik OK for at gå til Adobes hjemmeside og installer.\nHvis du vælger Annuller vil du ikke kunne se animationen.');
		if(cf) {
			location.href = 'http://www.adobe.com/go/getflashplayer/','AdobeFlash';
		} else {
			return false
		}
	}
}
