var curvyCornersVerbose=false;
function browserdetect(){var a=navigator.userAgent.toLowerCase();if(this.isIE=a.indexOf("msie")>-1){this.ieVer=/msie\s(\d\.\d)/.exec(a)[1];this.quirksMode=!document.compatMode||document.compatMode.indexOf("BackCompat")>-1;this.get_style=function(b,c){if(!(c in b.currentStyle))return"";var d=/^([\d.]+)(\w*)/.exec(b.currentStyle[c]);if(!d)return b.currentStyle[c];if(d[1]==0)return"0";if(d[2]&&d[2]!=="px"){var f=b.style.left,g=b.runtimeStyle.left;b.runtimeStyle.left=b.currentStyle.left;b.style.left=
d[1]+d[2];d[0]=b.style.pixelLeft;b.style.left=f;b.runtimeStyle.left=g}return d[0]};this.supportsCorners=false}else{this.ieVer=this.quirksMode=0;this.get_style=function(b,c){c=c.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return document.defaultView.getComputedStyle(b,"").getPropertyValue(c)};this.isSafari=a.indexOf("safari")!=-1;this.isWebKit=a.indexOf("webkit")!=-1;if(this.isOp="opera"in window)this.supportsCorners=(this.isOp=window.opera.version())>=10.5;else{if(!this.isWebkit)if(!(this.isMoz=
a.indexOf("firefox")!==-1))for(a=document.childNodes.length;--a>=0;)if("style"in document.childNodes[a]){this.isMoz="MozBorderRadius"in document.childNodes[a];break}this.supportsCorners=this.isWebKit||this.isMoz}}}var curvyBrowser=new browserdetect;if(curvyBrowser.isIE)try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}function curvyCnrSpec(a){this.selectorText=a;this.tlR=this.trR=this.blR=this.brR=0;this.tlu=this.tru=this.blu=this.bru="";this.antiAlias=true}
curvyCnrSpec.prototype.setcorner=function(a,b,c,d){if(a){propname=a.charAt(0)+b.charAt(0);this[propname+"R"]=parseInt(c);this[propname+"u"]=d}else{this.tlR=this.trR=this.blR=this.brR=parseInt(c);this.tlu=this.tru=this.blu=this.bru=d}};
curvyCnrSpec.prototype.get=function(a){if(/^(t|b)(l|r)(R|u)$/.test(a))return this[a];if(/^(t|b)(l|r)Ru$/.test(a)){a=a.charAt(0)+a.charAt(1);return this[a+"R"]+this[a+"u"]}if(/^(t|b)Ru?$/.test(a)){var b=a.charAt(0);b+=this[b+"lR"]>this[b+"rR"]?"l":"r";b=this[b+"R"];if(a.length===3&&a.charAt(2)==="u")b+=this.u;return b}throw Error("Don't recognize property "+a);};
curvyCnrSpec.prototype.radiusdiff=function(a){if(a!=="t"&&a!=="b")throw Error("Param must be 't' or 'b'");return Math.abs(this[a+"lR"]-this[a+"rR"])};curvyCnrSpec.prototype.setfrom=function(a){this.tlu=this.tru=this.blu=this.bru="px";if("tl"in a)this.tlR=a.tl.radius;if("tr"in a)this.trR=a.tr.radius;if("bl"in a)this.blR=a.bl.radius;if("br"in a)this.brR=a.br.radius;if("antiAlias"in a)this.antiAlias=a.antiAlias};
curvyCnrSpec.prototype.cloneOn=function(a){var b=["tl","tr","bl","br"],c=0,d,f;for(d in b)if(!isNaN(d)){f=this[b[d]+"u"];if(f!==""&&f!=="px"){c=new curvyCnrSpec;break}}if(c){var g,i,h=curvyBrowser.get_style(a,"left");for(d in b)if(!isNaN(d)){g=b[d];f=this[g+"u"];i=this[g+"R"];if(f!=="px"){h=a.style.left;a.style.left=i+f;i=a.style.pixelLeft;a.style.left=h}c[g+"R"]=i;c[g+"u"]="px"}a.style.left=h}else c=this;return c};
curvyCnrSpec.prototype.radiusSum=function(a){if(a!=="t"&&a!=="b")throw Error("Param must be 't' or 'b'");return this[a+"lR"]+this[a+"rR"]};curvyCnrSpec.prototype.radiusCount=function(a){var b=0;this[a+"lR"]&&++b;this[a+"rR"]&&++b;return b};curvyCnrSpec.prototype.cornerNames=function(){var a=[];this.tlR&&a.push("tl");this.trR&&a.push("tr");this.blR&&a.push("bl");this.brR&&a.push("br");return a};
function operasheet(a){a=document.styleSheets.item(a).ownerNode.text;a=a.replace(/\/\*(\n|\r|.)*?\*\//g,"");var b=RegExp("^\\s*([\\w.#][-\\w.#, ]+)[\\n\\s]*\\{([^}]+border-((top|bottom)-(left|right)-)?radius[^}]*)\\}","mg"),c;for(this.rules=[];(c=b.exec(a))!==null;){for(var d=RegExp("(..)border-((top|bottom)-(left|right)-)?radius:\\s*([\\d.]+)(in|em|px|ex|pt)","g"),f,g=new curvyCnrSpec(c[1]);(f=d.exec(c[2]))!==null;)f[1]!=="z-"&&g.setcorner(f[3],f[4],f[5],f[6]);this.rules.push(g)}}
operasheet.contains_border_radius=function(a){return/border-((top|bottom)-(left|right)-)?radius/.test(document.styleSheets.item(a).ownerNode.text)};
function curvyCorners(){var a,b,c,d,f;if(typeof arguments[0]!=="object")throw curvyCorners.newError("First parameter of curvyCorners() must be an object.");if(arguments[0]instanceof curvyCnrSpec){d=arguments[0];if(!d.selectorText&&typeof arguments[1]==="string")d.selectorText=arguments[1]}else{if(typeof arguments[1]!=="object"&&typeof arguments[1]!=="string")throw curvyCorners.newError("Second parameter of curvyCorners() must be an object or a class name.");b=arguments[1];if(typeof b!=="string")b=
"";if(b!==""&&b.charAt(0)!=="."&&"autoPad"in arguments[0])b="."+b;d=new curvyCnrSpec(b);d.setfrom(arguments[0])}if(d.selectorText){f=0;var g=d.selectorText.replace(/\s+$/,"").split(/,\s*/);c=[];for(a=0;a<g.length;++a){if((b=g[a].lastIndexOf("#"))!==-1)g[a]=g[a].substr(b);c=c.concat(curvyCorners.getElementsBySelector(g[a].split(/\s+/)))}}else{f=1;c=arguments}a=f;for(b=c.length;a<b;++a){f=c[a];g=false;if(f.className)(g=f.className.indexOf("curvyIgnore")!==-1)||(f.className+=" curvyIgnore");else f.className=
"curvyIgnore";if(!g){if(f.className.indexOf("curvyRedraw")!==-1){if(typeof curvyCorners.redrawList==="undefined")curvyCorners.redrawList=[];curvyCorners.redrawList.push({node:f,spec:d,copy:f.cloneNode(false)})}(new curvyObject(d,f)).applyCorners()}}}curvyCorners.prototype.applyCornersToAll=function(){throw curvyCorners.newError("This function is now redundant. Just call curvyCorners(). See documentation.");};
curvyCorners.redraw=function(){if(!curvyBrowser.supportsCorners){if(!curvyCorners.redrawList)throw curvyCorners.newError("curvyCorners.redraw() has nothing to redraw.");var a=curvyCorners.block_redraw;curvyCorners.block_redraw=true;for(var b in curvyCorners.redrawList)if(!isNaN(b)){var c=curvyCorners.redrawList[b];if(c.node.clientWidth){for(var d=c.copy.cloneNode(false),f=c.node.firstChild;f!=null;f=f.nextSibling)if(f.className==="autoPadDiv")break;if(!f){curvyCorners.alert("Couldn't find autoPad DIV");
break}c.node.parentNode.replaceChild(d,c.node);for(var g=f.getElementsByTagName("script"),i=g.length-1;i>=0;--i)g[i].parentNode.removeChild(g[i]);for(;f.firstChild;)d.appendChild(f.removeChild(f.firstChild));c=new curvyObject(c.spec,c.node=d);c.applyCorners()}}curvyCorners.block_redraw=a}};
curvyCorners.adjust=function(a,b,c){if(!curvyBrowser.supportsCorners){if(!curvyCorners.redrawList)throw curvyCorners.newError("curvyCorners.adjust() has nothing to adjust.");var d,f=curvyCorners.redrawList.length;for(d=0;d<f;++d)if(curvyCorners.redrawList[d].node===a)break;if(d===f)throw curvyCorners.newError("Object not redrawable");a=curvyCorners.redrawList[d].copy}if(b.indexOf(".")===-1)a[b]=c;else eval("obj."+b+"='"+c+"'")};curvyCorners.handleWinResize=function(){curvyCorners.block_redraw||curvyCorners.redraw()};
curvyCorners.setWinResize=function(a){curvyCorners.block_redraw=!a};curvyCorners.newError=function(a){return Error("curvyCorners Error:\n"+a)};curvyCorners.alert=function(a){if(typeof curvyCornersVerbose==="undefined"||curvyCornersVerbose)alert(a)};
function curvyObject(a,b){var c;this.box=b;this.settings=a;this.topContainer=this.bottomContainer=this.shell=c=null;var d=this.box.clientWidth;if("canHaveChildren"in this.box&&!this.box.canHaveChildren||this.box.tagName==="TABLE")throw Error(this.errmsg("You cannot apply corners to "+this.box.tagName+" elements.","Error"));if(!d&&curvyBrowser.isIE){this.box.style.zoom=1;d=this.box.clientWidth}if(!d&&curvyBrowser.get_style(this.box,"display")==="inline"){this.box.style.display="inline-block";curvyCorners.alert(this.errmsg("Converting inline element to inline-block",
"warning"));d=this.box.clientWidth}if(!d){if(!this.box.parentNode)throw this.newError("box has no parent!");for(c=this.box;;c=c.parentNode){if(!c||c.tagName==="BODY"){this.applyCorners=function(){};curvyCorners.alert(this.errmsg("zero-width box with no accountable parent","warning"));return}if(curvyBrowser.get_style(c,"display")==="none")break}var f=c.style.display;c.style.display="block";d=this.box.clientWidth}if(d){if(a instanceof curvyCnrSpec)this.spec=a.cloneOn(this.box);else{this.spec=new curvyCnrSpec("");
this.spec.setfrom(this.settings)}var g=curvyBrowser.get_style(this.box,"borderTopWidth"),i=curvyBrowser.get_style(this.box,"borderBottomWidth"),h=curvyBrowser.get_style(this.box,"borderLeftWidth"),o=curvyBrowser.get_style(this.box,"borderRightWidth"),C=curvyBrowser.get_style(this.box,"borderTopColor"),D=curvyBrowser.get_style(this.box,"borderBottomColor"),E=curvyBrowser.get_style(this.box,"borderLeftColor"),s=curvyBrowser.get_style(this.box,"borderRightColor"),T=curvyBrowser.get_style(this.box,"borderTopStyle"),
U=curvyBrowser.get_style(this.box,"borderBottomStyle"),V=curvyBrowser.get_style(this.box,"borderLeftStyle"),W=curvyBrowser.get_style(this.box,"borderRightStyle"),R=curvyBrowser.get_style(this.box,"backgroundColor"),S=curvyBrowser.get_style(this.box,"backgroundImage"),X=curvyBrowser.get_style(this.box,"backgroundRepeat"),q,v;if(this.box.currentStyle&&this.box.currentStyle.backgroundPositionX){q=curvyBrowser.get_style(this.box,"backgroundPositionX");v=curvyBrowser.get_style(this.box,"backgroundPositionY")}else{q=
curvyBrowser.get_style(this.box,"backgroundPosition");q=q.split(" ");v=q.length===2?q[1]:0;q=q[0]}var r=curvyBrowser.get_style(this.box,"position"),Y=curvyBrowser.get_style(this.box,"paddingTop"),Z=curvyBrowser.get_style(this.box,"paddingBottom"),$=curvyBrowser.get_style(this.box,"paddingLeft"),aa=curvyBrowser.get_style(this.box,"paddingRight");curvyBrowser.get_style(this.box,"border");var F=curvyBrowser.ieVer>7?curvyBrowser.get_style(this.box,"filter"):null,G=this.spec.get("tR"),H=this.spec.get("bR"),
w=function(k){if(typeof k==="number")return k;if(typeof k!=="string")throw Error("unexpected styleToNPx type "+typeof k);var x=/^[-\d.]([a-z]+)$/.exec(k);if(x&&x[1]!="px")throw Error("Unexpected unit "+x[1]);if(isNaN(k=parseInt(k)))k=0;return k};try{this.borderWidth=w(g);this.borderWidthB=w(i);this.borderWidthL=w(h);this.borderWidthR=w(o);this.boxColour=curvyObject.format_colour(R);this.topPadding=w(Y);this.bottomPadding=w(Z);this.leftPadding=w($);this.rightPadding=w(aa);this.boxWidth=d;this.boxHeight=
this.box.clientHeight;this.borderColour=curvyObject.format_colour(C);this.borderColourB=curvyObject.format_colour(D);this.borderColourL=curvyObject.format_colour(E);this.borderColourR=curvyObject.format_colour(s);this.borderString=this.borderWidth+"px "+T+" "+this.borderColour;this.borderStringB=this.borderWidthB+"px "+U+" "+this.borderColourB;this.borderStringL=this.borderWidthL+"px "+V+" "+this.borderColourL;this.borderStringR=this.borderWidthR+"px "+W+" "+this.borderColourR;this.backgroundImage=
S!="none"?S:"";this.backgroundRepeat=X}catch(ba){throw this.newError(ba.message);}var I=this.boxHeight,J=d;if(curvyBrowser.isOp){q=w(q);v=w(v);if(q){d=J+this.borderWidthL+this.borderWidthR;if(q>d)q=d;q=d/q*100+"%"}if(v){d=I+this.borderWidth+this.borderWidthB;if(v>d)v=d;v=d/v*100+"%"}}if(!curvyBrowser.quirksMode){this.boxWidth-=this.leftPadding+this.rightPadding;this.boxHeight-=this.topPadding+this.bottomPadding}this.contentContainer=document.createElement("div");if(F)this.contentContainer.style.filter=
F;for(;this.box.firstChild;)this.contentContainer.appendChild(this.box.removeChild(this.box.firstChild));if(r!="absolute")this.box.style.position="relative";this.box.style.padding="0";this.box.style.border=this.box.style.backgroundImage="none";this.box.style.backgroundColor="transparent";this.box.style.width=J+this.borderWidthL+this.borderWidthR+"px";this.box.style.height=I+this.borderWidth+this.borderWidthB+"px";r=document.createElement("div");r.style.position="absolute";if(F)r.style.filter=F;r.style.width=
curvyBrowser.quirksMode?J+this.borderWidthL+this.borderWidthR+"px":J+"px";r.style.height=I+this.borderWidth+this.borderWidthB-G-H<=0?"0":I+this.borderWidth+this.borderWidthB-G-H+"px";r.style.padding="0";r.style.top=G+"px";r.style.left="0";if(this.borderWidthL)r.style.borderLeft=this.borderStringL;if(this.borderWidth&&!G)r.style.borderTop=this.borderString;if(this.borderWidthR)r.style.borderRight=this.borderStringR;if(this.borderWidthB&&!H)r.style.borderBottom=this.borderStringB;r.style.backgroundColor=
R;r.style.backgroundImage=this.backgroundImage;r.style.backgroundRepeat=this.backgroundRepeat;r.style.direction="ltr";this.shell=this.box.appendChild(r);d=curvyBrowser.get_style(this.shell,"width");if(d===""||d==="auto"||d.indexOf("%")!==-1)throw this.newError("Shell width is "+d);this.boxWidth=d!=""&&d!="auto"&&d.indexOf("%")==-1?parseInt(d):this.shell.clientWidth;this.applyCorners=function(){this.backgroundPosX=this.backgroundPosY=0;if(this.backgroundObject){var k=function(K,P,Q){if(K===0)return 0;
if(K==="right"||K==="bottom")return Q-P;if(K==="center")return(Q-P)/2;if(K.indexOf("%")>0)return(Q-P)*100/parseInt(K);return w(K)};this.backgroundPosX=k(q,this.backgroundObject.width,J);this.backgroundPosY=k(v,this.backgroundObject.height,I)}else if(this.backgroundImage){this.backgroundPosX=w(q);this.backgroundPosY=w(v)}if(G){k=document.createElement("div");k.style.width=this.boxWidth+"px";k.style.fontSize="1px";k.style.overflow="hidden";k.style.position="absolute";k.style.paddingLeft=this.borderWidth+
"px";k.style.paddingRight=this.borderWidth+"px";k.style.height=G+"px";k.style.top=-G+"px";k.style.left=-this.borderWidthL+"px";this.topContainer=this.shell.appendChild(k)}if(H){k=document.createElement("div");k.style.width=this.boxWidth+"px";k.style.fontSize="1px";k.style.overflow="hidden";k.style.position="absolute";k.style.paddingLeft=this.borderWidthB+"px";k.style.paddingRight=this.borderWidthB+"px";k.style.height=H+"px";k.style.bottom=-H+"px";k.style.left=-this.borderWidthL+"px";this.bottomContainer=
this.shell.appendChild(k)}k=this.spec.cornerNames();for(var x in k)if(!isNaN(x)){var A=k[x],p=this.spec[A+"R"],m,y,B,t;if(A=="tr"||A=="tl"){m=this.borderWidth;y=this.borderColour;t=this.borderWidth}else{m=this.borderWidthB;y=this.borderColourB;t=this.borderWidthB}B=p-t;m=document.createElement("div");m.style.height=this.spec.get(A+"Ru");m.style.width=this.spec.get(A+"Ru");m.style.position="absolute";m.style.fontSize="1px";m.style.overflow="hidden";var n,l,L,u=F?parseInt(/alpha\(opacity.(\d+)\)/.exec(F)[1]):
100;for(n=0;n<p;++n){var M=n+1>=B?-1:Math.floor(Math.sqrt(Math.pow(B,2)-Math.pow(n+1,2)))-1;if(B!=p)var j=n>=B?-1:Math.ceil(Math.sqrt(Math.pow(B,2)-Math.pow(n,2))),N=n+1>=p?-1:Math.floor(Math.sqrt(Math.pow(p,2)-Math.pow(n+1,2)))-1;var O=n>=p?-1:Math.ceil(Math.sqrt(Math.pow(p,2)-Math.pow(n,2)));M>-1&&this.drawPixel(n,0,this.boxColour,u,M+1,m,true,p);if(B!=p)if(this.spec.antiAlias){for(l=M+1;l<j;++l)if(this.backgroundImage!=""){L=curvyObject.pixelFraction(n,l,B)*100;this.drawPixel(n,l,y,u,1,m,L>=30,
p)}else if(this.boxColour!=="transparent"){L=curvyObject.BlendColour(this.boxColour,y,curvyObject.pixelFraction(n,l,B));this.drawPixel(n,l,L,u,1,m,false,p)}else this.drawPixel(n,l,y,u>>1,1,m,false,p);if(N>=j){if(j==-1)j=0;this.drawPixel(n,j,y,u,N-j+1,m,false,0)}L=y;l=N}else N>M&&this.drawPixel(n,M+1,y,u,N-M,m,false,0);else{L=this.boxColour;l=M}if(this.spec.antiAlias&&this.boxColour!=="transparent")for(;++l<O;)this.drawPixel(n,l,L,curvyObject.pixelFraction(n,l,p)*u,1,m,t<=0,p)}y=0;for(B=m.childNodes.length;y<
B;++y){t=m.childNodes[y];n=parseInt(t.style.top);u=parseInt(t.style.left);O=parseInt(t.style.height);if(A=="tl"||A=="bl")t.style.left=p-u-1+"px";if(A=="tr"||A=="tl")t.style.top=p-O-n+"px";t.style.backgroundRepeat=this.backgroundRepeat;if(this.backgroundImage)switch(A){case "tr":t.style.backgroundPosition=this.backgroundPosX-this.borderWidthL+p-J-u+"px "+(this.backgroundPosY+O+n+this.borderWidth-p)+"px";break;case "tl":t.style.backgroundPosition=this.backgroundPosX-p+u+1+this.borderWidthL+"px "+(this.backgroundPosY-
p+O+n+this.borderWidth)+"px";break;case "bl":t.style.backgroundPosition=this.backgroundPosX-p+u+1+this.borderWidthL+"px "+(this.backgroundPosY-I-this.borderWidth+(curvyBrowser.quirksMode?n:-n)+p)+"px";break;case "br":t.style.backgroundPosition=curvyBrowser.quirksMode?this.backgroundPosX-this.borderWidthL-J+p-u+"px "+(this.backgroundPosY-I-this.borderWidth+n+p)+"px":this.backgroundPosX-this.borderWidthL-J+p-u+"px "+(this.backgroundPosY-I-this.borderWidth+p-n)+"px"}}switch(A){case "tl":m.style.top=
m.style.left="0";this.topContainer.appendChild(m);break;case "tr":m.style.top=m.style.right="0";this.topContainer.appendChild(m);break;case "bl":m.style.bottom=m.style.left="0";this.bottomContainer.appendChild(m);break;case "br":m.style.bottom=m.style.right="0";this.bottomContainer.appendChild(m)}}x={t:this.spec.radiusdiff("t"),b:this.spec.radiusdiff("b")};for(z in x)if(typeof z!=="function")if(this.spec.get(z+"R")){if(x[z]){l=this.spec[z+"lR"]<this.spec[z+"rR"]?z+"l":z+"r";j=document.createElement("div");
j.style.height=x[z]+"px";j.style.width=this.spec.get(l+"Ru");j.style.position="absolute";j.style.fontSize="1px";j.style.overflow="hidden";j.style.backgroundColor=this.boxColour;if(F)j.style.filter=F;j.style.backgroundImage=this.backgroundImage;j.style.backgroundRepeat=this.backgroundRepeat;switch(l){case "tl":j.style.bottom=j.style.left="0";j.style.borderLeft=this.borderStringL;j.style.backgroundPosition=this.backgroundPosX+"px "+(this.borderWidth+this.backgroundPosY-this.spec.tlR)+"px";this.topContainer.appendChild(j);
break;case "tr":j.style.bottom=j.style.right="0";j.style.borderRight=this.borderStringR;j.style.backgroundPosition=this.backgroundPosX-this.boxWidth+this.spec.trR+"px "+(this.borderWidth+this.backgroundPosY-this.spec.trR)+"px";this.topContainer.appendChild(j);break;case "bl":j.style.top=j.style.left="0";j.style.borderLeft=this.borderStringL;j.style.backgroundPosition=this.backgroundPosX+"px "+(this.backgroundPosY-this.borderWidth-this.boxHeight+x[z]+this.spec.blR)+"px";this.bottomContainer.appendChild(j);
break;case "br":j.style.top=j.style.right="0";j.style.borderRight=this.borderStringR;j.style.backgroundPosition=this.borderWidthL+this.backgroundPosX-this.boxWidth+this.spec.brR+"px "+(this.backgroundPosY-this.borderWidth-this.boxHeight+x[z]+this.spec.brR)+"px";this.bottomContainer.appendChild(j)}}l=document.createElement("div");if(F)l.style.filter=F;l.style.position="relative";l.style.fontSize="1px";l.style.overflow="hidden";l.style.width=this.fillerWidth(z);l.style.backgroundColor=this.boxColour;
l.style.backgroundImage=this.backgroundImage;l.style.backgroundRepeat=this.backgroundRepeat;switch(z){case "t":if(this.topContainer){l.style.height=curvyBrowser.quirksMode?100+G+"px":100+G-this.borderWidth+"px";l.style.marginLeft=this.spec.tlR?this.spec.tlR-this.borderWidthL+"px":"0";l.style.borderTop=this.borderString;if(this.backgroundImage){j=this.spec.tlR?this.borderWidthL+this.backgroundPosX-this.spec.tlR+"px ":this.backgroundPosX+"px ";l.style.backgroundPosition=j+this.backgroundPosY+"px";this.shell.style.backgroundPosition=
this.backgroundPosX+"px "+(this.backgroundPosY-G+this.borderWidthL)+"px"}this.topContainer.appendChild(l)}break;case "b":if(this.bottomContainer){l.style.height=curvyBrowser.quirksMode?H+"px":H-this.borderWidthB+"px";l.style.marginLeft=this.spec.blR?this.spec.blR-this.borderWidthL+"px":"0";l.style.borderBottom=this.borderStringB;if(this.backgroundImage){j=this.spec.blR?this.backgroundPosX+this.borderWidthL-this.spec.blR+"px ":this.backgroundPosX+"px ";l.style.backgroundPosition=j+(this.backgroundPosY-
I-this.borderWidth+H)+"px"}this.bottomContainer.appendChild(l)}}}this.contentContainer.style.position="absolute";this.contentContainer.className="autoPadDiv";this.contentContainer.style.left=this.borderWidthL+"px";this.contentContainer.style.paddingTop=this.topPadding+"px";this.contentContainer.style.top=this.borderWidth+"px";this.contentContainer.style.paddingLeft=this.leftPadding+"px";this.contentContainer.style.paddingRight=this.rightPadding+"px";z=J;curvyBrowser.quirksMode||(z-=this.leftPadding+
this.rightPadding);this.contentContainer.style.width=z+"px";this.contentContainer.style.textAlign=curvyBrowser.get_style(this.box,"textAlign");this.box.style.textAlign="left";this.box.appendChild(this.contentContainer);if(c)c.style.display=f};if(this.backgroundImage){q=this.backgroundCheck(q);v=this.backgroundCheck(v);if(this.backgroundObject){this.backgroundObject.holdingElement=this;this.dispatch=this.applyCorners;this.applyCorners=function(){if(this.backgroundObject.complete)this.dispatch();else this.backgroundObject.onload=
new Function("curvyObject.dispatch(this.holdingElement);")}}}}else{curvyCorners.alert(this.errmsg("zero-width box, cannot display","error"));this.applyCorners=function(){}}}curvyObject.prototype.backgroundCheck=function(a){if(a==="top"||a==="left"||parseInt(a)===0)return 0;if(!/^[-\d.]+px$/.test(a)&&!this.backgroundObject){this.backgroundObject=new Image;this.backgroundObject.src=function(b){var c=/url\("?([^'"]+)"?\)/.exec(b);return c?c[1]:b}(this.backgroundImage)}return a};
curvyObject.dispatch=function(a){if("dispatch"in a)a.dispatch();else throw a.newError("No dispatch function");};
curvyObject.prototype.drawPixel=function(a,b,c,d,f,g,i,h){var o=document.createElement("div");o.style.height=f+"px";o.style.width="1px";o.style.position="absolute";o.style.fontSize="1px";o.style.overflow="hidden";f=this.spec.get("tR");o.style.backgroundColor=c;if(i&&this.backgroundImage!=""){o.style.backgroundImage=this.backgroundImage;o.style.backgroundPosition="-"+(this.boxWidth-(h-a)+this.borderWidth)+"px -"+(this.boxHeight+f+b-this.borderWidth)+"px"}d!=100&&curvyObject.setOpacity(o,d);o.style.top=
b+"px";o.style.left=a+"px";g.appendChild(o)};curvyObject.prototype.fillerWidth=function(a){var b;b=curvyBrowser.quirksMode?0:this.spec.radiusCount(a)*this.borderWidthL;if((a=this.boxWidth-this.spec.radiusSum(a)+b)<0)throw this.newError("Radius exceeds box width");return a+"px"};
curvyObject.prototype.errmsg=function(a,b){var c="\ntag: "+this.box.tagName;if(this.box.id)c+="\nid: "+this.box.id;if(this.box.className)c+="\nclass: "+this.box.className;var d;if((d=this.box.parentNode)===null)c+="\n(box has no parent)";else{c+="\nParent tag: "+d.tagName;if(d.id)c+="\nParent ID: "+d.id;if(d.className)c+="\nParent class: "+d.className}if(b===undefined)b="warning";return"curvyObject "+b+":\n"+a+c};curvyObject.prototype.newError=function(a){return Error(this.errmsg(a,"exception"))};
curvyObject.IntToHex=function(a){var b=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];return b[a>>>4]+""+b[a&15]};
curvyObject.BlendColour=function(a,b,c){if(a==="transparent"||b==="transparent")throw this.newError("Cannot blend with transparent");if(a.charAt(0)!=="#")a=curvyObject.format_colour(a);if(b.charAt(0)!=="#")b=curvyObject.format_colour(b);var d=parseInt(a.substr(1,2),16),f=parseInt(a.substr(3,2),16);a=parseInt(a.substr(5,2),16);var g=parseInt(b.substr(1,2),16),i=parseInt(b.substr(3,2),16);b=parseInt(b.substr(5,2),16);if(c>1||c<0)c=1;d=Math.round(d*c+g*(1-c));if(d>255)d=255;if(d<0)d=0;f=Math.round(f*
c+i*(1-c));if(f>255)f=255;if(f<0)f=0;c=Math.round(a*c+b*(1-c));if(c>255)c=255;if(c<0)c=0;return"#"+curvyObject.IntToHex(d)+curvyObject.IntToHex(f)+curvyObject.IntToHex(c)};
curvyObject.pixelFraction=function(a,b,c){c=c*c;var d=Array(2),f=Array(2),g=0,i="",h=Math.sqrt(c-Math.pow(a,2));if(h>=b&&h<b+1){i="Left";d[g]=0;f[g]=h-b;++g}h=Math.sqrt(c-Math.pow(b+1,2));if(h>=a&&h<a+1){i+="Top";d[g]=h-a;f[g]=1;++g}h=Math.sqrt(c-Math.pow(a+1,2));if(h>=b&&h<b+1){i+="Right";d[g]=1;f[g]=h-b;++g}h=Math.sqrt(c-Math.pow(b,2));if(h>=a&&h<a+1){i+="Bottom";d[g]=h-a;f[g]=0}switch(i){case "LeftRight":a=Math.min(f[0],f[1])+(Math.max(f[0],f[1])-Math.min(f[0],f[1]))/2;break;case "TopRight":a=
1-(1-d[0])*(1-f[1])/2;break;case "TopBottom":a=Math.min(d[0],d[1])+(Math.max(d[0],d[1])-Math.min(d[0],d[1]))/2;break;case "LeftBottom":a=f[0]*d[1]/2;break;default:a=1}return a};curvyObject.rgb2Array=function(a){return a.substring(4,a.indexOf(")")).split(", ")};
curvyObject.rgb2Hex=function(a){try{var b=curvyObject.rgb2Array(a),c=parseInt(b[0]),d=parseInt(b[1]),f=parseInt(b[2]),g="#"+curvyObject.IntToHex(c)+curvyObject.IntToHex(d)+curvyObject.IntToHex(f)}catch(i){a="getMessage"in i?i.getMessage():i.message;throw Error("Error ("+a+") converting RGB value to Hex in rgb2Hex");}return g};
curvyObject.setOpacity=function(a,b){b=b==100?99.999:b;if(curvyBrowser.isSafari&&a.tagName!="IFRAME"){var c=curvyObject.rgb2Array(a.style.backgroundColor),d=parseInt(c[0]),f=parseInt(c[1]);c=parseInt(c[2]);a.style.backgroundColor="rgba("+d+", "+f+", "+c+", "+b/100+")"}else if(typeof a.style.opacity!=="undefined")a.style.opacity=b/100;else if(typeof a.style.MozOpacity!=="undefined")a.style.MozOpacity=b/100;else if(typeof a.style.filter!=="undefined")a.style.filter="alpha(opacity="+b+")";else if(typeof a.style.KHTMLOpacity!==
"undefined")a.style.KHTMLOpacity=b/100};curvyCorners.addEvent=function(a,b,c,d){if(a.addEventListener){a.addEventListener(b,c,d);return true}if(a.attachEvent)return a.attachEvent("on"+b,c);a["on"+b]=c;return false};if(typeof addEvent==="undefined")addEvent=curvyCorners.addEvent;
curvyObject.getComputedColour=function(a){var b=document.createElement("DIV");b.style.backgroundColor=a;document.body.appendChild(b);if(window.getComputedStyle){a=document.defaultView.getComputedStyle(b,null).getPropertyValue("background-color");b.parentNode.removeChild(b);if(a.substr(0,3)==="rgb")a=curvyObject.rgb2Hex(a);return a}else{var c=document.body.createTextRange();c.moveToElementText(b);c.execCommand("ForeColor",false,a);a=c.queryCommandValue("ForeColor");a="rgb("+(a&255)+", "+((a&65280)>>
8)+", "+((a&16711680)>>16)+")";b.parentNode.removeChild(b);return curvyObject.rgb2Hex(a)}};curvyObject.format_colour=function(a){if(a!=""&&a!="transparent")if(a.substr(0,3)==="rgb")a=curvyObject.rgb2Hex(a);else if(a.charAt(0)!=="#")a=curvyObject.getComputedColour(a);else if(a.length===4)a="#"+a.charAt(1)+a.charAt(1)+a.charAt(2)+a.charAt(2)+a.charAt(3)+a.charAt(3);return a};
curvyCorners.getElementsByClass=function(a,b){var c=[];if(b===undefined)b=document;a=a.split(".");var d="*";if(a.length===1){d=a[0];a=false}else{if(a[0])d=a[0];a=a[1]}var f,g;if(d.charAt(0)==="#")(f=document.getElementById(d.substr(1)))&&c.push(f);else{f=b.getElementsByTagName(d);g=f.length;if(a){var i=RegExp("(^|\\s)"+a+"(\\s|$)");for(d=0;d<g;++d)i.test(f[d].className)&&c.push(f[d])}else for(d=0;d<g;++d)c.push(f[d])}return c};
curvyCorners.getElementsBySelector=function(a,b){var c;c=a[0];if(b===undefined)b=document;c=c.indexOf("#")!==-1?[b.getElementById(c.substr(1))]:curvyCorners.getElementsByClass(c,b);if(a.length>1){for(var d=[],f=c.length;--f>=0;)d=d.concat(curvyCorners.getElementsBySelector(a.slice(1),c[f]));c=d}return c};
if(curvyBrowser.supportsCorners){var curvyCornersNoAutoScan=true;curvyCorners.init=function(){}}else{curvyCorners.scanStyles=function(){function a(i){if(!parseInt(i))return"px";return/^[\d.]+(\w+)$/.exec(i)[1]}var b,c,d;if(curvyBrowser.isIE){var f=function(i){var h=i.style;if(curvyBrowser.ieVer>6){var o=h["-moz-border-radius"]||0,C=h["-moz-border-radius-topright"]||0,D=h["-moz-border-radius-topleft"]||0,E=h["-moz-border-radius-bottomright"]||0;h=h["-moz-border-radius-bottomleft"]||0}else{o=h["moz-border-radius"]||
0;C=h["moz-border-radius-topright"]||0;D=h["moz-border-radius-topleft"]||0;E=h["moz-border-radius-bottomright"]||0;h=h["moz-border-radius-bottomleft"]||0}if(o){var s=o.split("/");s=s[0].split(/\s+/);s[s.length-1]===""&&s.pop();switch(s.length){case 3:D=s[0];C=h=s[1];E=s[2];o=false;break;case 2:D=E=s[0];C=h=s[1];o=false;case 1:break;case 4:D=s[0];C=s[1];E=s[2];h=s[3];o=false;break;default:curvyCorners.alert("Illegal corners specification: "+o)}}if(o||D||C||E||h){i=new curvyCnrSpec(i.selectorText);
if(o)i.setcorner(null,null,parseInt(o),a(o));else{C&&i.setcorner("t","r",parseInt(C),a(C));D&&i.setcorner("t","l",parseInt(D),a(D));h&&i.setcorner("b","l",parseInt(h),a(h));E&&i.setcorner("b","r",parseInt(E),a(E))}curvyCorners(i)}};for(b=0;b<document.styleSheets.length;++b)try{if(document.styleSheets[b].imports)for(c=0;c<document.styleSheets[b].imports.length;++c)for(d=0;d<document.styleSheets[b].imports[c].rules.length;++d)f(document.styleSheets[b].imports[c].rules[d]);for(c=0;c<document.styleSheets[b].rules.length;++c)f(document.styleSheets[b].rules[c])}catch(g){typeof curvyCornersVerbose!==
"undefined"&&curvyCornersVerbose&&alert(g.message+" - ignored")}}else if(curvyBrowser.isOp)for(b=0;b<document.styleSheets.length;++b){if(operasheet.contains_border_radius(b)){d=new operasheet(b);for(c in d.rules)isNaN(c)||curvyCorners(d.rules[c])}}else curvyCorners.alert("Scanstyles does nothing in Webkit/Firefox/Opera")};curvyCorners.init=function(){if(!arguments.callee.done){arguments.callee.done=true;if(curvyBrowser.isWebKit&&curvyCorners.init.timer){clearInterval(curvyCorners.init.timer);curvyCorners.init.timer=
null}curvyCorners.scanStyles()}}}if(typeof curvyCornersNoAutoScan==="undefined"||curvyCornersNoAutoScan===false)curvyBrowser.isOp?document.addEventListener("DOMContentLoaded",curvyCorners.init,false):curvyCorners.addEvent(window,"load",curvyCorners.init,false);

