/* player-Bibliothek */

function EmbedPlayer(pPlayer)
{
var _url;
_url="http://www.radio42.eu/playHiFi.pls";

var _location;
_location = pPlayer.substr(pPlayer.length-2,2);
if (_location == "US")
{
  pPlayer = pPlayer.substr(0,pPlayer.length-2); 
}
else
{
  _location = "";
}

var _quality;
_quality = pPlayer.substr(pPlayer.length-4,4); 

if (pPlayer.slice(0,3) == "wma" && WinMSIE)
{
<!-- WMA new -->
	if (_quality == "HiFi")
	{
		_url="http://www.radio42.eu/playHiFi" + _location + ".asx";
	}
	else
	{
		_url="http://www.radio42.eu/playMiFi.asx";
	}

document.writeln('<OBJECT ID="Player" height="64" width="468" ');
document.writeln('	CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" ');
document.writeln('	standby="Loading Microsoft Windows Media Player components..." ');
document.writeln('	type="application/x-oleobject">');
document.writeln('	<PARAM name="autoStart" value="true"/>');
document.writeln('  	<PARAM name="enableContextMenu" value="false"/>');
document.writeln('	<PARAM name="uiMode" value="full"/>');
document.writeln('   	<PARAM name="URL" value="' + _url + '"/>');
document.writeln('	<Embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" ');
document.writeln('		FileName="' + _url + '" ');
document.writeln('		Name="Player" ');
document.writeln('		ID="Player" ');
document.writeln('		TransparentAtStart="true" ');
document.writeln('		AutoStart="true" ');
document.writeln('		AnimationAtStart="false" ');
document.writeln('		ShowDisplay="0" ');
document.writeln('		ShowTracker="1" ');
document.writeln('		autoSize="true" ');
document.writeln('		showcontrols="1" ');
document.writeln('		ShowStatusBar="1" ');
document.writeln('		width="468" height="64">');
document.writeln('	</embed>');
document.writeln('</OBJECT>');

}
else if (pPlayer.slice(0,3) == "wma")
{
<!-- WMA old -->
	if (_quality == "HiFi")
	{
		_url="http://www.radio42.eu/playHiFi" + _location + ".asx";
	}
	else
	{
		_url="http://www.radio42.eu/playMiFi.asx";
	}
document.writeln('<OBJECT ID="Player" height="64" width="468" ');
document.writeln('	classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"');
document.writeln('	CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"');
document.writeln('	standby="Loading Microsoft Windows Media Player components..." ');
document.writeln('	type="application/x-oleobject">');
document.writeln('	<PARAM name="autoStart" value="true"/>');
document.writeln('	<PARAM NAME="ShowControls" VALUE="true"/>');
document.writeln('	<PARAM NAME="ShowStatusBar" VALUE="true"/>');
document.writeln('   	<PARAM name="FileName" value="' + _url + '"/>');
document.writeln('	<Embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" ');
document.writeln('		FileName="' + _url + '" ');
document.writeln('		Name="Player" ');
document.writeln('		ID="Player" ');
document.writeln('		TransparentAtStart="true" ');
document.writeln('		AutoStart="true" ');
document.writeln('		AnimationAtStart="false" ');
document.writeln('		ShowDisplay="0" ');
document.writeln('		ShowTracker="1" ');
document.writeln('		autoSize="true" ');
document.writeln('		showcontrols="1" ');
document.writeln('		ShowStatusBar="1" ');
document.writeln('		width="468" height="64">');
document.writeln('	</embed>');
document.writeln('</OBJECT>');

}
else if (pPlayer.slice(0,4) == "real")
{
<!-- Real One -->
	if (_quality == "HiFi")
	{
		_url="http://www.radio42.eu/playHiFi" + _location + ".ram";
	}
	else
	{
		_url="http://www.radio42.eu/playLoFi.ram";
	}
document.writeln('<OBJECT ID="Player" CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" HEIGHT="64" WIDTH="468">');
document.writeln('	<PARAM NAME="controls" VALUE="ControlPanel,StatusBar">');
document.writeln('	<PARAM NAME="console" VALUE="Clip1">');
document.writeln('	<param name="AUTOSTART" value="-1">');
document.writeln('	<param name="BACKGROUNDCOLOR" value="#8caae6">');
document.writeln('	<param name="SRC" value="' + _url + '" ref>');
document.writeln('        <param name="_ExtentX" value="11113">');
document.writeln('        <param name="_ExtentY" value="1693">');
document.writeln('        <param name="SHUFFLE" value="0">');
document.writeln('        <param name="PREFETCH" value="0">');
document.writeln('        <param name="NOLABELS" value="0">');
document.writeln('        <param name="LOOP" value="0">');
document.writeln('        <param name="NUMLOOP" value="0">');
document.writeln('        <param name="CENTER" value="0">');
document.writeln('        <param name="MAINTAINASPECT" value="0">');
document.writeln('	<EMBED type="audio/x-pn-realaudio-plugin" ');
document.writeln('		name="Player"');
document.writeln('		HEIGHT="64" WIDTH="468" ');
document.writeln('		CONTROLS="ControlPanel,StatusBar"');
document.writeln('		CONSOLE="Clip1" ');
document.writeln('		AUTOSTART="true"');
document.writeln('		SRC="' + _url + '"');
document.writeln('		BACKGROUNDCOLOR="#8caae6"');
document.writeln('		PLUGINSPAGE="http://www.real.com/">');
document.writeln('	</EMBED>');
document.writeln('</OBJECT>');

}
else if (pPlayer.slice(0,5) == "quick")
{
<!-- QuickTime -->
	if (_quality == "HiFi")
	{
		_url="http://www.radio42.eu/playHiFi" + _location + ".pls";
	}
	else
	{
		_url="http://www.radio42.eu/playLoFi.pls";
	}
document.writeln('<OBJECT ID="Player" CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="468" HEIGHT="64" ');
document.writeln('	CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">');
document.writeln('	<PARAM name="SRC" VALUE="' + _url + '">');
document.writeln('	<PARAM name="QTSRC" VALUE="' + _url + '">');
document.writeln('	<PARAM name="AUTOPLAY" VALUE="true">');
document.writeln('	<PARAM name="CONTROLLER" VALUE="true">');
document.writeln('	<PARAM name="BGCOLOR" value="#8caae6">');
document.writeln('	<EMBED type="audio/mpeg"');
document.writeln('		PLUGINSPAGE="http://www.apple.com/quicktime/download/"');
document.writeln('		SRC="' + _url + '" QTSRC="' + _url + '"');
document.writeln('		WIDTH="468" ');
document.writeln('		HEIGHT="64" ');
document.writeln('		AUTOPLAY="true" ');
document.writeln('		CONTROLLER="true"');
document.writeln('		BGCOLOR="#8caae6">');
document.writeln('	</EMBED>');
document.writeln('</OBJECT>');

}
else if (pPlayer.slice(0,4) == "free")
{
<!-- FreeAmp -->
	if (_quality == "HiFi")
	{
		_url="http://www.radio42.eu/playHiFi2" + _location + ".pls";
	}
	else
	{
		_url="http://www.radio42.eu/playLoFi2.pls";
	}


}


}

