// ------------ LOAD TEASER FUNCTIE

var flashVersion = 6;
var flashPlugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( flashPlugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var pluginVersion = words[i]; 
	    }
	var flashCanPlay = pluginVersion >= flashVersion;
}
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('flashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & flashVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}

// Schrijf flash object (als juiste plugin aanwezig is)

function writeFlashTeaser(pad, dataRef, kleur) {
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');
	document.write(' ID="vitrine_na_expositie" WIDTH="880" HEIGHT="510" ALIGN="">');
	document.write(' <PARAM NAME=movie VALUE="' + pad + '"> <PARAM NAME=FlashVars VALUE="data_xml=' + dataRef + '&themeColor=' + kleur + '"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> '); 
	document.write(' <EMBED src="' + pad + '" quality=high bgcolor=#FFFFFF  FlashVars="data_xml=' + dataRef + '&themeColor=' + kleur + '"  WIDTH="880" HEIGHT="510" NAME="vitrine_na_expositie" ALIGN=""');
 	document.write('TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
	document.write(' </OBJECT>\n');
}

// Geen behoefte aan een alternatief voor flash (als juiste plugin aanwezig is)
function showAltTeaser() {
	eval ("setEltVisibility (getElt('altTeaserLayer'), 'visible')");
	eval ("setEltVisibility (getElt('mainMenuLayer'), 'visible')");
}

// ------------------------------
