(function(){var a;AdSenseGraphics.POS_TOP_LEFT_=0;AdSenseGraphics.POS_TOP_RIGHT_=1;AdSenseGraphics.POS_BOTTOM_LEFT_=2;AdSenseGraphics.POS_BOTTOM_RIGHT_=3;AdSenseGraphics.X_INTERCEPT_TOP_=0;AdSenseGraphics.X_INTERCEPT_BOTTOM_=1;AdSenseGraphics.Y_INTERCEPT_LEFT_=2;AdSenseGraphics.Y_INTERCEPT_RIGHT_=3;AdSenseGraphics.USER_AGENT_=navigator.userAgent;AdSenseGraphics.IS_OPERA_=typeof opera!="undefined";AdSenseGraphics.IS_IE_=!AdSenseGraphics.IS_OPERA_&&AdSenseGraphics.USER_AGENT_.indexOf("MSIE")!=-1; AdSenseGraphics.IS_SAFARI_=!AdSenseGraphics.IS_OPERA_&&AdSenseGraphics.USER_AGENT_.indexOf("Safari")!=-1;AdSenseGraphics.S_CURVE_CLASS_NAME_="curve";AdSenseGraphics.ROUNDED_CORNER_BG_CLASS_NAME_="rc_bg";AdSenseGraphics.ROUNDED_CORNER_BORDER_CLASS_NAME_="rc_border";AdSenseGraphics.SIGMOID_FUNCTION_WIDTH=12;AdSenseGraphics.SIGMOID_FUNCTION_OFFSET=6;function AdSenseGraphics(){}a=AdSenseGraphics.prototype;a.getPixelLeftX_=function(b){return b};a.getPixelRightX_=function(b){return b+1}; a.getPixelBottomY_=function(b){return b};a.getPixelTopY_=function(b){return b+1};a.computeSigmoid_=function(b,d,c){b=12*b/d-6;return c/(1+Math.exp(b))};a.computeSigmoidInverse_=function(b,d,c){if(b<=0)return d;if(b>=c)return 0;b=b/c;b=Math.log((1-b)/b);return d*(b+6)/12};a.computeCircle_=function(b,d){b=Math.sqrt(Math.pow(d,2)-Math.pow(b,2));return isNaN(b)?0:b}; a.addStyleRule_=function(b,d){if(AdSenseGraphics.IS_IE_)document.styleSheets[0].addRule(b,d);else{var c=document.createElement("style");c.type="text/css";var e=AdSenseGraphics.IS_SAFARI_?"innerText":"innerHTML";c[e]=b+"{"+d+"}";b=document.getElementsByTagName("head")[0];b.appendChild(c)}}; a.createDiv_=function(b,d,c,e,f){var h=document.createElement("div"),j="position:absolute;overflow:hidden;left:";j+=b;j+="px;top:";j+=d;j+="px;width:";j+=c;j+="px;height:";j+=e;j+="px;";if(f!=null){j+="opacity:";j+=f;if(AdSenseGraphics.IS_IE_){j+=";filter: alpha(opacity=";j+=Math.round(f*100);j+=");"}}h.style.cssText=j;return h}; a.getCirclePixelIntercepts_=function(b,d,c){var e=new Array(4);e[AdSenseGraphics.Y_INTERCEPT_LEFT_]=this.computeCircle_(this.getPixelLeftX_(b),c);e[AdSenseGraphics.Y_INTERCEPT_RIGHT_]=this.computeCircle_(this.getPixelRightX_(b),c);e[AdSenseGraphics.X_INTERCEPT_BOTTOM_]=this.computeCircle_(this.getPixelBottomY_(d),c);e[AdSenseGraphics.X_INTERCEPT_TOP_]=this.computeCircle_(this.getPixelTopY_(d),c);return e}; a.getSigmoidPixelIntercepts_=function(b,d,c,e){var f=new Array(4);f[AdSenseGraphics.Y_INTERCEPT_LEFT_]=this.computeSigmoid_(this.getPixelLeftX_(b),c,e);f[AdSenseGraphics.Y_INTERCEPT_RIGHT_]=this.computeSigmoid_(this.getPixelRightX_(b),c,e);f[AdSenseGraphics.X_INTERCEPT_BOTTOM_]=this.computeSigmoidInverse_(this.getPixelBottomY_(d),c,e);f[AdSenseGraphics.X_INTERCEPT_TOP_]=this.computeSigmoidInverse_(this.getPixelTopY_(d),c,e);return f}; a.getSigmoidAntiAliasOpacity_=function(b,d,c,e){c=this.getSigmoidPixelIntercepts_(b,d,c,e);b=this.getAntiAliasOpacity_(b,d,c);return b==-1?0:b};a.getCircleAntiAliasOpacity_=function(b,d,c,e){c=this.getCirclePixelIntercepts_(b,d,c);b=this.getAntiAliasOpacity_(b,d,c);if(b==-1)return 0;return e?1-b:b}; a.getAntiAliasOpacity_=function(b,d,c){var e=0,f=new Array(2),h=new Array(2),j=false,m=false,g=false,n=false,k=this.getPixelBottomY_(d);d=this.getPixelTopY_(d);var l=this.getPixelLeftX_(b);b=this.getPixelRightX_(b);if(c[AdSenseGraphics.Y_INTERCEPT_LEFT_]>=k&&c[AdSenseGraphics.Y_INTERCEPT_LEFT_]=l&&c[AdSenseGraphics.X_INTERCEPT_TOP_]=k&&c[AdSenseGraphics.Y_INTERCEPT_RIGHT_]=l&&c[AdSenseGraphics.X_INTERCEPT_BOTTOM_]h[1]?h[0]:h[1];e=f+(h-f)/2}else if(j&&n)e=h[0]*f[1]/2;else if(m&&g)e=1-(1-f[0])*(1-h[1])/2;else if(m&&n){h=f[0]<=f[1]?f[0]:f[1];f=f[0]>f[1]?f[0]:f[1];e= h+(f-h)/2}return e}; a.createSigmoidCurve=function(b,d,c,e,f,h){this.addStyleRule_("#"+b.id+" ."+AdSenseGraphics.S_CURVE_CLASS_NAME_+" div","background-color: "+e);b.style.display="none";e=this.createDiv_(0,0,d,c);e.className=AdSenseGraphics.S_CURVE_CLASS_NAME_;for(var j,m=c-1,g,n,k,l=c-1,q=0;q0){var l=n?d-k:0;k=this.createDiv_(l,0,k,c-h);l=k.style;l.backgroundColor=e;m?(l.borderTop=f):(l.borderBottom=f);b.appendChild(k)}k=c-j;if(k>0){l=m?c-k:0;k=this.createDiv_(0,l,d-h,k);l=k.style;l.backgroundColor=e;n?(l.borderLeft=f):(l.borderRight=f);b.appendChild(k)}this.createRoundedCorner_(b,d,c,j,h,n,m);g.display=""}; a.createRoundedCorner_=function(b,d,c,e,f,h,j){var m=f>0;f=e-f;d=h?0:d-e;var g=j?0:c-e;c=this.createDiv_(d,g,e,e);c.className=AdSenseGraphics.ROUNDED_CORNER_BG_CLASS_NAME_;var n=this.createDiv_(d,g,e,e);n.className=m?AdSenseGraphics.ROUNDED_CORNER_BORDER_CLASS_NAME_:AdSenseGraphics.ROUNDED_CORNER_BG_CLASS_NAME_;for(var k=f,l=e,q=f,o=e,s,t,u=e-1,r=0;r0){g=j?e-s-l:s;g=this.createDiv_(d,g,1,l);n.appendChild(g)}for(p=q-1;p