
var PLAY = '<img src="/javaImages/8a/67/0,,~6055818,00.png" alt="Play" height="42" width="64">';
var PAUSE = '<img src="/javaImages/34/b0/0,,~438324,00.gif" alt="Pause" height="34" width="39">';
var STOP = '<img src="/javaImages/8e/67/0,,~6055822,00.png" alt="Stop" height="42" width="41">';
var REWIND = '<img src="/javaImages/8b/67/0,,~6055819,00.png" alt="Rewind" height="42" width="41">';
var FFORWARD = '<img src="/javaImages/81/67/0,,~6055809,00.png" alt="Fast Forward" height="42" width="41">';
var FULL_SCREEN = '<img src="/javaImages/82/67/0,,~6055810,00.png" alt="Full Screen" height="42" width="41">';
var DOWNLOAD = '<img src="/javaImages/7f/67/0,,~6055807,00.png" alt="Download" height="42" width="43">';
var POPUP = '<img src="/javaImages/e8/bb/0,,~441320,00.gif" alt="Pop-up" height="34" width="41">';
function sendSyncXMLRequest(url) {
if (window.XMLHttpRequest) {              
request = new XMLHttpRequest();              
} else {                                  
request = new ActiveXObject("Microsoft.XMLHTTP");
}
if (request) {
request.open("GET", url, false);                             
request.send(null);
return request.responseXML;                                         
} else {
return false;
}                                             
}
var mediaPlayers = new Array();
var agent = navigator.userAgent.toLowerCase();
var IS_MAC = agent.indexOf('mac') >= 0;
var IS_IE  = ((agent.indexOf('msie') != -1) && (agent.indexOf('opera') == -1));
var ADVERT_BANDWIDTH_HIGH = 500;
var ADVERT_BANDWIDTH_MEDIUM = 500;
var ADVERT_BANDWIDTH_LOW = 250;
function isPluginInstalled(pluginName) {
var installed = false;
if (navigator.plugins && navigator.plugins.length) {
for (var ii = 0; ii < navigator.plugins.length; ++ii) {
if (navigator.plugins[ii].name.indexOf(pluginName) >= 0) {
installed = true;
break;
}
}
}
return installed;
}
window.startImageMap = {};
window.endImageMap = {};
window.lastMediaPlayed = null;
window.imageTimerStarted = false;
function requestImageTimer(name) {
var player = document[name];
if (player) { 
var currentMedia = player.currentMedia;
if (currentMedia) {
currentSrc = currentMedia.sourceURL;
if (currentSrc) {
if (window.lastMediaPlayed && 
window.lastMediaPlayed != currentSrc &&
window.endImageMap[window.lastMediaPlayed]) {  
var image = new Image();
image.src = window.endImageMap[window.lastMediaPlayed];
delete window.endImageMap[window.lastMediaPlayed];
}
if (window.startImageMap[currentSrc]) {  
var image = new Image();
image.src = window.startImageMap[currentSrc];
delete window.startImageMap[currentSrc];
}
window.lastMediaPlayed = currentSrc;
}
}
}
setTimeout("requestImageTimer('" + name + "')", 1000);  
return;
}
function MediaPlayer(hiSource,
mediumSource,
loSource,
allowDownload,
audioStream,
width,
height,
holdingImage,
autoStart,
parentElement,
showStatus,
playCount,
displayAdvertising,
externalControls,
options) {
this.linkMap = {};
if (holdingImage) {
var img = new Image();
img.src = holdingImage;
}
this.getDownloadPath = function(source) {
if (source.indexOf("/page/media/0,,~,00.asx?path=") >= 0) {
source = unescape(source);
source = this.decode(
source.substring("/page/media/0,,~,00.asx?path=".length)
);
}  
source = source.replace("mms:","http:");
source = source.replace("video\.premiumtv\.co\.uk",
"football\.download\.premiumtv\.co\.uk");
return source;
}
this.decode = function(inString) {
var alphabet = "abcdefghijklmnopqrstuvwxyz";
var outString = "";
for (var ii = 0; ii < inString.length; ++ii) {
var charact = inString.charAt(ii);
var isUpper = (charact.toUpperCase() == charact);
charact = charact.toLowerCase();
var charPosition = alphabet.indexOf(charact);
if (charPosition >= 0) {
charact = alphabet.charAt(
(charPosition + (alphabet.length / 2)) % alphabet.length
);
if (isUpper) {
charact = charact.toUpperCase();
}
}
outString += charact;
}
return outString;
}
this.getAdvertisingPath = function(path, videoSize) {
var adPath = path; 
if (this.advertisingType == "virgin") {
try {
if (typeof window.ord == "undefined") {
window.ord = Math.floor(Math.random() * 100000000);
}
var videoCap = GetCookie("videoCap");
videoCap = videoCap ? parseInt(videoCap) + 1 : 0;
var urls = [
{url: "http://adserver.virginmedia.com/html.ng/site=vm" + 
"&partner=vm&size=video&channel=" + this.advertisingChannel +
"&videoad=wmv&pos=preclip&subchannel=" + 
(window.subchannel ? window.subchannel : "football") +
"&sschannel=" + (window.sschannel ? window.sschannel : "premiership") +
"&filesize=" + videoSize + 
"&pagename=" + (window.pagename ? window.pagename : "common") +
"&vidcap=" + videoCap + "&tile=" + window.ord + 
"&Params.User.UserID=" + (window.vmadid ? window.vmadid : "") +
"?ord=" + window.ord,
type: "preclip"
},       
{url: "http://adserver.virginmedia.com/html.ng/site=vm" + 
"&partner=vm&size=video&channel=" + this.advertisingChannel +
"&videoad=wmv&pos=postclip&subchannel=" + 
(window.subchannel ? window.subchannel : "football") +
"&sschannel=" + (window.sschannel ? window.sschannel : "premiership") +
"&filesize=" + videoSize + 
"&pagename=" + (window.pagename ? window.pagename : "common") +
"&vidcap=" + videoCap + "&tile=" + window.ord + 
"&Params.User.UserID=" + (window.vmadid ? window.vmadid : "") +
"?ord=" + window.ord,
type: "postclip"
}
];        
var startImageTimer = false;
for (var jj = 0; jj < urls.length; ++jj) {
var xml = sendSyncXMLRequest(
"/page/externalXml/0,,~,00.xml?url=" + escape(urls[jj].url)
);  
var entries = xml.getElementsByTagName("ENTRY");
if (entries.length) {
var entry = entries[0];
var mediaUrl = "";
var targetUrl = "";
var imageUrl = "";
var refs = entry.getElementsByTagName("REF");
if (refs.length) {
mediaUrl = refs[0].getAttribute("HREF");
mediaUrl = mediaUrl.replace("&amp;", "&");
}
var params = entry.getElementsByTagName("PARAM");
var targetUrl;
for (var ii = 0; ii < params.length; ++ii) {
switch (params[ii].getAttribute("NAME")) {
case "href":
targetUrl = params[ii].getAttribute("VALUE");
targetUrl = targetUrl.replace("&amp;", "&");      
this.linkMap[mediaUrl] = targetUrl;
break;
case "image":
imageUrl = params[ii].getAttribute("VALUE");
imageUrl = imageUrl.replace("&amp;", "&");    
window.endImageMap[mediaUrl] = imageUrl;
startImageTimer = true;
break
case "initial_image":
imageUrl = params[ii].getAttribute("VALUE");
imageUrl = imageUrl.replace("&amp;", "&");    
window.startImageMap[mediaUrl] = imageUrl;
startImageTimer = true;
break;
case "adcap":
if (ii == 0 && videoCap == 0) {
var now = new Date();
var expiry = new Date(
now.getTime() + parseInt(params[ii].getAttribute("VALUE"))
);
SetCookie("videoCap", videoCap, expiry);
}             
break;
case "vidsync":
window.vidsync = params[ii].getAttribute("VALUE");
break;
}
}
urls[jj].mediaUrl = "&" + urls[jj].type + "=" + escape(mediaUrl);
}
}
adPath = "/page/advertisingPlaylist/0,,~,00.asx" + 
"?url=" + escape(path) + 
(urls[0].mediaUrl ? urls[0].mediaUrl : "") +
(urls[1].mediaUrl ? urls[1].mediaUrl : "");
if (startImageTimer && !window.imageTimerStarted) {
window.imageTimeStarted = true;
requestImageTimer(this.name);
}
} catch (error) {}
} else {
if ("/" == path.substring(0,1)) {
path = SITE_URL + path;
}
if (window.adStream) {
adPath = window.adStream + escape(path) + "&format=Video-Windows-" +
this.getAdvertBandwidth(path) + "-480x360" + window.adStreamTail +
(window.adAttributes ? "&attr=" + window.adAttributes : "");
}  
}
return adPath; 
}
this.getPlayState = function() {
var stateText = "";
if (document[this.name]) {
var state = document[this.name].playState;
switch (state) {
case 0:  stateText += "Ready"; break;             
case 1:  stateText += "Stopped"; break;          
case 2:  stateText += "Paused"; break;           
case 3:  stateText += "Playing"; break;            
case 4:  stateText += "Fast Forward"; break;     
case 5:  stateText += "Rewind"; break; 
case 6:  stateText += "Buffering";break;     
case 7:  stateText += "Waiting"; break;    
case 8:  stateText += "End"; break;          
case 9:  stateText += "Connecting"; break;           
case 10: stateText += "Ready"; break;    
default: stateText += ""; break;
}
}
return stateText;
}
this.showPlayState = function() {
var div = document.getElementById(this.name + "playerStatus");
if (div) {
div.innerHTML = this.getPlayState();
}
return;
}
this.getAdvertBandwidth = function(currentSource) {
var advertBandwidth = ADVERT_BANDWIDTH_LOW;
if (currentSource == this.hiSource) {
advertBandwidth = ADVERT_BANDWIDTH_HIGH;
} else if (currentSource == this.mediumSource) {
advertBandwidth = ADVERT_BANDWIDTH_MEDIUM;
} 
return advertBandwidth;
}
this.setSources = function(hiSource, mediumSource, loSource, renderNow) {
if (hiSource || mediumSource || loSource) {
if (renderNow) {
this.stop();
}
this.hiSource = "";
this.hiDownload = "";
this.mediumSource = "";
this.mediumDownload = "";
this.loSource = "";
this.lowDownload = "";
if (hiSource) {
this.hiSource = hiSource;
if (allowDownload) {
this.hiDownload = this.getDownloadPath(this.hiSource);
}
if (this.displayAdvertising) {
this.hiSource = this.getAdvertisingPath(hiSource, "large");
}
this.currentSource = this.hiSource;
}
if (mediumSource) {
this.mediumSource = mediumSource;
if (allowDownload) {
this.mediumDownload = this.getDownloadPath(this.mediumSource);
}
if (this.displayAdvertising) {
this.mediumSource = this.getAdvertisingPath(mediumSource, "medium");
}
this.currentSource = this.mediumSource;
}
if (loSource) {
this.loSource = loSource;
if (allowDownload) {
this.loDownload = this.getDownloadPath(this.loSource);
}
if (this.displayAdvertising) {
this.loSource = this.getAdvertisingPath(loSource, "small");
}
this.currentSource = this.loSource;
}
this.currentSource = this.loSource;
var useLowestQualityVideo = false;
if (!useLowestQualityVideo) {
this.currentSource = this.hiSource;
}
var quality = GetCookie("videoQuality");
if (this.hiSource && ("HIGH" == quality || !this.currentSource)) {
this.currentSource = this.hiSource;
} else if (this.mediumSource && ("MEDIUM" == quality || !this.currentSource)) {
this.currentSource = this.mediumSource;
} else if (this.loSource && ("LOW" == quality || !this.currentSource)) {
this.currentSource = this.loSource;
}
if (renderNow) {
this.rerender();
}
}
return;
}
this.click = function() {
var currentSrc = document[this.name].currentMedia.sourceURL;
var linkLocation = this.linkMap[currentSrc];
if (linkLocation) {
window.open(
linkLocation, 
"_blank",
"menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes"
);
}
return;
}
var CONTROLS_HEIGHT = 46;
var ACTIVEX_PLAYER_NAME = "WMPlayer.OCX.7";
if (window.mediaCounter) {
++window.mediaCounter;
} else {
window.mediaCounter = 1;
}
this.height = height;
this.width = width;
this.name = "mediaPlayer" + window.mediaCounter;
this.holdingImage = holdingImage;
this.holdingImageDisplayed = false;
this.autoStart = autoStart;
this.allowDownload = allowDownload;
this.showStatus = showStatus;   
this.playCount = playCount ? playCount : 1;
this.displayAdvertising = displayAdvertising;
this.externalControls = externalControls;
this.currentSource = audioStream;
this.advertisingChannel = null;
this.advertisingType = null;
this.displayStandardControls = false;
this.mute = false;
if (options) {
this.advertisingChannel = options.advertisingChannel ?
options.advertisingChannel : null;
this.advertisingType = options.advertisingType ? 
options.advertisingType : null;
this.volume = undefined != options.volume ? options.volume : this.volume;
this.displayStandardControls = options.displayStandardControls;
this.mute = options.mute;
}
this.setSources(hiSource, mediumSource, loSource, false);
window.mediaPlayers[window.mediaCounter] = this;
this.installed = false;
if (window.ActiveXObject ||
(window.GeckoActiveXObject && isPluginInstalled("ActiveX"))) {
var player = null;
try {
if (window.ActiveXObject && agent.indexOf('win') != -1) {
player = new ActiveXObject(ACTIVEX_PLAYER_NAME);
} else {
player = new GeckoActiveXObject(ACTIVEX_PLAYER_NAME);
}
} catch (error) {}
if (player) {
this.installed = true;
parseFloat(player.versionInfo);
this.version = parseFloat(player.versionInfo);
if (this.version.toString().length == 1) {
this.version += '.0'
}
}
} else {
this.installed = isPluginInstalled("Windows Media");
}
this.atLeastVersion = function(version) {
return this.installed && parseInt(this.version) >= version;
}
this.stop = function() {
if (!this.holdingImageDisplayed) {
if (this.atLeastVersion(7)) {
var controls = document[this.name].controls;
if (controls.isAvailable("stop")) {
controls.stop();
}
} else {
document.getElementById("container" + this.name).innerHTML =
this.renderV6Player(false, this.width, this.height);
}
if (this.holdingImage) {
this.autoStart = false;
this.rerender();
}
}
return;
}
this.play = function() {
this.clearHoldingImage();
if (this.atLeastVersion(7)) {
var controls = document[this.name].controls;
if (controls.isAvailable("play")) {
controls.play();
} else if (controls.isAvailable("pause")) {
controls.pause();
}
if (this.holdingImage) {
this.displayHoldingImageAtEndOfVideo();
}
} else {
if (IS_IE && !IS_MAC) {
document[this.name].Rate = 1;
document[this.name].Play();
} else {
document.getElementById("container" + this.name).innerHTML =
this.renderV6Player(true, this.width, this.height);
}
}
return;
}
this.displayHoldingImageAtEndOfVideo = function() {  
var playState = this.getPlayState();
if (playState) {
if (("Stopped" == playState || "Ready" == playState)&& this.holdingImage && !this.holdingImageDisplayed) {
this.stop();
} else if ("Stopped" != playState){
setTimeout(
"window.mediaPlayers[" + window.mediaCounter + "].displayHoldingImageAtEndOfVideo()",
100
);        
} 
}
return;
}
this.pause = function() {
if (this.atLeastVersion(7)) {
if (document[this.name]) {
var controls = document[this.name].controls;
if (controls && controls.isAvailable("pause")) {
controls.pause();
}
}  
} else {
if (IS_IE && !IS_MAC) {
document[this.name].Rate = 1;
document[this.name].Pause();
} else {
document.getElementById("container" + this.name).innerHTML =
this.renderV6Player(true, this.width, this.height);
}                
}
return;
}
this.setVolume = function(volume) {
if (!this.holdingImageDisplayed && this.atLeastVersion(7)) {
var settings = document[this.name].settings;
if (settings) {
settings.volume = parseInt(volume);  
}
}
return;
}
this.getVolume = function(volume) {
var volume = null;
if (!this.holdingImageDisplayed && this.atLeastVersion(7)) {
var settings = document[this.name].settings;
if (settings) {
volume = settings.volume;  
}
}
return volume;
}
this.fastForward = function() {
if (this.holdingImageDisplayed) {
this.clearHoldingImage();
this.play();
setTimeout(
"window.mediaPlayers[" + window.mediaCounter + "].fastForward()",
1000
);
} else {
if (this.atLeastVersion(7)) {
var controls = document[this.name].controls;
if (controls.isAvailable("fastForward")) {
controls.fastForward();
}
} else {
if (document[this.name].Rate > 1) {
document[this.name].Rate = 1;
} else {
document[this.name].Rate = 2;
}
}
}
return;
}
this.rewind = function() {
if (!this.holdingImageDisplayed) {
if (this.atLeastVersion(7)) {
var controls = document[this.name].controls;
if (controls.isAvailable("fastReverse")) {
controls.fastReverse();
}
} else {
if (document[this.name].AllowScan) {
document[this.name].Rate = -2;
} else {
document[this.name].CurrentPosition = 0;
}
document[this.name].Play();
}
}
return;
}
this.enableFullScreen = function() {
this.clearHoldingImage();
if (this.atLeastVersion(7)) {
try {
var controls = document[this.name].controls;
if (controls.isAvailable("play")) {
this.play();
}
document[this.name].fullScreen = true;
} catch (error) {
setTimeout("window.mediaPlayers[" + window.mediaCounter +
"].enableFullScreen()",100);
}
} else if (IS_MAC) {
var width = screen.width;
var height = screen.height;
win = window.open(
"", "fullscreen", "left=0,top=0,width=" + width +
",height=" + height + ",scrollbars=no"
);
this.stop();
if (win.document.body) {
win.document.open();
win.document.write(
"<html>" +
"<head>" +
"<title>Full screen video</title>" +
"<style>body {margin:0px;padding:0px;}</style>" +
"</head>" +
"<body>" +
this.renderV6Player(true, width, height) +
"</body>" +
"</html>"
);
win.document.close();
win.document.title = "Full screen video";
}
} else if (IS_IE) {
document[this.name].DisplaySize = 3;
document[this.name].Play();
}
return;
}
this.rerender = function() {
var wrapper = document.getElementById("mediaWrapper" + this.name);
var player = document.getElementById(this.name);
if (player) { 
player.id = "";              
player.style.display = "none";
}
wrapper.innerHTML = this.renderAll();
if (this.autoStart) {
this.displayHoldingImageAtEndOfVideo();
}
return;
}
this.renderV6Player = function(autostart, width, height) {
return "<object id='" + this.name + "' " +
"classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 " +
"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='URL' value='" + this.currentSource + "'>" +
"<param name='autostart' value='" + autostart + "'>" +
"<param name='volume' value='" + this.volume + "'>" +
"<param name='showcontrols' value='0'>" +
"<param name='showdisplay' value='0'>" +
"<param name='mute' value='" + (this.mute ? 1 : 0) + "'>" +
"<param name='enableContextMenu' value='0'>" +
"<param name='windowlessvideo' value='true'>" +
"<param name='playCount' value='" + this.playCount + "'>" +
"<param name='stretchToFit' value='false'>" +
"<embed type='application/x-mplayer2'" +
" pluginspage='http://www.microsoft.com/windows/windowsmedia/'" +
" src='" + this.currentSource + "'" +
" name='" + this.name + "'" +
" ShowControls='1'" +
" ShowDisplay='false'" +
" ShowStatusBar='false'" +
" EnableContextMenu='0'" +
" StretchToFit='1'" +
" Mute='" + (this.mute ? 1 : 0) + "'" +
" AutoStart=" + (autostart ? 1 : 0) +
" PlayCount=" + this.playCount +
" volume=" + this.volume +
" Controller='0'" +
" width=" + width +
" height=" + height + ">" +
"</embed>" +
"</object>";
}
this.renderV7Player = function(autoStart, width, height) {
return "<object id='" + this.name + "'" +
" 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='" + this.currentSource + "'>" +
"<param name='AutoStart' value='" + autoStart + "'>" +
"<param name='PlayCount' value='" + this.playCount + "'>" +
"<param name='volume' value='" + (this.mute ? 0 : this.volume) + "'>" +
"<param name='windowlessvideo' value='true'>" +
"<param name='EnableContextMenu' value='0'>" +
"<param name='ShowStatusBar' value='false'>" +
"<param name='mute' value='" + (this.mute ? 1 : 0) + "'>" +
"<param name='uiMode' value='" + 
(this.displayStandardControls ? "full" : "none") +
"'>" +
"<param name='stretchToFit' value='false'>" +
"</object>";
}
this.clearHoldingImage = function() {
if (this.holdingImageDisplayed && this.atLeastVersion(7)) {
document.getElementById("container" + this.name).innerHTML =
this.renderV7Player(this.autoStart, 
this.width,
this.height);
}
this.holdingImageDisplayed = false;
return;
}
this.changeSource = function(source, downloadSource) {
this.currentSource = source;
var popupLink = document.getElementById("popup" + this.name);
if (popupLink) {
popupLink.href = this.currentSource;
}
var downloadLink = document.getElementById("download" + this.name)
if (downloadLink) {
downloadLink.href = downloadSource;
}
if (!this.holdingImageDisplayed) {
this.stop();
document.getElementById("container" + this.name).innerHTML =
this.atLeastVersion(7) && !this.displayStandardControls ?
this.renderV7Player(!this.holdingImageDisplayed,
this.width,
this.height) :
this.renderV6Player(!this.holdingImageDisplayed,
this.width,
this.height);
this.play();
}
return;
}
this.renderControls = function() {
var controlsHtml = "";
if (!this.displayStandardControls) {
if (this.currentSource && this.atLeastVersion(7)) {
controlsHtml += "<div class='mediaButtons' " + 
((this.externalControls)?"style='display:none;'":"") + 
">";
controlsHtml += "<span class='controlButtons'>";
controlsHtml +=
"<a class='rewindButton' href='#rewind' onclick='window.mediaPlayers[" +
window.mediaCounter + "].rewind();return false;'><span>" +
REWIND + "</span></a>" +
"<a class='playButton' href='#play' onclick='window.mediaPlayers[" +
window.mediaCounter + "].play();return false;'><span id='play" +
this.name + "'>" + PLAY + "</span></a>" +
"<a class='stopButton' href='#stop' onclick='window.mediaPlayers[" +
window.mediaCounter + "].stop();return false;'><span>" +
STOP + "</span></a>" +
"<a class='fastForwardButton' href='#fastForward' onclick='window.mediaPlayers[" +
window.mediaCounter + "].fastForward();return false;'><span>" +
FFORWARD + "</span></a>"+
"</span>";
}
controlsHtml += "<span class='playerButtons'>";
if (this.currentSource && this.atLeastVersion(7) || IS_MAC) {
controlsHtml +=
"<a class='fullScreenButton' href='#stop'" +
"   onclick='window.mediaPlayers[" + window.mediaCounter +
"].enableFullScreen();return false;'>" +
"<span>" + FULL_SCREEN + "</span></a>";
}
if (this.currentSource) {
controlsHtml +=
"<a class='popupButton' id='popup" + this.name + "' href='" +
this.currentSource + "'><span>" + POPUP + "</span></a>";
}
if (this.allowDownload) {
controlsHtml +=
"<a id='download" + this.name + "' class='downloadButton' href='" +
((this.hiDownload && (this.hiSource == this.currentSource)) ? 
this.hiDownload : this.loDownload) +
"' oncontextmenu='if (!event.stopPropagation) event.cancelBubble=true;'><span>" + 
DOWNLOAD + "</span></a>";
}
controlsHtml += "</span>";
var streamsAvailable = (this.loSource ? 1 : 0) + (this.mediumSource ? 1 : 0) +
(this.hiSource ? 1 : 0)
if (streamsAvailable > 1) {
controlsHtml += "<div class='mediaQuality'>";
if (this.loSource) {
controlsHtml +=
"<input type='radio' name='" + this.name + "quality'" +
" onclick='window.mediaPlayers[" +  window.mediaCounter + "]" +
".changeSource(\"" + this.loSource + "\", \"" + this.loDownload + "\");" +
"SetCookie(\"videoQuality\",\"LOW\");' " +
(this.loSource == this.currentSource ? "checked='true'" : "") +
">Low";
}
if (this.mediumSource) {
controlsHtml +=
"<input type='radio' name='" + this.name + "quality'" +
" onclick='window.mediaPlayers[" +  window.mediaCounter + "]" +
".changeSource(\"" + this.mediumSource + "\", \"" + this.mediumDownload + "\");" +
"SetCookie(\"videoQuality\",\"MEDIUM\");' " +
(this.mediumSource == this.currentSource ? "checked='true'" : "") +
">Medium";
}
if (this.hiSource) {
controlsHtml +=
"<input type='radio' name='" + this.name + "quality'" +
" onclick='window.mediaPlayers[" +  window.mediaCounter + "]" +
".changeSource(\"" + this.hiSource + "\", \"" + this.hiDownload + "\");" +
"SetCookie(\"videoQuality\",\"HIGH\");' " +
(this.hiSource == this.currentSource ? "checked='true'" : "") +
">High";
}
controlsHtml += "</div>";  
}
}
return controlsHtml;
}
this.renderAll = function () {
var playerHtml =  "<div class='mediaPlayer'>" +
"<div id='container" + this.name + "'>";
if (this.holdingImage && !this.autoStart &&
(this.atLeastVersion(7) || !IS_IE || IS_MAC)) {
this.holdingImageDisplayed = true;
var imageHtml = "<img src='" + holdingImage + "' " +
"width='" + width + "' " +
"height='" + height + "' ";
if (window.holdingImageLink) { 
playerHtml += "<a href='" + window.holdingImageLink + "'>" + 
imageHtml + 
"></a>";
} else {
playerHtml += (imageHtml + "onclick='window.mediaPlayers[" +
window.mediaCounter + "].play()'>");
}
} else {
if (this.currentSource) {
if (this.atLeastVersion(7) && !this.displayStandardControls) {
playerHtml += this.renderV7Player(this.autoStart, 
this.width, 
this.height);
} else {
playerHtml += this.renderV6Player(this.autoStart,
this.width,
this.height);
}
}
}
playerHtml += "</div>";
playerHtml += this.renderControls();
if (this.showStatus && this.atLeastVersion(7)) {
if (!this.externalControls) { 
playerHtml += "<div class='playerStatus' id='" + 
this.name + "playerStatus'></div>";
}                
setInterval(
"window.mediaPlayers[" + window.mediaCounter + "].showPlayState()",
500
);
}
playerHtml += "</div></div>";
return playerHtml;
}
this.height = this.atLeastVersion(7) && !this.displayStandardControls ? 
height : height + CONTROLS_HEIGHT;
var html = "<div id='mediaWrapper" +  this.name +
"' class='mediaWrapper'>"  + this.renderAll() + "</div>"
if (parentElement) {
parentElement.innerHTML = html;
} else {
document.write(html);
}    
if (this.autoStart) {
this.displayHoldingImageAtEndOfVideo();
}
}

<!-- PTV Cache: persloche02/tomcatvip Thu, 19 Aug 2010 14:19:46 GMT / 86400 (0) -->