function write_flash( ) {

	//filename, vWidth, vHeight, id
	a=write_flash.arguments
	filename = a[0];
	vWidth = a[1];
	vHeight = a[2];
	id = a[3];

	document.write("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ");
	document.write(" codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' ");
	document.write(" WIDTH='" + vWidth + "' HEIGHT='" + vHeight +"' id='" + id + "' ALIGN=''>");
	document.write("<PARAM NAME=movie VALUE='" + filename + "'>");
	document.write("<PARAM NAME=quality VALUE=best><PARAM NAME=bgcolor VALUE=#FFFFFF>");
	for(i=4;i<(a.length-1);i+=2) {
		if(a[i] != null) {
			document.write("<PARAM NAME='" + a[i] + "'" );
			document.write("<PARAM VALUE='" + a[i+1] + "'" );
		}
	}	
	document.write("<EMBED src='" + filename + "' quality=best bgcolor='#FFFFFF' ");
	document.write(" WIDTH='" + vWidth + "' HEIGHT='" + vHeight + "' NAME='" + id + "' ALIGN='' ");
	for(i=4;i<(a.length-1);i+=2) {
		if(a[i] != null) {
			document.write(" " + a[i] +"='"+ a[i+1] + "' " );
		}
	}	
	document.write(" TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED>");
	document.write("</OBJECT>");
}	

function Createflash(w,h,movie,ids){
 var strflash = "<OBJECT id="+ids+" codeBase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 height="+h+" width="+w+" align=middle classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000>";
 strflash = strflash + "<PARAM NAME='_cx' VALUE='25400'>";
 strflash = strflash + "<PARAM NAME='_cy' VALUE='9260'>";
 strflash = strflash + "<PARAM NAME='FlashVars' VALUE=''>";
 strflash = strflash + "<PARAM NAME='Movie' VALUE='"+movie+"'>";
 strflash = strflash + "<PARAM NAME='Src' VALUE='"+movie+"'>";
 strflash = strflash + "<PARAM NAME='WMode' VALUE='Transparent'>";
 strflash = strflash + "<PARAM NAME='Play' VALUE='-1'>";
 strflash = strflash + "<PARAM NAME='Loop' VALUE='-1'>";
 strflash = strflash + "<PARAM NAME='Quality' VALUE='High'>";
 strflash = strflash + "<PARAM NAME='SAlign' VALUE=''>";
 strflash = strflash + "<PARAM NAME='Menu' VALUE='-1'>";
 strflash = strflash + "<PARAM NAME='Base' VALUE=''>";
 strflash = strflash + "<PARAM NAME='AllowScriptAccess' VALUE='sameDomain'>";
 strflash = strflash + "<PARAM NAME='Scale' VALUE='ShowAll'>";
 strflash = strflash + "<PARAM NAME='DeviceFont' VALUE='0'>";
 strflash = strflash + "<PARAM NAME='EmbedMovie' VALUE='0'>";
 strflash = strflash + "<PARAM NAME='BGColor' VALUE=''>";
 strflash = strflash + "<PARAM NAME='SWRemote' VALUE=''>";
 strflash = strflash + "<PARAM NAME='MovieData' VALUE=''>";
 strflash = strflash + "<PARAM NAME='SeamlessTabbing' VALUE='1'>";
 strflash = strflash + "<PARAM NAME='Profile' VALUE='0'>";
 strflash = strflash + "<PARAM NAME='ProfileAddress' VALUE=''>";
 strflash = strflash + "<PARAM NAME='ProfilePort' VALUE='0'>";
 strflash = strflash + "<embed src='"+movie+"' quality='high' wmode='transparent' width='"+w+"' height='"+h+"' name='"+ids+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
 strflash = strflash + "</OBJECT>";
 document.write(strflash);

}

function write_player( ) {

	//filename, vWidth, vHeight, id
	a=write_player.arguments
	url = a[0];
	vWidth = a[1];
	vHeight = a[2];

	document.write("<object classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95'");
	document.write(" codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'");
	document.write(" id='MMPlayer' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'");
	document.write(" width='"+ vWidth +"' height='"+ vHeight +"'");
	document.write(" vspace='5' hspace='5' align='middle'>");
	document.write(" <param name='Autostart' value='True'>");
	document.write(" <param name='DefaultFrame' value='Slide'>");
	document.write(" <param name='FileName' value='" + url + "'>");
	document.write(" <param name='ShowControls' value='True'>");
	document.write(" <param name='ShowDisplay' value='False'>");
	document.write(" <param name='ShowStatusBar' value='False'>");
	document.write(" <param name='showPosition' value='False'>");
	document.write(" <param name='loop' value='1'>");
	document.write("</object>");
}	
 
 
