function createFlash(src, width, height, version){
	var sFlash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=(version)" width="(width)" height="(height)">  <param name="movie" value="(src)" />  <param name="quality" value="high" />  <embed src="(src)" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="(width)" height="(height)"></embed> </object>';
	if (!src) src = "left.swf";
	if (!width) width = "185";
	if (!height) height = "455";	
	if (!version) version = "8,0,0,0";
	sFlash = sFlash.replace("(src)", src);
	sFlash = sFlash.replace("(width)", width);
	sFlash = sFlash.replace("(height)", height);
	sFlash = sFlash.replace("(version)", version);
	
	document.write(sFlash);
}

var WMP7;
if(window.ActiveXObject){
    WMP7 = new ActiveXObject("WMPlayer.OCX.7");
} else if (window.GeckoActiveXObject) {
     WMP7 = new GeckoActiveXObject("WMPlayer.OCX.7");
}


function createMovie(url, width, height, autoStart){
	var sMovie = '';
	if ( WMP7 ) {
		sMovie = '<OBJECT ID=MediaPlayer CLASSID=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6 standby="Loading Microsoft Windows Media Player components..." TYPE="application/x-oleobject" width="(width)" height="(height)"> <PARAM NAME="url" VALUE="(url)"><PARAM NAME="AutoStart" VALUE="(autostart)"></OBJECT>';
	} else {
		sMovie = '<OBJECT ID=MediaPlayer CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 CODEBASE=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715 standby="Loading Microsoft Windows Media Player components..." TYPE="application/x-oleobject" width="(width)" height="(height)"> <PARAM NAME="FileName" VALUE="(url)"> <PARAM NAME="AutoStart" VALUE="(autostart)"> <PARAM NAME="ShowControls" VALUE="1"> <Embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows/windowsmedia/" filename="(url)" src="(url)" Name=MediaPlayer ShowControls=1 ShowDisplay=1 ShowStatusBar=1 width="(width)" height="(height)"> </embed> </OBJECT>';
	}
	if (!url) url = "test.asf";
	if (!width) width = "200";
	if (!height) height = "200";
	if (!autoStart) autoStart = "true";
	sMovie = sMovie.replace("(url)", url);
	sMovie = sMovie.replace("(width)", width);
	sMovie = sMovie.replace("(height)", height);	
	sMovie = sMovie.replace("(autostart)", autoStart);	
	
	document.write(sMovie);
}

function createFlashEx(src, width, height, version, wmode, menu, bgcolor){
	var sFlash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=(version)" width="(width)" height="(height)"><param name="movie" value="(src)" />';
	if (!wmode)
	{
		sFlash = sFlash+'<param name="wmode" value="'+wmode+'" />';
	}
	if (!menu)
	{
		sFlash = sFlash+'<param name="menu" value="'+menu+'" />';
	}
	if (!bgcolor)
	{
		sFlash = sFlash+'<param name="bgcolor" value="'+bgcolor+'" />';
	}

	sFlash = sFlash+'<param name="quality" value="high" /><embed src="(src)" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="(width)" height="(height)"></embed> </object>';
	if (!src) src = "left.swf";
	if (!width) width = "185";
	if (!height) height = "455";	
	if (!version) version = "8,0,0,0";
	sFlash = sFlash.replace("(src)", src);
	sFlash = sFlash.replace("(width)", width);
	sFlash = sFlash.replace("(width)", width)
	sFlash = sFlash.replace("(height)", height);
	sFlash = sFlash.replace("(height)", height);
	sFlash = sFlash.replace("(version)", version);
	document.write(sFlash);
}

function documentWrite(data){
	document.write(data);
}
