/*

	copyright Edwin de Vries - Add Noise 2003
	
	en

	copyright Anne Draaisma 2002
	anne@nextbuilding.com
	
*/

var d = document;
var n = navigator;
var plugin =	(n.mimeTypes && n.mimeTypes["application/x-shockwave-flash"]) ?
				n.mimeTypes["application/x-shockwave-flash"].enabledPlugin :
				0;

if (plugin)
{
	plugin = parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 5;
}
else if (n.userAgent &&
	n.userAgent.indexOf("MSIE") >= 0 &&
	(n.userAgent.indexOf("Windows 95") >= 0 ||
	n.userAgent.indexOf("Windows 98") >= 0 ||
	n.userAgent.indexOf("Windows NT") >= 0))
{
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
	document.write('</SCRIPT\> \n');
}

/*
	flash (flashUrl, imgUrl, width, height, play, loop, menu, quality)
	
	Embeds een flash 5 filmpje in je html pagina.
	flashUrl = string "movie.swf"
	imgUrl = string "movie.gif" (alternatief, als flash of javascript niet ingeschakeld is bij de client)
	width en height = integer, breedte en hoogte :))
	play = BOOL, filmpje starten ja of nee
	loop = BOOL, loopen of niet
	menu = BOOL, menu tonen of niet
	quality = string "high, autohigh, low of medium"
*/

function flash (flashUrl, imgUrl, width, height, play, loop, menu, quality)
{
	if (plugin)
	{
		op = '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ALIGN="LEFT"'
		 + 'WIDTH="' + width + '" HEIGHT="' + height + '"'
		 + 'CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
		 + '<PARAM NAME="MOVIE" VALUE="' + flashUrl + '">'
		 + '<PARAM NAME="PLAY" VALUE="' + play + '">'
		 + '<PARAM NAME="LOOP" VALUE="' + loop + '">'
		 + '<PARAM NAME="QUALITY" VALUE="' + quality + '">'
		 + '<PARAM NAME="MENU" VALUE="' + menu + '">'
		 + '<EMBED SRC="' + flashUrl + '"'
		 + 'WIDTH="' + width + '" HEIGHT="' + height + '"'
		 + 'PLAY="' + play + '"'
		 + 'LOOP="' + loop + '"'
		 + 'QUALITY="' + quality + '"'
		 + 'MENU="' + menu + '"'
		 + 'TYPE="application/x-shockwave-flash"'
		 + 'PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'
		 + '</EMBED>'
		 + '</OBJECT>';
		d.write (op);
	}
	else if (!(n.appName &&
		n.appName.indexOf("Netscape") >= 0 &&
		n.appVersion.indexOf("2.") >= 0))
	{
		d.write ('<IMG SRC="' + imgUrl + '">');
	}
}

