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

