// ----------------------------------------------------------------------------
// theo.lenaerts@opikanoba.com
// 08/2007
// javascript voor customisatie moodle site groenecursussen.opikanoba.com
// ----------------------------------------------------------------------------


// ----------------------------------------------------------------------------
// let op: parameter 'scale' is belangrijk
// scale - Possible values: showall, noborder, exactfit. 
//   "default" (Show all) makes the entire movie visible in the specified area without distortion, while maintaining the original aspect ratio of the movie. Borders may appear on two sides of the movie. 
//   "noorder" scales the movie to fill the specified area, without distortion but possibly with some cropping, while maintaining the original aspect ratio of the movie. 
//   "exactfit" makes the entire movie visible in the specified area without trying to preserve the original aspect ratio. Distortion may occur. 
// we kiezen hier 'default'
function opi_addFlash( file, base, width, height )
{
	var t = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \n';
	t += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"\n'; 
	t += 'id="flashObj" width="'+width+'" height="'+height+'" align="middle" VIEWASTEXT>\n';
	t += '<param name="allowScriptAccess" value="always" />\n';
	t += '<param name="movie" value="' + file + '" />\n';
	t += '<param name="base" value="' + base + '" />\n';
	t += '<param name="loop" value="false" />\n';
	t += '<param name="menu" value="false" />\n';
	t += '<param name="scale" value="default" />\n';
	t += '<param name="quality" value="high" />\n';
	t += '<param name="bgcolor" value="#ffffff" />\n';
	t += '<embed src="' + file + '" base="' + base + '" loop="false" menu="false" quality="high" bgcolor="#ffffff" \n';
	t += 'width="'+width+'" height="'+height+'" name="flashObj" align="middle" allowScriptAccess="always" scale="default"\n'; 
	t += 'type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n';
	t += '</object>\n';
	document.write( t );
	//alert(t);
}


