/* Parameters */
var bandwidthCookie = marketCall_GetCookie("MarketCallBandwidth");
var playerCookie = marketCall_GetCookie("MarketCallPlayer");
/* Bandwidth */
var bandwidth = "56";
if ((bandwidthCookie == "56") || (bandwidthCookie == "128") || (bandwidthCookie == "256")) { bandwidth = bandwidthCookie; }
/* Player */
var player = "";
if ((playerCookie == "wmp") || (playerCookie == "rp")) { player = playerCookie; }
function marketCall_SetBandwidth(bandwidthParam)
{
marketCall_SetCookieForAYear("MarketCallBandwidth", bandwidthParam);
document.location.reload();
}
function marketCall_SetPlayer(playerParam)
{
marketCall_SetCookieForAYear("MarketCallPlayer", playerParam);
document.location.reload();
}
/* Wmp */
var wmpUrl = 'mms://a1831.v87886.c8788.e.vm.akamaistream.net/7/1831/8788/v001/saxobank.download.akamai.com/8788/080807_56_1000.wmv';
switch(bandwidth)
{
case "128":
wmpUrl = 'mms://a1831.v87886.c8788.e.vm.akamaistream.net/7/1831/8788/v001/saxobank.download.akamai.com/8788/080807_128_1000.wmv';
break;
case "256":
wmpUrl = 'mms://a1831.v87886.c8788.e.vm.akamaistream.net/7/1831/8788/v001/saxobank.download.akamai.com/8788/080807_256_1000.wmv';
break;
}
var wmpStartPos = ' 196';
/* RP */
var rpUrl = 'rtsp://a1831.v87886.c8788.e.vr.akamaistream.net/ondemand/7/1831/8788/v001/saxobank.download.akamai.com/8788/080807_56_1000.rm';
switch(bandwidth)
{
case "128":
rpUrl = 'rtsp://a1831.v87886.c8788.e.vr.akamaistream.net/ondemand/7/1831/8788/v001/saxobank.download.akamai.com/8788/080807_128_1000.rm';
break;
case "256":
rpUrl = 'rtsp://a1831.v87886.c8788.e.vr.akamaistream.net/ondemand/7/1831/8788/v001/saxobank.download.akamai.com/8788/080807_256_1000.rm"';
break;
}
var rpStartPos = ' 194000';
/* Player */
function MarketCallPlayer()
{
var tmpStr = '';
tmpStr += '';
tmpStr += '
Recorded at 7-Aug-2008, 07:20 GMT
';
if (player == "wmp")
{
tmpStr += '';
}
else if (player == "rp")
{
tmpStr += '';
tmpStr += ' ';
tmpStr += ' ';
tmpStr += ' ';
tmpStr += ' ';
tmpStr += ' ';
tmpStr += ' ';
tmpStr += '
';
tmpStr += ' ';
tmpStr += '
';
tmpStr += '';
tmpStr += ' ';
tmpStr += ' ';
tmpStr += '';
}
tmpStr += '';
tmpStr += 'Player: ';
tmpStr += player == 'wmp' ? 'Windows Media Player' : 'Windows Media Player';
tmpStr += ' | ';
tmpStr += player == 'rp' ? 'RealPlayer' : 'RealPlayer';
tmpStr += '';
// Return
document.write(tmpStr);
// RealPlayer SetPosition
if (player == "rp")
{
try
{
if (document.getElementById('objRP2') != undefined)
{
}
else
{
document.getElementById('objRP1').SetPosition(rpStartPos);
}
} catch (e) {}
}
}
function RealPlayerSetPosition()
{
try
{
document.getElementById('objRP2').SetPosition(rpStartPos);
}
catch (e)
{
setTimeout('RealPlayerSetPosition(' + rpStartPos + ')', 10000);
}
}
function MarketCallPlayerWithControl()
{
MarketCallPlayer();
var tmpStr = '';
tmpStr += '';
tmpStr += 'Bandwidth: '
tmpStr += bandwidth == '56' ? '56k' : '56k';
tmpStr += ' | ';
tmpStr += bandwidth == '128' ? '128k' : '128k';
tmpStr += ' | ';
tmpStr += bandwidth == '256' ? '256k' : '256k';
tmpStr += '';
// Return
document.write(tmpStr);
}
/* Cookie Lib */
function marketCall_SetCookie(name, value, expires, path, domain, secure)
{
var myCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure=" : "");
document.cookie = myCookie;
}
function marketCall_SetCookieForAYear(name, value)
{
var expireDate = new Date();
expireDate.setDate(expireDate.getDate() + 365);
marketCall_SetCookie(name, value, expireDate);
}
function marketCall_GetCookie(name)
{
var myCookie = document.cookie;
var prefix = name + "=";
var begin = myCookie.indexOf("; " + prefix);
if (begin == -1)
{
begin = myCookie.indexOf(prefix);
if (begin != 0) return "";
}
else
{
begin += 2;
}
var end = document.cookie.indexOf(";", begin);
if (end == -1)
{
end = myCookie.length;
}
return unescape(myCookie.substring(begin + prefix.length, end));
}