
	var vidDiv = null;
	
function addElement(oid, source, width, height, autostart, display, mute)
{


if (source == "http://ads.teamtalk.com/RealMedia/ads/adstream_sx.ads/www.teamtalk.com/home/0@x01?www.teamtalk.com/football/tv/playlist.asx") {
	var source = "http://www.teamtalk.com/football/tv/playlist.asx"
}

var vidDiv = document.getElementById('vidDiv');

if(autostart== "Y")
{
var oAutoStart = "True";
var eAutoStart = "1";
}
else
{
var oAutoStart = "False";
var eAutoStart = "0";
}

if(display== "full")
{
var oUImode = "Full";
var eStatus = "1";
var eControls = "1";
height = eval(height + 70);
}
else if(display== "mini")
{
var oUImode = "Mini";
var eStatus = "0";
var eControls = "1";
height = eval(height + 70);
}
else if(display== "none")
{
var oUImode = "None";
var eStatus = "0";
var eControls = "0";
}


if(mute == "Y")
{
var oMute = "True";
var eMute = 1;
var vol = 0;
}
else
{
var oMute = "False";
var eMute = 0; 
var vol = 100;
}


vidDiv.innerHTML = '<OBJECT id="' + oid + '" height="' + height + '" width="' + width + '" name="' + oid + '"'
			+ 'CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"'
			+ 'type="application/x-oleobject">'
			+ '<PARAM NAME="URL" VALUE="' + source + '">'
			+ '<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">'
			+ '<PARAM NAME="AutoSize" VALUE="True">'
			+ '<PARAM NAME="StretchToFit" VALUE="True">'
			+ '<PARAM NAME="AutoStart" VALUE="' + oAutoStart + '">'
			+ '<PARAM name="uiMode" value="' + oUImode + '">'
			+ '<PARAM name="PlayCount" value="1">'
			+ '<PARAM name="Mute" value="' + oMute + '">'
			+ '<PARAM name="Volume" value="' + vol + '">'
			+ '<embed type="application/x-mplayer2" src="' + source + '"'
			+ 'id="' + oid + '" name="' + oid + '" showstatusbar="' + eStatus + '" showcontrols="' + eControls + '"'
			+ 'showdisplay="0" StretchToFit="1" AutoSize="1" autostart="' + eAutoStart + '"  width="' + width + '" height="' + height+ '" volume="' + vol + '" Mute="' + eMute + '" ShowAudioControls="1" >'
			+ '</OBJECT>'
			+ '<noembed>This browser appears to be unable to display inline video.</noembed>';
			
}

 