
new function(){var A=Array,F=Function,S=String,O=Object,p='prototype',slice=A[p].slice;function getArray(o){var a=[],l=o.length;for(var i=0;i<l;i++){a[i]=o[i];}
return a;};window.undefined=window.undefined;if(!F[p].apply){F[p].apply=function(o,a){var r,x='___apply';o=o||{};o[x]=this;switch((a&&a.length)||0){case 0:r=o[x]();break;case 1:r=o[x](a[0]);break;case 2:r=o[x](a[0],a[1]);break;case 3:r=o[x](a[0],a[1],a[2]);break;case 4:r=o[x](a[0],a[1],a[2],a[3]);break;case 5:r=o[x](a[0],a[1],a[2],a[3],a[4]);break;case 6:r=o[x](a[0],a[1],a[2],a[3],a[4],a[5]);break;default:break;}
o[x]=undefined;return r;};}
if(!F[p].call){F[p].call=function(o){var a=slice.apply(arguments,[1]);return this.apply(o,a);};}
if(!F[p].bind){F[p].bind=function(o){var f=this;return function(){return f.apply(o,arguments);};};}
if(!A[p].pop){A[p].pop=function(){if(this.length===0)return undefined;this.length--;return this[this.length];};}
if(!A[p].push){A[p].push=function(){for(var i=0;i<arguments.length;i++){this[this.length]=arguments[i];}
return this.length;};}
if(!A[p].shift){A[p].shift=function(){var r=this[0];if(this.length){var a=this.slice(1),i=a.length;while(i--)this[i]=a[i];this.length--;}
return r;};}
if(!A[p].unshift){A[p].unshift=function(){var a=A.concat.call(slice.apply(arguments,[0]),this),i=a.length;while(i--)this[i]=a[i];return this.length;};}
if(!A[p].splice){A[p].splice=function(i,c){var r=c?this.slice(i,i+c):[];var a=this.slice(0,i).concat(slice.apply(arguments,[2])).concat(this.slice(i+c));i=a.length;this.length=i;while(i--)this[i]=a[i];return r;};}
if("aa".replace(new RegExp('\\w','g'),function(){return arguments[1]+" ";})!=="0 1 "){S[p].___replace=S[p].replace;S[p].replace=function(expr,replacement){if(typeof replacement=='function'){var match,string=this,result='';var regexp=(typeof expr=='string')?new RegExp(expr):expr;var global=regexp.global;if(global==null)global=new RegExp('(g|gi)$').test(regexp);if(global)regexp=new RegExp(regexp.source);while(string&&(match=regexp.exec(string))){result+=string.slice(0,match.index)+replacement.apply(this,match);string=string.slice(match.index+match[0].length);if(!global)break;}
return result+string;}
else{return this.___replace(regexp,replacement);}};}
S[p].supplant=function(o){return this.replace(/[{]([^{}]*)[}]/g,function(a,b){var r=o[b];return typeof r!=='object'?r:a;});};O.extend=function(d,s){for(p in s){d[p]=s[p];}
return d;};O.clone=function(o){var c=(o.length==undefined)?{}:[];for(var i in o){if(typeof(o[i])=="object")c[i]=O.clone(o[i]);else c[i]=o[i];}
return c;};};if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}
function $(){var elements=new Array();for(var i=0;i<arguments.length;i++){var element=arguments[i];if(typeof element=='string')element=document.getElementById(element);if(arguments.length==1)return element;elements.push(element);}
return elements;}
var CONST=CONST||{};var GLOB=GLOB||{};var bbcjs={activex:(typeof(window.ActiveXObject)!="undefined"&&navigator.userAgent.indexOf("Mac")==-1),browser:{ie:!!(window.attachEvent&&!window.opera),opera:!!window.opera,webkit:navigator.userAgent.indexOf('AppleWebKit/')>-1,gecko:navigator.userAgent.indexOf('Gecko')>-1&&navigator.userAgent.indexOf('KHTML')==-1},documentLoaded:false,jscript_version:null,page:location.href.split("/")[location.href.split("/").length-1],qs:location.search.substr(1,location.search.length),defaultTraceLevel:3,lib:{},quietMode:false,version:parseFloat("$Revision: 1.71 $".split(' ')[1]),prevOnLoad:(typeof window.onload==='function')?window.onload:false,client_ip:'',dhtml:(document.getElementById)?true:false,today:new Date()};/*@cc_on
bbcjs.jscript_version=@_jscript_version;@*/bbcjs.addOnLoadItem=function(item){var a=bbcjs.addOnLoadItem,h='handler',t;var f=(typeof item=='function')?item:function(){eval(item);};var s="<scr".concat("ipt defer src='//:' onreadyStatechange='if(this.readyState==\"complete\"){this.parentNode.removeChild(this);bbcjs.addOnLoadItem.",h,"()}'></scr","ipt>");if(bbcjs.documentLoaded)return f();a[h]=(function(prev){return function(){if(arguments.callee.done)return;arguments.callee.done=true;if(t)clearTimeout(t);a[h]=function(){return;};f(prev?prev():prev);};})(a[h]?a[h]:function(){});if(document.addEventListener){document.addEventListener("DOMContentLoaded",a[h],false);}
if(new RegExp('WebKit|Khtml','i').test(navigator.userAgent)||(window.opera&&window.opera.version&&(parseInt(window.opera.version())<9))){(function(){new RegExp('loaded|complete').test(document.ready)?a[h]():t=setTimeout(arguments.callee,10);})();}/*@cc_on@*//*@if(@_win32)document.write(s);/*@end@*/window.onload=function(){return a[h]();};};if(bbcjs.prevOnLoad){bbcjs.addOnLoadItem(bbcjs.prevOnLoad);}
bbcjs.addOnLoadItem(function(){bbcjs.documentLoaded=true;});bbcjs.extend=Object.extend;bbcjs.filter=function(o,f,s){var r=(o.length==undefined)?{}:[];bbcjs.forEach(o,function(v,k){if(f.call(s,v,k)){if(o.length==undefined)r[k]=v;else r.push(v);}});return r;};bbcjs.forEach=function(o,f,s){if(o.length==undefined)
for(var i in o)
f.call(s,o[i],i,o);else
for(var i=0,ol=o.length;i<ol;i++)
f.call(s,o[i],i,o);return o;};bbcjs.map=function(o,f,s){var r=(o.length==undefined)?{}:[];bbcjs.forEach(o,function(v,k){if(o.length==undefined)r[k]=f.call(s,v,k);else r.push(f.call(s,v,k));});return r;};bbcjs.obj2list=function(obj,name,hide){var str='',count=0,display=(!!hide)?'block':'none';name=(name!=undefined)?name:'_root';if(!bbcjs.obj2list.level)str+='<ul>\n';bbcjs.obj2list.level++;bbcjs.obj2list.total++;str+='<li><a href="#" onclick="return bbcjs.o2swap('+bbcjs.obj2list.total+')">'+name+'</a></li>\n';str+='<ul style="display:'+display+';" id="bbcjsnode_'+bbcjs.obj2list.total+'">\n';bbcjs.forEach(obj,function(value,key){if(typeof(value)=='function')str+=('<li><b>'+key+'</b></li>\n');else if(typeof(value)=='object'&&value!==null){if(value.src!=undefined&&value.alt!=undefined){str+=('<li><b>'+key+'</b>: '+value.src+' (image)</li>\n');}
else if(bbcjs.obj2list.level<100&&(key!='prototype'))str+=bbcjs.obj2list(value,key,hide);else if(bbcjs.obj2list.level>=100)str+='<li>Too much recursion...</li>\n';}
else if(value!==null)str+=('<li>'+key+' ['+bbcjs.HTMLOut(value)+'] ('+typeof(value)+')</li>\n');else str+='<li><b>null item</b></li>';count++;});if(!count)str+=('<li>'+obj+'</li>\n');str+='</ul>\n';bbcjs.obj2list.level--;if(!bbcjs.obj2list.level)str+='</ul>\n';return str;};bbcjs.obj2list.level=0;bbcjs.obj2list.total=0;bbcjs.o2swap=function(nn){var node=$("bbcjsnode_"+nn);if(node.style.display=="block")node.style.display="none";else node.style.display="block";return false;};bbcjs.trace=function(str,lvl){if(typeof(lvl)=="undefined")lvl=bbcjs.defaultTraceLevel;if(window.self!=window.top){if((typeof(window.top.frames.tools)!="undefined")&&typeof(window.top.frames.tools.jsh_debug)!="undefined")
window.top.frames.tools.jsh_debug(str,lvl);}
else if((!bbcjs.quietMode)&&(lvl==1)&&(location.href.match(/wc\.bbc/))){str=str.replace(/\<br ?\/?\>/g,"\n");str=str.replace(/\<[a-zA-Z0-9\=\"_\-\' \/]+\>/g,"");alert("JSTools error (this will not appear on live):\n\n"+str);}};bbcjs.clearTraceWindow=function(){if(window.self!=window.top){if((typeof(window.top.frames.tools)!="undefined")&&typeof(window.top.frames.tools.jsh_debug)!="undefined")
window.top.frames.tools.jsh_reset();}};bbcjs.clearTraceWindow();bbcjs.copyObj=Object.clone;bbcjs.HTMLOut=function(html){return"<xmp style='display:inline;'>"+html+"</xmp>";};bbcjs.trace("<b>Loaded url: "+bbcjs.page+"</b>",2);bbcjs.trace('<b style="color:Green;">jst_core.js was included.</b>',2);