function InsertEmbed(file, width, height, type) {

	var str;
	switch (type) {

		case "swf" :

		str = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='"+width+"' height='"+height+"'>";
		str += "<param name=movie value='"+file+"'>";
		str += "<param name=quality value=high>";
		str += "<param name='wmode' value='transparent'>";
		str += "<param name='menu' value='false'>";
		str += "<embed src='"+file+"' quality=high wmode=transparent pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"' ></embed>";
		str += "</object>";
		break;

		case "vod" :

		var strWidth = (width != undefined && width != 0) ? "width="+width : "";
		var strHeight = (height != undefined && height != 0) ? "height="+height : "";

		str = "<object id='WMP' classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' "+strWidth+" "+strHeight+" type='application/x-oleobject ' align='center'>";
		str += "<param name='animationatstart' value='0'>";
		str += "<param NAME='autostart' value='1'>";
		str += "<param NAME='AutoSize' value='1'>";
		str += "<param NAME='EnableContextMenu' Value='0'>";
		str += "<param NAME='playCount' value='-1'>";
		str += "<param NAME='ShowStatusBar' VALUE='1'>";
		str += "<param NAME='ShowControls' VALUE='1'>";
		str += "<param NAME='ClickToPlay' VALUE='1'>";
		str += "<param NAME='TransparentAtStart' VALUE='1'>";
		str += "<param NAME='volume' VALUE='1'>";
		str += "<param NAME='loop' VALUE='1'>";
		str += "<param name='Filename' value='"+file+"'>";
		str += "<embed filename='"+file+"' TransparentAtStart=1 ShowControls=1 ClickToPlay=1 TransparentAtStart=1 playCount=-1 ShowStatusBar=1 AutoSize=1 EnableContextMenu=0 animationatstart=0 autostart=1 loop=1 volume=0 type='application/x-mplayer2' pluginspage = 'http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' "+strWidth+" "+strHeight+" ></embed>";
		str += "</object>";

		break;
	}
	document.write(str);
	return;
}