var dbug={logged:[],timers:{},firebug:false,enabled:false,log:function(){dbug.logged.push(arguments)},nolog:function(A){dbug.logged.push(arguments)},time:function(A){dbug.timers[A]=new Date().getTime()},timeEnd:function(B){if(dbug.timers[B]){var A=new Date().getTime()-dbug.timers[B];dbug.timers[B]=false;dbug.log("%s: %s",B,A)}else{dbug.log("no such timer: %s",B)}},enable:function(B){var A=window.firebug?firebug.d.console.cmd:window.console;if((!!window.console&&!!window.console.warn)||window.firebug){try{dbug.enabled=true;dbug.log=function(){(A.debug||A.log).apply(A,arguments)};dbug.time=function(){A.time.apply(A,arguments)};dbug.timeEnd=function(){A.timeEnd.apply(A,arguments)};if(!B){dbug.log("enabling dbug")}for(var C=0;C<dbug.logged.length;C++){dbug.log.apply(A,dbug.logged[C])}dbug.logged=[]}catch(D){dbug.enable.delay(400)}}},disable:function(){if(dbug.firebug){dbug.enabled=false}dbug.log=dbug.nolog;dbug.time=function(){};dbug.timeEnd=function(){}},cookie:function(D){var C=document.cookie.match("(?:^|;)\\s*jsdebug=([^;]*)");var B=C?unescape(C[1]):false;if((!$defined(D)&&B!="true")||($defined(D)&&D)){dbug.enable();dbug.log("setting debugging cookie");var A=new Date();A.setTime(A.getTime()+(24*60*60*1000));document.cookie="jsdebug=true;expires="+A.toGMTString()+";path=/;"}else{dbug.disableCookie()}},disableCookie:function(){dbug.log("disabling debugging cookie");document.cookie="jsdebug=false;path=/;"}};(function(){var D=!!window.console||!!window.firebug;var B=window.firebug?window.firebug.d.console.cmd:window.console;var C=["debug","info","warn","error","assert","dir","dirxml"];var A=["trace","group","groupEnd","profile","profileEnd","count"];function E(H,F){for(var G=0;G<H.length;G++){dbug[H[G]]=(D&&B[H[G]])?B[H[G]]:F}}E(C,dbug.log);E(A,function(){})})();if((!!window.console&&!!window.console.warn)||window.firebug){dbug.firebug=true;var value=document.cookie.match("(?:^|;)\\s*jsdebug=([^;]*)");var debugCookie=value?unescape(value[1]):false;if(window.location.href.indexOf("jsdebug=true")>0||debugCookie=="true"){dbug.enable()}if(debugCookie=="true"){dbug.log("debugging cookie enabled")}if(window.location.href.indexOf("jsdebugCookie=true")>0){dbug.cookie();if(!dbug.enabled){dbug.enable()}}if(window.location.href.indexOf("jsdebugCookie=false")>0){dbug.disableCookie()}}$extend(Browser,{fixPNG:function(D){try{if(Browser.Engine.trident4){D=document.id(D);if(!D){return D}if(D.get("tag")=="img"&&D.get("src").test(".png")){var G=D.isDisplayed();try{dim=D.getSize()}catch(H){}if(!G){var F={};["visibility","display","position"].each(function(I){F[I]=this.style[I]||""},this);this.setStyles({visibility:"hidden",display:"block",position:"absolute"});dim=D.getSize();this.setStyles(F);D.hide()}var C=new Element("span",{id:(D.id)?D.id:"","class":(D.className)?D.className:"",title:(D.title)?D.title:(D.alt)?D.alt:"",styles:{display:G?"inline-block":"none",width:dim.x,height:dim.y,filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader (src='"+D.src+"', sizingMethod='scale');"},src:D.src});if(D.style.cssText){try{var E={};var B=D.style.cssText.split(";");B.each(function(I){var J=I.split(":");E[J[0]]=J[1]});C.setStyle(E)}catch(H){dbug.log("fixPNG1: ",H)}}if(C.cloneEvents){C.cloneEvents(D)}C.replaces(D)}else{if(D.get("tag")!="img"){var A=D.getStyle("background-image");if(A.test(/\((.+)\)/)){D.setStyles({background:"",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='crop', src="+A.match(/\((.+)\)/)[1]+")"})}}}}}catch(H){dbug.log("fixPNG2: ",H)}},pngTest:/\.png$/,scanForPngs:function(C,B){B=B||"fixPNG";if(document.getElements){C=document.id(C||document.body);C.getElements("img[src$=.png]").addClass(B)}else{var A=$$("img").each(function(D){if(Browser.pngTest(D.src)){D.addClass(B)}})}}});if(Browser.Engine.trident4){window.addEvent("domready",function(){$$("img.fixPNG").each(Browser.fixPNG)})};