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 e=b.style.left,f=b.runtimeStyle.left;b.runtimeStyle.left=b.currentStyle.left;b.style.left=
d[1]+d[2];d[0]=b.style.pixelLeft;b.style.left=e;b.runtimeStyle.left=f}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$$5){}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,e;for(d in b)if(!isNaN(d)){e=this[b[d]+"u"];if(e!==""&&e!=="px"){c=new curvyCnrSpec;break}}if(c){var f,h,g=curvyBrowser.get_style(a,"left");for(d in b)if(!isNaN(d)){f=b[d];e=this[f+"u"];h=this[f+"R"];if(e!=="px"){g=a.style.left;a.style.left=h+e;h=a.style.pixelLeft;a.style.left=g}c[f+"R"]=h;c[f+"u"]="px"}a.style.left=g}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"),e,f=new curvyCnrSpec(c[1]);(e=d.exec(c[2]))!==null;)e[1]!=="z-"&&f.setcorner(e[3],e[4],e[5],e[6]);this.rules.push(f)}}
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,e;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){e=0;var f=d.selectorText.replace(/\s+$/,"").split(/,\s*/);c=[];for(a=0;a<f.length;++a){if((b=f[a].lastIndexOf("#"))!==-1)f[a]=f[a].substr(b);c=c.concat(curvyCorners.getElementsBySelector(f[a].split(/\s+/)))}}else{e=1;c=arguments}a=e;for(b=c.length;a<b;++a){e=c[a];f=false;if(e.className)(f=e.className.indexOf("curvyIgnore")!==-1)||(e.className+=" curvyIgnore");else e.className=
"curvyIgnore";if(!f){if(e.className.indexOf("curvyRedraw")!==-1){if(typeof curvyCorners.redrawList==="undefined")curvyCorners.redrawList=[];curvyCorners.redrawList.push({node:e,spec:d,copy:e.cloneNode(false)})}(new curvyObject(d,e)).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),e=c.node.firstChild;e!=null;e=e.nextSibling)if(e.className==="autoPadDiv")break;if(!e){curvyCorners.alert("Couldn't find autoPad DIV");
break}c.node.parentNode.replaceChild(d,c.node);for(var f=e.getElementsByTagName("script"),h=f.length-1;h>=0;--h)f[h].parentNode.removeChild(f[h]);for(;e.firstChild;)d.appendChild(e.removeChild(e.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,e=curvyCorners.redrawList.length;for(d=0;d<e;++d)if(curvyCorners.redrawList[d].node===a)break;if(d===e)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 e=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 f=curvyBrowser.get_style(this.box,"borderTopWidth"),h=curvyBrowser.get_style(this.box,"borderBottomWidth"),g=curvyBrowser.get_style(this.box,"borderLeftWidth"),m=curvyBrowser.get_style(this.box,"borderRightWidth"),B=curvyBrowser.get_style(this.box,"borderTopColor"),C=curvyBrowser.get_style(this.box,"borderBottomColor"),D=curvyBrowser.get_style(this.box,"borderLeftColor"),r=curvyBrowser.get_style(this.box,"borderRightColor"),S=curvyBrowser.get_style(this.box,"borderTopStyle"),
T=curvyBrowser.get_style(this.box,"borderBottomStyle"),U=curvyBrowser.get_style(this.box,"borderLeftStyle"),V=curvyBrowser.get_style(this.box,"borderRightStyle"),Q=curvyBrowser.get_style(this.box,"backgroundColor"),R=curvyBrowser.get_style(this.box,"backgroundImage"),W=curvyBrowser.get_style(this.box,"backgroundRepeat"),p,u;if(this.box.currentStyle&&this.box.currentStyle.backgroundPositionX){p=curvyBrowser.get_style(this.box,"backgroundPositionX");u=curvyBrowser.get_style(this.box,"backgroundPositionY")}else{p=
curvyBrowser.get_style(this.box,"backgroundPosition");p=p.split(" ");u=p.length===2?p[1]:0;p=p[0]}var q=curvyBrowser.get_style(this.box,"position"),X=curvyBrowser.get_style(this.box,"paddingTop"),Y=curvyBrowser.get_style(this.box,"paddingBottom"),Z=curvyBrowser.get_style(this.box,"paddingLeft"),$=curvyBrowser.get_style(this.box,"paddingRight");curvyBrowser.get_style(this.box,"border");var E=curvyBrowser.ieVer>7?curvyBrowser.get_style(this.box,"filter"):null,F=this.spec.get("tR"),G=this.spec.get("bR"),
v=function(j){if(typeof j==="number")return j;if(typeof j!=="string")throw Error("unexpected styleToNPx type "+typeof j);var w=/^[-\d.]([a-z]+)$/.exec(j);if(w&&w[1]!="px")throw Error("Unexpected unit "+w[1]);if(isNaN(j=parseInt(j)))j=0;return j};try{this.borderWidth=v(f);this.borderWidthB=v(h);this.borderWidthL=v(g);this.borderWidthR=v(m);this.boxColour=curvyObject.format_colour(Q);this.topPadding=v(X);this.bottomPadding=v(Y);this.leftPadding=v(Z);this.rightPadding=v($);this.boxWidth=d;this.boxHeight=
this.box.clientHeight;this.borderColour=curvyObject.format_colour(B);this.borderColourB=curvyObject.format_colour(C);this.borderColourL=curvyObject.format_colour(D);this.borderColourR=curvyObject.format_colour(r);this.borderString=this.borderWidth+"px "+S+" "+this.borderColour;this.borderStringB=this.borderWidthB+"px "+T+" "+this.borderColourB;this.borderStringL=this.borderWidthL+"px "+U+" "+this.borderColourL;this.borderStringR=this.borderWidthR+"px "+V+" "+this.borderColourR;this.backgroundImage=
R!="none"?R:"";this.backgroundRepeat=W}catch(aa){throw this.newError(aa.message);}var H=this.boxHeight,I=d;if(curvyBrowser.isOp){p=v(p);u=v(u);if(p){d=I+this.borderWidthL+this.borderWidthR;if(p>d)p=d;p=d/p*100+"%"}if(u){d=H+this.borderWidth+this.borderWidthB;if(u>d)u=d;u=d/u*100+"%"}}if(!curvyBrowser.quirksMode){this.boxWidth-=this.leftPadding+this.rightPadding;this.boxHeight-=this.topPadding+this.bottomPadding}this.contentContainer=document.createElement("div");if(E)this.contentContainer.style.filter=
E;for(;this.box.firstChild;)this.contentContainer.appendChild(this.box.removeChild(this.box.firstChild));if(q!="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=I+this.borderWidthL+this.borderWidthR+"px";this.box.style.height=H+this.borderWidth+this.borderWidthB+"px";q=document.createElement("div");q.style.position="absolute";if(E)q.style.filter=E;q.style.width=
curvyBrowser.quirksMode?I+this.borderWidthL+this.borderWidthR+"px":I+"px";q.style.height=H+this.borderWidth+this.borderWidthB-F-G<=0?"0":H+this.borderWidth+this.borderWidthB-F-G+"px";q.style.padding="0";q.style.top=F+"px";q.style.left="0";if(this.borderWidthL)q.style.borderLeft=this.borderStringL;if(this.borderWidth&&!F)q.style.borderTop=this.borderString;if(this.borderWidthR)q.style.borderRight=this.borderStringR;if(this.borderWidthB&&!G)q.style.borderBottom=this.borderStringB;q.style.backgroundColor=
Q;q.style.backgroundImage=this.backgroundImage;q.style.backgroundRepeat=this.backgroundRepeat;q.style.direction="ltr";this.shell=this.box.appendChild(q);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 j=function(J,O,P){if(J===0)return 0;
if(J==="right"||J==="bottom")return P-O;if(J==="center")return(P-O)/2;if(J.indexOf("%")>0)return(P-O)*100/parseInt(J);return v(J)};this.backgroundPosX=j(p,this.backgroundObject.width,I);this.backgroundPosY=j(u,this.backgroundObject.height,H)}else if(this.backgroundImage){this.backgroundPosX=v(p);this.backgroundPosY=v(u)}if(F){j=document.createElement("div");j.style.width=this.boxWidth+"px";j.style.fontSize="1px";j.style.overflow="hidden";j.style.position="absolute";j.style.paddingLeft=this.borderWidth+
"px";j.style.paddingRight=this.borderWidth+"px";j.style.height=F+"px";j.style.top=-F+"px";j.style.left=-this.borderWidthL+"px";this.topContainer=this.shell.appendChild(j)}if(G){j=document.createElement("div");j.style.width=this.boxWidth+"px";j.style.fontSize="1px";j.style.overflow="hidden";j.style.position="absolute";j.style.paddingLeft=this.borderWidthB+"px";j.style.paddingRight=this.borderWidthB+"px";j.style.height=G+"px";j.style.bottom=-G+"px";j.style.left=-this.borderWidthL+"px";this.bottomContainer=
this.shell.appendChild(j)}j=this.spec.cornerNames();for(var w in j)if(!isNaN(w)){var y=j[w],n=this.spec[y+"R"],x,A,s;if(y=="tr"||y=="tl"){x=this.borderColour;s=this.borderWidth}else{x=this.borderColourB;s=this.borderWidthB}A=n-s;var o=document.createElement("div");o.style.height=this.spec.get(y+"Ru");o.style.width=this.spec.get(y+"Ru");o.style.position="absolute";o.style.fontSize="1px";o.style.overflow="hidden";var l,k,K,t=E?parseInt(/alpha\(opacity.(\d+)\)/.exec(E)[1]):100;for(l=0;l<n;++l){var L=
l+1>=A?-1:Math.floor(Math.sqrt(Math.pow(A,2)-Math.pow(l+1,2)))-1;if(A!=n)var i=l>=A?-1:Math.ceil(Math.sqrt(Math.pow(A,2)-Math.pow(l,2))),M=l+1>=n?-1:Math.floor(Math.sqrt(Math.pow(n,2)-Math.pow(l+1,2)))-1;var N=l>=n?-1:Math.ceil(Math.sqrt(Math.pow(n,2)-Math.pow(l,2)));L>-1&&this.drawPixel(l,0,this.boxColour,t,L+1,o,true,n);if(A!=n)if(this.spec.antiAlias){for(k=L+1;k<i;++k)if(this.backgroundImage!=""){K=curvyObject.pixelFraction(l,k,A)*100;this.drawPixel(l,k,x,t,1,o,K>=30,n)}else if(this.boxColour!==
"transparent"){K=curvyObject.BlendColour(this.boxColour,x,curvyObject.pixelFraction(l,k,A));this.drawPixel(l,k,K,t,1,o,false,n)}else this.drawPixel(l,k,x,t>>1,1,o,false,n);if(M>=i){if(i==-1)i=0;this.drawPixel(l,i,x,t,M-i+1,o,false,0)}K=x;k=M}else M>L&&this.drawPixel(l,L+1,x,t,M-L,o,false,0);else{K=this.boxColour;k=L}if(this.spec.antiAlias&&this.boxColour!=="transparent")for(;++k<N;)this.drawPixel(l,k,K,curvyObject.pixelFraction(l,k,n)*t,1,o,s<=0,n)}x=0;for(A=o.childNodes.length;x<A;++x){s=o.childNodes[x];
l=parseInt(s.style.top);t=parseInt(s.style.left);N=parseInt(s.style.height);if(y=="tl"||y=="bl")s.style.left=n-t-1+"px";if(y=="tr"||y=="tl")s.style.top=n-N-l+"px";s.style.backgroundRepeat=this.backgroundRepeat;if(this.backgroundImage)switch(y){case "tr":s.style.backgroundPosition=this.backgroundPosX-this.borderWidthL+n-I-t+"px "+(this.backgroundPosY+N+l+this.borderWidth-n)+"px";break;case "tl":s.style.backgroundPosition=this.backgroundPosX-n+t+1+this.borderWidthL+"px "+(this.backgroundPosY-n+N+l+
this.borderWidth)+"px";break;case "bl":s.style.backgroundPosition=this.backgroundPosX-n+t+1+this.borderWidthL+"px "+(this.backgroundPosY-H-this.borderWidth+(curvyBrowser.quirksMode?l:-l)+n)+"px";break;case "br":s.style.backgroundPosition=curvyBrowser.quirksMode?this.backgroundPosX-this.borderWidthL-I+n-t+"px "+(this.backgroundPosY-H-this.borderWidth+l+n)+"px":this.backgroundPosX-this.borderWidthL-I+n-t+"px "+(this.backgroundPosY-H-this.borderWidth+n-l)+"px"}}switch(y){case "tl":o.style.top=o.style.left=
"0";this.topContainer.appendChild(o);break;case "tr":o.style.top=o.style.right="0";this.topContainer.appendChild(o);break;case "bl":o.style.bottom=o.style.left="0";this.bottomContainer.appendChild(o);break;case "br":o.style.bottom=o.style.right="0";this.bottomContainer.appendChild(o)}}w={t:this.spec.radiusdiff("t"),b:this.spec.radiusdiff("b")};for(z in w)if(typeof z!=="function")if(this.spec.get(z+"R")){if(w[z]){k=this.spec[z+"lR"]<this.spec[z+"rR"]?z+"l":z+"r";i=document.createElement("div");i.style.height=
w[z]+"px";i.style.width=this.spec.get(k+"Ru");i.style.position="absolute";i.style.fontSize="1px";i.style.overflow="hidden";i.style.backgroundColor=this.boxColour;if(E)i.style.filter=E;i.style.backgroundImage=this.backgroundImage;i.style.backgroundRepeat=this.backgroundRepeat;switch(k){case "tl":i.style.bottom=i.style.left="0";i.style.borderLeft=this.borderStringL;i.style.backgroundPosition=this.backgroundPosX+"px "+(this.borderWidth+this.backgroundPosY-this.spec.tlR)+"px";this.topContainer.appendChild(i);
break;case "tr":i.style.bottom=i.style.right="0";i.style.borderRight=this.borderStringR;i.style.backgroundPosition=this.backgroundPosX-this.boxWidth+this.spec.trR+"px "+(this.borderWidth+this.backgroundPosY-this.spec.trR)+"px";this.topContainer.appendChild(i);break;case "bl":i.style.top=i.style.left="0";i.style.borderLeft=this.borderStringL;i.style.backgroundPosition=this.backgroundPosX+"px "+(this.backgroundPosY-this.borderWidth-this.boxHeight+w[z]+this.spec.blR)+"px";this.bottomContainer.appendChild(i);
break;case "br":i.style.top=i.style.right="0";i.style.borderRight=this.borderStringR;i.style.backgroundPosition=this.borderWidthL+this.backgroundPosX-this.boxWidth+this.spec.brR+"px "+(this.backgroundPosY-this.borderWidth-this.boxHeight+w[z]+this.spec.brR)+"px";this.bottomContainer.appendChild(i)}}k=document.createElement("div");if(E)k.style.filter=E;k.style.position="relative";k.style.fontSize="1px";k.style.overflow="hidden";k.style.width=this.fillerWidth(z);k.style.backgroundColor=this.boxColour;
k.style.backgroundImage=this.backgroundImage;k.style.backgroundRepeat=this.backgroundRepeat;switch(z){case "t":if(this.topContainer){k.style.height=curvyBrowser.quirksMode?100+F+"px":100+F-this.borderWidth+"px";k.style.marginLeft=this.spec.tlR?this.spec.tlR-this.borderWidthL+"px":"0";k.style.borderTop=this.borderString;if(this.backgroundImage){i=this.spec.tlR?this.borderWidthL+this.backgroundPosX-this.spec.tlR+"px ":this.backgroundPosX+"px ";k.style.backgroundPosition=i+this.backgroundPosY+"px";this.shell.style.backgroundPosition=
this.backgroundPosX+"px "+(this.backgroundPosY-F+this.borderWidthL)+"px"}this.topContainer.appendChild(k)}break;case "b":if(this.bottomContainer){k.style.height=curvyBrowser.quirksMode?G+"px":G-this.borderWidthB+"px";k.style.marginLeft=this.spec.blR?this.spec.blR-this.borderWidthL+"px":"0";k.style.borderBottom=this.borderStringB;if(this.backgroundImage){i=this.spec.blR?this.backgroundPosX+this.borderWidthL-this.spec.blR+"px ":this.backgroundPosX+"px ";k.style.backgroundPosition=i+(this.backgroundPosY-
H-this.borderWidth+G)+"px"}this.bottomContainer.appendChild(k)}}}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=I;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=e};if(this.backgroundImage){p=this.backgroundCheck(p);u=this.backgroundCheck(u);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,e,f,h,g){var m=document.createElement("div");m.style.height=e+"px";m.style.width="1px";m.style.position="absolute";m.style.fontSize="1px";m.style.overflow="hidden";e=this.spec.get("tR");m.style.backgroundColor=c;if(h&&this.backgroundImage!=""){m.style.backgroundImage=this.backgroundImage;m.style.backgroundPosition="-"+(this.boxWidth-(g-a)+this.borderWidth)+"px -"+(this.boxHeight+e+b-this.borderWidth)+"px"}d!=100&&curvyObject.setOpacity(m,d);m.style.top=
b+"px";m.style.left=a+"px";f.appendChild(m)};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),e=parseInt(a.substr(3,2),16);a=parseInt(a.substr(5,2),16);var f=parseInt(b.substr(1,2),16),h=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+f*(1-c));if(d>255)d=255;if(d<0)d=0;e=Math.round(e*
c+h*(1-c));if(e>255)e=255;if(e<0)e=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(e)+curvyObject.IntToHex(c)};
curvyObject.pixelFraction=function(a,b,c){c=c*c;var d=Array(2),e=Array(2),f=0,h="",g=Math.sqrt(c-Math.pow(a,2));if(g>=b&&g<b+1){h="Left";d[f]=0;e[f]=g-b;++f}g=Math.sqrt(c-Math.pow(b+1,2));if(g>=a&&g<a+1){h+="Top";d[f]=g-a;e[f]=1;++f}g=Math.sqrt(c-Math.pow(a+1,2));if(g>=b&&g<b+1){h+="Right";d[f]=1;e[f]=g-b;++f}g=Math.sqrt(c-Math.pow(b,2));if(g>=a&&g<a+1){h+="Bottom";d[f]=g-a;e[f]=0}switch(h){case "LeftRight":a=Math.min(e[0],e[1])+(Math.max(e[0],e[1])-Math.min(e[0],e[1]))/2;break;case "TopRight":a=
1-(1-d[0])*(1-e[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=e[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]),e=parseInt(b[2]),f="#"+curvyObject.IntToHex(c)+curvyObject.IntToHex(d)+curvyObject.IntToHex(e)}catch(h){a="getMessage"in h?h.getMessage():h.message;throw Error("Error ("+a+") converting RGB value to Hex in rgb2Hex");}return f};
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]),e=parseInt(c[1]);c=parseInt(c[2]);a.style.backgroundColor="rgba("+d+", "+e+", "+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 e,f;if(d.charAt(0)==="#")(e=document.getElementById(d.substr(1)))&&c.push(e);else{e=b.getElementsByTagName(d);f=e.length;if(a){var h=RegExp("(^|\\s)"+a+"(\\s|$)");for(d=0;d<f;++d)h.test(e[d].className)&&c.push(e[d])}else for(d=0;d<f;++d)c.push(e[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=[],e=c.length;--e>=0;)d=d.concat(curvyCorners.getElementsBySelector(a.slice(1),c[e]));c=d}return c};
if(curvyBrowser.supportsCorners){var curvyCornersNoAutoScan=true;curvyCorners.init=function(){}}else{curvyCorners.scanStyles=function(){function a(h){if(!parseInt(h))return"px";return/^[\d.]+(\w+)$/.exec(h)[1]}var b,c,d;if(curvyBrowser.isIE){var e=function(h){var g=h.style;if(curvyBrowser.ieVer>6){var m=g["-moz-border-radius"]||0,B=g["-moz-border-radius-topright"]||0,C=g["-moz-border-radius-topleft"]||0,D=g["-moz-border-radius-bottomright"]||0;g=g["-moz-border-radius-bottomleft"]||0}else{m=g["moz-border-radius"]||
0;B=g["moz-border-radius-topright"]||0;C=g["moz-border-radius-topleft"]||0;D=g["moz-border-radius-bottomright"]||0;g=g["moz-border-radius-bottomleft"]||0}if(m){var r=m.split("/");r=r[0].split(/\s+/);r[r.length-1]===""&&r.pop();switch(r.length){case 3:C=r[0];B=g=r[1];D=r[2];m=false;break;case 2:C=D=r[0];B=g=r[1];m=false;case 1:break;case 4:C=r[0];B=r[1];D=r[2];g=r[3];m=false;break;default:curvyCorners.alert("Illegal corners specification: "+m)}}if(m||C||B||D||g){h=new curvyCnrSpec(h.selectorText);
if(m)h.setcorner(null,null,parseInt(m),a(m));else{B&&h.setcorner("t","r",parseInt(B),a(B));C&&h.setcorner("t","l",parseInt(C),a(C));g&&h.setcorner("b","l",parseInt(g),a(g));D&&h.setcorner("b","r",parseInt(D),a(D))}curvyCorners(h)}};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)e(document.styleSheets[b].imports[c].rules[d]);for(c=0;c<document.styleSheets[b].rules.length;++c)e(document.styleSheets[b].rules[c])}catch(f){typeof curvyCornersVerbose!==
"undefined"&&curvyCornersVerbose&&alert(f.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);

