/* 
Die Funktion showFlashPlayerdirect ruft mit den Parametern 

filename = Dateiname des FLV-Filmes
width = Breite des Players ca.
height = Hoehe des Players ca.

den Flashplayer auf.

Um die Funktion showFlashPlayerdirect aufzurufen muss folgende Syntax genutzt werden:

<div id="flashcontent" class="player" align="center">
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
showFlashPlayerdirect("vdata/1_1.flv", "330", "190")
//-->
</SCRIPT></div>

*/
function showFlashPlayerdirect(filename, width, height, flashcontainer) {
	var so = new SWFObject("video/vplayer.swf", "sotester", ""+width+"", ""+height+"", "9", "#FFFFFF");
	so.addVariable("videoFile", filename);
//	alert("File:"+filename+"\nwidth:"+width+"\nheight:"+height);
	so.write(flashcontainer);
}

function showMediaPlayer(media_parent, width, height, filename) {
	var player_code = "<OBJECT ID=\"MediaPlayer1\" width="+width+" height="+height+" classid=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902\" standby=\"Loading Microsoft Windows Media Player components...\" type=\"application/x-oleobject\"><PARAM NAME=\"FileName\" VALUE=\""+filename+"\"><PARAM NAME=\"animationatStart\" VALUE=\"true\"><PARAM NAME=\"transparentatStart\" VALUE=\"true\"><PARAM NAME=\"autoStart\" VALUE=\"true\"><PARAM NAME=\"showControls\" VALUE=\"true\"><PARAM NAME=\"autoSize\" Value=\"false\"><PARAM NAME=\"displaySize\" Value=\"0\"><PARAM NAME=\"ShowControls\" Value=\"true\"><EMBED type=\"application/x-mplayer2\" pluginspage = \"http://www.microsoft.com/Windows/MediaPlayer/\" SRC=\""+filename+"\" name=\"MediaPlayer1\" width=\""+width+"\" height=\""+height+"\" AutoStart=\"true\" ShowControls=1 autoSize=0 displaySize=0></EMBED></OBJECT>";
		
	document.getElementById(media_parent).innerHTML = '<div class="player">'+player_code+'</div>';
}
