
// JavaScript InsertObject functions

	function InsertObjectMOV(doc,c,fn,w,h,auto)
	{
		// Quicktime
		if( (typeof doc != 'undefined') && (typeof c != 'undefined') && (typeof fn != 'undefined') )
		{
			if(typeof w == 'undefined')
				w = 320;
			if(typeof h == 'undefined')
				h = 255;
			if(typeof auto == 'undefined')
				auto = "true";
			doc.writeln("<object width='" + w + "' height='" + h + "' classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' codebase='http://www.apple.com/qtactivex/qtplugin.cab'>");
			doc.writeln("<param name='src' value='../media/" + c + "/" + fn+ "'>");
			doc.writeln("<param name='controller' value='true'>");
			doc.writeln("<param name='autoplay' value='" + auto + "'>");
			doc.writeln("<param name='target' value='myself'>");
			doc.writeln("<param name='pluginspage' value='http://www.apple.com/quicktime/download/'>");
			doc.writeln("<embed ");
			doc.writeln("height='" + h + "' ");
			doc.writeln("width='" + w + "' ");
			doc.writeln("controller='true' ");
			doc.writeln("autoplay='" + auto + "' ");
			doc.writeln("target='myself' ");
			doc.writeln("src='../media/" + c + "/" + fn+ "' ");
			doc.writeln("bgcolor='#000000' ");
			doc.writeln("border='0' ");
			doc.writeln("pluginspage='http://www.apple.com/quicktime/download/indext.html'></embed>");
			doc.writeln("</object>");
		}
	else
		alert("Must provide document reference, course ID, and filename");
	}

	function InsertObjectSWF(doc,c,fn,w,h)
	{
		// Quicktime
		if( (typeof doc != 'undefined') && (typeof c != 'undefined') && (typeof fn != 'undefined') )
		{
			if(typeof w == 'undefined')
				w = 320;
			if(typeof h == 'undefined')
				h = 255;
			if(typeof auto == 'undefined')
				auto = "true";
			doc.writeln("<object width='" + w + "' height='" + h + "' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab'>");
			doc.writeln("<param name='src' value='../media/" + c + "/" + fn+ "'>");
			doc.writeln("<param name='target' value='myself'>");
			doc.writeln("<param name='quality' value='high'>");
			doc.writeln("<param name='pluginspage' value='http://www.macromedia.com/go/getflashplayer'>");
			doc.writeln("<embed ");
			doc.writeln("height='" + h + "' ");
			doc.writeln("width='" + w + "' ");
			doc.writeln("target='myself' ");
			doc.writeln("src='../media/" + c + "/" + fn+ "' ");
			doc.writeln("bgcolor='#FFFFFF' ");
			doc.writeln("TYPE='application/x-shockwave-flash'");
			doc.writeln("quality='high'");
			doc.writeln("pluginspage='http://www.macromedia.com/go/getflashplayer'></embed>");
			doc.writeln("</object>");
		}
	else
		alert("Must provide document reference, course ID, and filename");
	}
