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