// JavaScript Document
function writeFlashObjectTag(name, width, height, bgcolor)
{
	var widthstr = '100%';
	if (width > 0)
	{
		widthstr = width;
	}
	
	var heightstr = '100%';
	if (height > 0)
	{
		heightstr = height;
	}
	
	var iebgcolorstr = '';
	var nsbgcolorstr = '';
	if (bgcolor)
	{
		iebgcolorstr = '<PARAM NAME=bgcolor VALUE=#' + bgcolor + '> ';
		nsbgcolorstr = ' bgcolor=#' + bgcolor;
	}
	
	var oeTags = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
	 + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"'
	 + 'WIDTH="' + widthstr + '" '
	 + 'HEIGHT="' + heightstr + '" '
	 + 'id="' + name + '" '
	 + 'ALIGN="">'
	 + '<param name="allowScriptAccess" value="sameDomain" /> '
	 + '<PARAM NAME=movie VALUE="' + name
	 + '.swf"> <PARAM NAME=quality VALUE=high> '
	 + iebgcolorstr
	 // + '<PARAM NAME=bgcolor VALUE=#' + bgcolorstr + '> '
	 + '<EMBED src="' + name
	 + '.swf" quality=high'
	 + nsbgcolorstr
	 // + ' bgcolor=#' + bgcolorstr
	 + ' WIDTH="' + widthstr
	 + '" HEIGHT="' + heightstr
	 + '" NAME="' + name
	 + '" ALIGN=""'
	 + 'TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>'
	 + '</OBJECT>';
	document.write(oeTags);
}

function writeQTObjectTag(name, width, height)
{
	var widthstr = '500';
	if (width > 0)
	{
		widthstr = width;
	}
	
	var heightstr = '400';
	if (height > 0)
	{
		heightstr = height;
	}
	
	var oeTags = '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"'
	 + 'codebase="http://www.apple.com/qtactivex/qtplugin.cab"'
	 + 'width="' + widthstr + '" '
	 + 'height="' + heightstr + '"> '
	 + '<param name="SRC" value="' + name + '.mov" /> '
	 + '<param name="AUTOPLAY" value="true" /> '
	 + '<param name="KIOSKMODE" value="false" /> '
	 + '<param name="CACHE" value="true" /> '
	 + '<param name="CONTROLLER" value="true" /> '
	 + '<embed src="' + name
	 + '.mov"'
	 + ' width="' + widthstr
	 + '" height="' + heightstr
	 + '" autoplay="true" controller="true" kioskmode="false" cache="true" pluginspage="http://www.apple.com/quicktime/download/"></embed>'
	 + '</object>';
	document.write(oeTags);
}