function insFlash(f, w, h) {
// will only function properly if Mook-fpi is properly imported as well
	if (!useRedirect) {		// if dynamic embedding is turned on
		if (hasRightVersion) {	// if we've detected an acceptable version
			var oeTags = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
			+ 'WIDTH="' + w + '" HEIGHT="' + h + '"'
			+ 'CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
			+ '<PARAM NAME="MOVIE" VALUE="media/flash/' + f + '.swf">'
			+ '<PARAM NAME="PLAY" VALUE="true">'
			+ '<PARAM NAME="LOOP" VALUE="true">'
			+ '<PARAM NAME="QUALITY" VALUE="high">'
			+ '<PARAM NAME="MENU" VALUE="false">'
			+ '<PARAM NAME="WMode" VALUE="Opaque">'
			+ '<EMBED src="media/flash' + f + '.swf"'
			+ 'WIDTH="' + w + '" HEIGHT="' + h + '"'
			+ 'PLAY="true"'
			+ 'LOOP="true"'
			+ 'QUALITY="high"'
			+ 'MENU="false"'
			+ 'TYPE="application/x-shockwave-flash"'
			+ 'PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'
			+ '</EMBED>'
			+ '</OBJECT>';
	
			document.write(oeTags); 	// embed the flash movie
		} else {	// flash is too old or we can't detect the plugin
			var alternateContent = '<IMG SRC="media/images/' + f + '.jpg" border="0">'	// height, width required!;
			document.write(alternateContent);	// insert non-flash content
		}
	}
}

function insWMV(f, as, sc) {
	var oeTags = '<OBJECT CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"'
	+ 'CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" ID="MediaPlayer" TYPE="application/x-oleobject">'
	+ '<PARAM NAME="filename" VALUE="media/video/' + f + '.wmv">'
	+ '<PARAM NAME="AUTOSTART" VALUE="' + as + '">'
	+ '<PARAM NAME="SHOWCONTROLS" VALUE="' + sc + '">'
	+ '<EMBED TYPE="application/x-mplayer2"  PLUGINSPAGE="http://www.microsoft.com/Windows/MediaPlayer/" NAME="MediaPlayer"'
	+ 'SRC="media/video' + f + '.wmv"'
	+ 'AUTOSTART="' + as + '"'
	+ 'SHOWCONTROLS="' + sc + '">'
	+ '</EMBED>'
	+ '</OBJECT>';
	document.write(oeTags);
}

