if(typeof $$!="Function"){$$=document.getElementsBySelector}var SS_DEFAULT_ISO="en_GB";Object.extend(Element,{setStyle:function(a,d,c){a=$(a);var f=a.style;for(var e in d){if(e=="opacity"){a.setOpacity(d[e])}else{f[(e=="float"||e=="cssFloat")?(f.styleFloat===undefined?"cssFloat":"styleFloat"):(c?e:e.camelize())]=d[e]}}return a}});function sprintf(){if(!arguments||arguments.length<1||!RegExp){return}var k=arguments[0];var i=/([^%]*)%('.|0|\x20)?(-)?(\d+)?(\.\d+)?(%|b|c|d|u|f|o|s|x|X)(.*)/;var s=b=[],c=0,g=0;while(s=i.exec(k)){var j=s[1],p=s[2],t=s[3],o=s[4];var l=s[5],h=s[6],e=s[7];g++;if(h=="%"){d="%"}else{c++;if(c>=arguments.length){}var f=arguments[c];var q="";if(p&&p.substr(0,1)=="'"){q=j.substr(1,1)}else{if(p){q=p}}var m=true;if(t&&t==="-"){m=false}var r=-1;if(o){r=parseInt(o)}var n=-1;if(l&&h=="f"){n=parseInt(l.substring(1))}var d=f;if(h=="b"){d=parseInt(f).toString(2)}else{if(h=="c"){d=String.fromCharCode(parseInt(f))}else{if(h=="d"){d=parseInt(f)?parseInt(f):0}else{if(h=="u"){d=Math.abs(f)}else{if(h=="f"){d=(n>-1)?Math.round(parseFloat(f)*Math.pow(10,n))/Math.pow(10,n):parseFloat(f)}else{if(h=="o"){d=parseInt(f).toString(8)}else{if(h=="s"){d=f}else{if(h=="x"){d=(""+parseInt(f).toString(16)).toLowerCase()}else{if(h=="X"){d=(""+parseInt(f).toString(16)).toUpperCase()}}}}}}}}}}k=j+d+e}return k}if(!window.console){window.console={timers:{},openwin:function(){window.top.debugWindow=window.open("","Debug","left=0,top=0,width=300,height=700,scrollbars=yes,status=yes,resizable=yes");window.top.debugWindow.opener=self;window.top.debugWindow.document.open();window.top.debugWindow.document.write("<html><head><title>debug window</title></head><body><hr><pre>")},log:function(){if(Debug.isLive()){return}if(!window.top.debugWindow){console.openwin()}var a=0;content="";if(arguments.length==1&&typeof arguments[0]!="object"){content=arguments[0]}else{if(arguments.length>1&&typeof arguments[0]=="string"){content=sprintf(arguments[0],Array.prototype.slice.call(arguments,1))}}if(window.top.debugWindow.document){window.top.debugWindow.document.write(content+"\n")}},debug:this.log,time:function(a){window.console.timers[a]=new Date().getTime()},timeEnd:function(c){var a=new Date().getTime()-window.console.timers[c];console.log(["<strong>",c,"</strong>: ",a,"ms"].join(""))}}}Number.prototype.CURRENCIES={en_GB:"$ ###,###.##"};Number.prototype.toCurrency=function(a){if(!a){a=SS_DEFAULT_ISO}return"$"+this.toFixed(2)};String.prototype.ucfirst=function(){var a=this.substr(0,1).toUpperCase();return this.substr(0,1).toUpperCase()+this.substr(1,this.length)};Debug=Class.create();Debug={environment_type:"live",initialize:function(){if(window.location.href.match(/\?(.*)debug_javascript/)){this.environment_type="dev"}if(window.location.href.match(/\?(.*)debug_behaviour/)){Behaviour.debug()}},set_environment_type:function(a){this.environment_type=a},isDev:function(){return(window.location.href.match(/test\.|dev\./)||this.environment_type=="dev"||this.environment_type=="test")},isTest:function(){return(window.location.href.match(/test\./)||this.environment_type=="test")},isLive:function(){return !Debug.isDev()},show:function(){if(this.isDev()||this.isTest()){console.debug.apply(console,arguments)}},debug:this.debug,log:function(){if(this.isDev()||this.isTest()){console.log.apply(console,arguments)}}};Debug.initialize();getFlashPlayerVersion=function(){var f=new PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var a=navigator.plugins["Shockwave Flash"];if(a&&a.description){f=new PlayerVersion(a.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var d=1;var c=3;while(d){try{c++;d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+c);f=new PlayerVersion([c,0,0])}catch(g){d=null}}}else{try{var d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(g){try{var d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");f=new PlayerVersion([6,0,21]);d.AllowScriptAccess="always"}catch(g){if(f.major==6){return f}}try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(g){}}if(d!=null){f=new PlayerVersion(d.GetVariable("$version").split(" ")[1].split(","))}}}return f};PlayerVersion=function(a){this.major=a[0]!=null?parseInt(a[0]):0;this.minor=a[1]!=null?parseInt(a[1]):0;this.rev=a[2]!=null?parseInt(a[2]):0};