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 = window.opera ? true : false; this.isWebKit = A.indexOf("webkit") != -1; if (this.isIE) {
        this.get_style = function(D, F) {
            if (!(F in D.currentStyle)) { return "" } var C = /^([\d.]+)(\w*)/.exec(D.currentStyle[F]);
            if (!C) { return D.currentStyle[F] }
            if (C[1] == 0) { return "0" } if (C[2] && C[2] !== "px") {
                var B = D.style.left;
                var E = D.runtimeStyle.left;
                D.runtimeStyle.left = D.currentStyle.left;
                D.style.left = C[1] + C[2];
                C[0] = D.style.pixelLeft;
                D.style.left = B;
                D.runtimeStyle.left = E
            } return C[0]
        } 
    }
    else {
        if (this.isSafari) {
            this.get_style = function(D, E) {
                var C, B = false; E = E.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
                if (D.style.display == "none") { D.style.display = ""; B = true }
                C = document.defaultView.getComputedStyle(D, "").getPropertyValue(E);
                if (B) { D.style.display = "none" } return C
            } 
        }
        else {
            this.get_style = function(B, C) {
                C = C.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
                return document.defaultView.getComputedStyle(B, "").getPropertyValue(C)
            } 
        } 
    } 
}
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(B, C, A, D) {
if (!B) {
    this.tlR = this.trR = this.blR = this.brR = parseInt(A);
    this.tlu = this.tru = this.blu = this.bru = D
}
else {
    propname = B.charAt(0) + C.charAt(0);
    this[propname + "R"] = parseInt(A); this[propname + "u"] = D
} 
};
curvyCnrSpec.prototype.get = function(D) {
    if (/^(t|b)(l|r)(R|u)$/.test(D)) { return this[D] }
    if (/^(t|b)(l|r)Ru$/.test(D)) {
        var C = D.charAt(0) + D.charAt(1);
        return this[C + "R"] + this[C + "u"]
    } if (/^(t|b)Ru?$/.test(D)) {
        var B = D.charAt(0); B += this[B + "lR"] > this[B + "rR"] ? "l" : "r";
        var A = this[B + "R"]; if (D.length === 3 && D.charAt(2) === "u") { A += this[B = "u"] } return A
    }
    throw new Error("Don't recognize property " + D)
}; 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(G) {
    var E = ["tl", "tr", "bl", "br"];
    var H = 0; var C, A; for (C in E) {
        if (!isNaN(C)) {
            A = this[E[C] + "u"];
            if (A !== "" && A !== "px") { H = new curvyCnrSpec; break } 
        } 
    } if (!H) { H = this }
    else {
        var B, D, F = curvyBrowser.get_style(G, "left"); 
        for (C in E) {
            if (!isNaN(C)) {
                B = E[C];
                A = this[B + "u"]; D = this[B + "R"]; if (A !== "px") {
                var F = G.style.left; G.style.left = D + A; D = G.style.pixelLeft; G.style.left = F
            } H[B + "R"] = D;
            H[B + "u"] = "px"
        } 
    } G.style.left = F
} return H
};
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(C) {
    var A = document.styleSheets.item(C).ownerNode.text;
    A = A.replace(/\/\*(\n|\r|.)*?\*\//g, "");
    var D = new RegExp("^([\\w.#][\\w.#, ]+)[\\n\\s]*\\{([^}]+border-((top|bottom)-(left|right)-)?radius[^}]*)\\}", "mg");
    var G;
    this.rules = [];
    while ((G = D.exec(A)) !== null) {
        var F = new RegExp("(..)border-((top|bottom)-(left|right)-)?radius:\\s*([\\d.]+)(in|em|px|ex|pt)", "g");
        var E, B = new curvyCnrSpec(G[1]);
        while ((E = F.exec(G[2])) !== null) { if (E[1] !== "z-") { B.setcorner(E[3], E[4], E[5], E[6]) } }
        this.rules.push(B)
    } 
} operasheet.contains_border_radius = function(A) {
return /border-((top|bottom)-(left|right)-)?radius/.test(document.styleSheets.item(A).ownerNode.text)
}; 
   function curvyCorners() {
var G, D, E, B, J; if (typeof arguments[0] !== "object") 
{ throw curvyCorners.newError("First parameter of curvyCorners() must be an object.") }
if (arguments[0] instanceof curvyCnrSpec) {
    B = arguments[0];
    if (!B.selectorText && typeof arguments[1] === "string")
    { B.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.") }
    D = arguments[1]; if (typeof D !== "string") { D = "" }
    if (D !== "" && D.charAt(0) !== "." && "autoPad" in arguments[0]) 
 { D = "." + D } B = new curvyCnrSpec(D); B.setfrom(arguments[0]) } 
if (B.selectorText) {
    J = 0;
    var I = B.selectorText.replace(/\s+$/, "").split(/,\s*/);
    E = new Array;
    function A(M) {
        var L = M.split("#");
        return (L.length === 2 ? "#" : "") + L.pop()
    } 
for (G = 0; G < I.length; ++G) {
    var K = A(I[G]);
    var H = K.split(" "); 
    switch (K.charAt(0)) {
        case "#": if (H.length === 1) { E.push(document.getElementById(K.substr(1))) }
            else {
                var C = document.getElementById(H[0].substr(1));
                if (C) { E = E.concat(curvyCorners.getElementsByClass(H[1], C)) }
                else { curvyCorners.alert("No object with ID " + K + " exists yet.\nCall curvyCorners(settings, obj) when it is created.") } 
            } break;
 
default: if (H.length === 1) { E = E.concat(curvyCorners.getElementsByClass(K)) } 
        else {
                var C = curvyCorners.getElementsByClass(H[0]);
                for (D = 0; D < C.length; ++D) { E = E.concat(curvyCorners.getElementsByClass(H[1], C)) }
            }
    } 
      }
  } 
 
else { J = 1; E = arguments }
for (G = J, D = E.length; G < D; ++G) {
    if (E[G] == null) break;//the null raises an error sometimes.
            if (!("IEborderRadius" in E[G].style) || E[G].style.IEborderRadius != "set") 
        {
            if (E[G].className && E[G].className.indexOf("curvyRedraw") !== -1) {
                if (typeof curvyCorners.redrawList === "undefined")
                { curvyCorners.redrawList = new Array }
                curvyCorners.redrawList.push({ node: E[G], spec: B, copy: E[G].cloneNode(false) })
            } 
            E[G].style.IEborderRadius = "set";
            var F = new curvyObject(B, E[G]); 
            F.applyCorners()
        } 
}
} curvyCorners.prototype.applyCornersToAll = function() { };
curvyCorners.redraw = function() {
if (!curvyBrowser.isOp && !curvyBrowser.isIE) { return }
if (!curvyCorners.redrawList) {
    throw curvyCorners.newError("curvyCorners.redraw() has nothing to redraw.")
}
for (var A in curvyCorners.redrawList) 
{
    if (isNaN(A)) { continue }
    var D = curvyCorners.redrawList[A];
    if (!D.node.clientWidth) { continue }
    var B = D.copy.cloneNode(false);
    for (var C = D.node.firstChild;
C != null;
C = C.nextSibling) {
        if (C.className === "autoPadDiv") { break }
    } if (!C) {
    throw curvyCorners.newError("Couldn't find autoPad div")
}
D.node.parentNode.replaceChild(B, D.node);
while (C.firstChild) { B.appendChild(C.removeChild(C.firstChild)) }
D = new curvyObject(D.spec, D.node = B); D.applyCorners()
} 
};
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.newError = function(A) { return new Error("curvyCorners Error:\n" + A) }; curvyCorners.alert = function(A) { if (typeof curvyCornersVerbose === "undefined" || curvyCornersVerbose) { alert(A) } }; function curvyObject() {
 var S;
 this.box = arguments[1];
 this.settings = arguments[0];
 this.topContainer = this.bottomContainer = this.shell = S = null;
 var K = this.box.clientWidth;
 if (!K && curvyBrowser.isIE) {
     this.box.style.zoom = 1;
     K = this.box.clientWidth
 } 
    if (!K) {
        if (!this.box.parentNode) { throw this.newError("box has no parent!") } 
        for (S = this.box; ; S = S.parentNode) {
            if (!S || S.tagName === "BODY") {
                this.applyCorners = function() { };
                //Dmitriy   --May 8, 2009   Disable those stupid error messages....
               // curvyCorners.alert(this.errmsg("zero-width box with no accountable parent", "warning")); 
                return
            } if (S.style.display === "none") { break } 
        } S.style.display = "block"; K = 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 Z = curvyBrowser.get_style(this.box, "borderTopWidth");
    var J = curvyBrowser.get_style(this.box, "borderBottomWidth");
    var D = curvyBrowser.get_style(this.box, "borderLeftWidth");
    var B = curvyBrowser.get_style(this.box, "borderRightWidth");
    var I = curvyBrowser.get_style(this.box, "borderTopColor");
    var G = curvyBrowser.get_style(this.box, "borderBottomColor");
    var A = curvyBrowser.get_style(this.box, "borderLeftColor");
    var E = curvyBrowser.get_style(this.box, "backgroundColor");
    var C = curvyBrowser.get_style(this.box, "backgroundImage");
    var W = curvyBrowser.get_style(this.box, "backgroundRepeat");
    var Q = curvyBrowser.get_style(this.box, "backgroundPositionX");
    var O = curvyBrowser.get_style(this.box, "backgroundPositionY");
    var N = curvyBrowser.get_style(this.box, "position");
    var X = curvyBrowser.get_style(this.box, "paddingTop");
    var a = curvyBrowser.get_style(this.box, "paddingBottom");
    var P = curvyBrowser.get_style(this.box, "paddingLeft");
    var Y = curvyBrowser.get_style(this.box, "paddingRight");
    var R = curvyBrowser.get_style(this.box, "border");
    var H = this.spec.get("tR");
    var M = this.spec.get("bR");
    var U = function(c) {
        if (typeof c === "number") { return c }
        if (typeof c !== "string") { throw new Error("unexpected styleToNPx type " + typeof c) }
        var b = /^[-\d.]([a-z]+)$/.exec(c);
        if (b && b[1] != "px") { throw new Error("Unexpected unit " + b[1]) }
        if (isNaN(c = parseInt(c))) { c = 0 } return c
    };
    try {
        this.borderWidth = U(Z); this.borderWidthB = U(J);
        this.borderWidthL = U(D); this.borderWidthR = U(B);
        this.boxColour = curvyObject.format_colour(E);
        this.topPadding = U(X); this.bottomPadding = U(a);
        this.leftPadding = U(P); this.rightPadding = U(Y);
        this.boxWidth = K;
        this.boxHeight = this.box.clientHeight;
        this.borderColour = curvyObject.format_colour(I);
        this.borderColourB = curvyObject.format_colour(G);
        this.borderColourL = curvyObject.format_colour(A);
        this.borderString = this.borderWidth + "px solid " + this.borderColour;
        this.borderStringB = this.borderWidthB + "px solid " + this.borderColourB;
        this.backgroundImage = ((C != "none") ? C : "");
        this.backgroundRepeat = W;
        this.backgroundPosX = U(Q);
        this.backgroundPosY = U(O);
        this.boxContent = this.box.innerHTML
    }
    catch (V)
    { throw this.newError("getMessage" in V ? V.getMessage() : V.message) }
    var F = this.boxHeight; var T = K; if (curvyBrowser.quirksMode) { }
    else {
        this.boxWidth -= this.leftPadding + this.rightPadding;
        this.boxHeight -= this.topPadding + this.bottomPadding;
    }
    this.box.innerHTML = "";
    if (N != "absolute") { this.box.style.position = "relative" }
    this.box.style.top = this.box.style.left = this.box.style.padding = "0";
    this.box.style.border = this.box.style.backgroundImage = "none";
    this.box.style.backgroundColor = "transparent";
    this.box.style.width = (T + this.borderWidthL + this.borderWidthR) + "px";
    this.box.style.height = (F + this.borderWidth + this.borderWidthB) + "px";
    var L = document.createElement("div"); 
    L.style.position = "absolute"; 
    if (curvyBrowser.quirksMode) 
    { L.style.width = (T + this.borderWidthL + this.borderWidthR) + "px" }
    else { L.style.width = T + "px" }
   if((F + this.borderWidth + this.borderWidthB - H - M)>0)
        L.style.height = (F + this.borderWidth + this.borderWidthB - H - M) + "px";
    
    L.style.padding = "0";
    L.style.top = H + "px";
    L.style.left = "0";
    if (this.borderWidthL) { L.style.borderLeft = this.borderWidthL + "px solid " + this.borderColourL }
    if (this.borderWidth && !H) { L.style.borderTop = this.borderWidth + "px solid " + this.borderColour }
    if (this.borderWidthR) { L.style.borderRight = this.borderWidthR + "px solid " + this.borderColourL }
    if (this.borderWidthB && !M) { L.style.borderBottom = this.borderWidthB + "px solid " + this.borderColourB }
    L.style.backgroundColor = E; 
    L.style.backgroundImage = this.backgroundImage;
    L.style.backgroundRepeat = this.backgroundRepeat;
    this.shell = this.box.appendChild(L);
    K = curvyBrowser.get_style(this.shell, "width");
    if (K === "" || K === "auto" || K.indexOf("%") !== -1) { alert("Shell width is " + K) }
    this.boxWidth = (K != "" && K != "auto" && K.indexOf("%") == -1) ? parseInt(K) : this.shell.clientWidth;
    this.applyCorners = function() {
        if (H) {
            r = document.createElement("div"); r.style.width = this.boxWidth + "px";
            r.style.fontSize = "1px"; r.style.overflow = "hidden"; 
            r.style.position = "absolute";
            r.style.paddingLeft = this.borderWidth + "px"; r.style.paddingRight = this.borderWidth + "px";
            r.style.height = H + "px";
            r.style.top = -H + "px";
            r.style.left = -this.borderWidthL + "px";
            this.topContainer = this.shell.appendChild(r)
        }
        if (M) {
            var r = document.createElement("div");
            r.style.width = this.boxWidth + "px"; r.style.fontSize = "1px"; r.style.overflow = "hidden";
            r.style.position = "absolute";
            r.style.paddingLeft = this.borderWidthB + "px"; r.style.paddingRight = this.borderWidthB + "px";
            r.style.height = M + "px"; r.style.bottom = -M + "px"; 
     r.style.left = -this.borderWidthL + "px"; this.bottomContainer = this.shell.appendChild(r) } var AD = this.spec.cornerNames(); for (var AH in AD) { if (!isNaN(AH)) { var y = AD[AH]; var AA = this.spec[y + "R"]; var AB, AE, g, AC; if (y == "tr" || y == "tl") { AB = this.borderWidth; AE = this.borderColour; AC = this.borderWidth } else { AB = this.borderWidthB; AE = this.borderColourB; AC = this.borderWidthB } g = AA - AC; var q = document.createElement("div"); q.style.height = this.spec.get(y + "Ru"); q.style.width = this.spec.get(y + "Ru"); q.style.position = "absolute"; q.style.fontSize = "1px"; q.style.overflow = "hidden"; var o, n, m; for (o = 0; o < AA; ++o) { var j = (o + 1 >= g) ? -1 : Math.floor(Math.sqrt(Math.pow(g, 2) - Math.pow(o + 1, 2))) - 1; if (g != AA) { var f = (o >= g) ? -1 : Math.ceil(Math.sqrt(Math.pow(g, 2) - Math.pow(o, 2))); var c = (o + 1 >= AA) ? -1 : Math.floor(Math.sqrt(Math.pow(AA, 2) - Math.pow((o + 1), 2))) - 1 } var b = (o >= AA) ? -1 : Math.ceil(Math.sqrt(Math.pow(AA, 2) - Math.pow(o, 2))); if (j > -1) { this.drawPixel(o, 0, this.boxColour, 100, (j + 1), q, true, AA) } if (g != AA) { if (this.spec.antiAlias) { for (n = j + 1; n < f; ++n) { if (this.backgroundImage != "") { var d = curvyObject.pixelFraction(o, n, g) * 100; this.drawPixel(o, n, AE, 100, 1, q, d >= 30, AA) } else { if (this.boxColour !== "transparent") { var x = curvyObject.BlendColour(this.boxColour, AE, curvyObject.pixelFraction(o, n, g)); this.drawPixel(o, n, x, 100, 1, q, false, AA) } else { this.drawPixel(o, n, AE, 50, 1, q, false, AA) } } } if (c >= f) { if (f == -1) { f = 0 } this.drawPixel(o, f, AE, 100, (c - f + 1), q, false, 0) } m = AE; n = c } else { if (c > j) { this.drawPixel(o, (j + 1), AE, 100, (c - j), q, false, 0) } } } else { m = this.boxColour; n = j } if (this.spec.antiAlias) { while (++n < b) { this.drawPixel(o, n, m, (curvyObject.pixelFraction(o, n, AA) * 100), 1, q, AC <= 0, AA) } } } for (var u = 0, AG = q.childNodes.length; u < AG; ++u) { var p = q.childNodes[u]; var AF = parseInt(p.style.top); var AJ = parseInt(p.style.left); var AK = parseInt(p.style.height); if (y == "tl" || y == "bl") { p.style.left = (AA - AJ - 1) + "px" } if (y == "tr" || y == "tl") { p.style.top = (AA - AK - AF) + "px" } p.style.backgroundRepeat = this.backgroundRepeat; if (this.backgroundImage) { switch (y) { case "tr": p.style.backgroundPosition = (this.backgroundPosX - this.borderWidthL + AA - T - AJ) + "px " + (this.backgroundPosY + AK + AF + this.borderWidth - AA) + "px"; break; case "tl": p.style.backgroundPosition = (this.backgroundPosX - AA + AJ + this.borderWidthL) + "px " + (this.backgroundPosY - AA + AK + AF + this.borderWidth) + "px"; break; case "bl": p.style.backgroundPosition = (this.backgroundPosX - AA + AJ + 1 + this.borderWidthL) + "px " + (this.backgroundPosY - F - this.borderWidth + (curvyBrowser.quirksMode ? AF : -AF) + AA) + "px"; break; case "br": if (curvyBrowser.quirksMode) { p.style.backgroundPosition = (this.backgroundPosX + this.borderWidthL - T + AA - AJ) + "px " + (this.backgroundPosY - F - this.borderWidth + AF + AA) + "px" } else { p.style.backgroundPosition = (this.backgroundPosX - this.borderWidthL - T + AA - AJ) + "px " + (this.backgroundPosY - F - this.borderWidth + AA - AF) + "px" } } } } switch (y) { case "tl": q.style.top = q.style.left = "0"; this.topContainer.appendChild(q); break; case "tr": q.style.top = q.style.right = "0"; this.topContainer.appendChild(q); break; case "bl": q.style.bottom = q.style.left = "0"; this.bottomContainer.appendChild(q); break; case "br": q.style.bottom = q.style.right = "0"; this.bottomContainer.appendChild(q) } } } var s = { t: this.spec.radiusdiff("t"), b: this.spec.radiusdiff("b") }; for (z in s) { if (typeof z === "function") { continue } if (!this.spec.get(z + "R")) { continue } if (s[z]) { if (this.backgroundImage && this.spec.radiusSum(z) !== s[z]) { curvyCorners.alert(this.errmsg("Not supported: unequal non-zero top/bottom radii with background image")) } var AI = (this.spec[z + "lR"] < this.spec[z + "rR"]) ? z + "l" : z + "r"; var h = document.createElement("div"); h.style.height = s[z] + "px"; h.style.width = this.spec.get(AI + "Ru"); h.style.position = "absolute"; h.style.fontSize = "1px"; h.style.overflow = "hidden"; h.style.backgroundColor = this.boxColour; switch (AI) { case "tl": h.style.bottom = h.style.left = "0"; h.style.borderLeft = this.borderString; this.topContainer.appendChild(h); break; case "tr": h.style.bottom = h.style.right = "0"; h.style.borderRight = this.borderString; this.topContainer.appendChild(h); break; case "bl": h.style.top = h.style.left = "0"; h.style.borderLeft = this.borderStringB; this.bottomContainer.appendChild(h); break; case "br": h.style.top = h.style.right = "0"; h.style.borderRight = this.borderStringB; this.bottomContainer.appendChild(h) } } var l = document.createElement("div"); 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) { if (curvyBrowser.quirksMode) { l.style.height = 100 + H + "px" } else { l.style.height = 100 + H - this.borderWidth + "px" } l.style.marginLeft = this.spec.tlR ? (this.spec.tlR - this.borderWidthL) + "px" : "0"; l.style.borderTop = this.borderString; if (this.backgroundImage) { var v = this.spec.tlR ? (this.backgroundPosX - (H - this.borderWidthL)) + "px " : "0 "; l.style.backgroundPosition = v + this.backgroundPosY + "px" } this.topContainer.appendChild(l); this.shell.style.backgroundPosition = this.backgroundPosX + "px " + (this.backgroundPosY - H + this.borderWidthL) + "px" } break; case "b": if (this.bottomContainer) { if (curvyBrowser.quirksMode) { l.style.height = M + "px" } else { l.style.height = M - this.borderWidthB + "px" } l.style.marginLeft = this.spec.blR ? (this.spec.blR - this.borderWidthL) + "px" : "0"; l.style.borderBottom = this.borderStringB; if (this.backgroundImage) { var v = this.spec.blR ? (this.backgroundPosX + this.borderWidthL - M) + "px " : this.backgroundPosX + "px "; l.style.backgroundPosition = v + (this.backgroundPosY - F - this.borderWidth + M) + "px" } this.bottomContainer.appendChild(l) } } } var w = document.createElement("div"); w.style.position = "absolute"; w.innerHTML = this.boxContent; w.className = "autoPadDiv"; w.style.left = this.borderWidthL + "px"; w.style.paddingTop = this.topPadding; w.style.top = this.borderWidth + "px"; w.style.paddingLeft = this.leftPadding + "px"; w.style.paddingRight = this.rightPadding + "px"; z = T; if (!curvyBrowser.quirksMode) { z -= this.leftPadding + this.rightPadding } w.style.width = z + "px"; w.style.textAlign = curvyBrowser.get_style(this.box, "textAlign"); this.box.style.textAlign = "left"; this.box.appendChild(w); if (S) { S.style.display = "none" } }
 } curvyObject.prototype.drawPixel = function(J, G, A, F, H, I, C, E) {
 var B = document.createElement("div"); B.style.height = H + "px";
 B.style.width = "1px"; B.style.position = "absolute"; 
 B.style.fontSize = "1px";
 B.style.overflow = "hidden"; var D = this.spec.get("tR"); 
 B.style.backgroundColor = A;
 if (C && this.backgroundImage != "") {
     B.style.backgroundImage = this.backgroundImage;
     B.style.backgroundPosition = "-" + (this.boxWidth - (E - J) + this.borderWidth) + "px -" + ((this.boxHeight + D + G) - this.borderWidth) + "px"
 }
 if (F != 100) { curvyObject.setOpacity(B, F) } B.style.top = G + "px"; 
 B.style.left = J + "px"; I.appendChild(B)
};
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, D) {
    var B = "\ntag: " + this.box.tagName;
    if (this.box.id) { B += "\nid: " + this.box.id }
    if (this.box.className) { B += "\nclass: " + this.box.className } 
    var A;
    if ((A = this.box.parentNode) === null) { B += "\n(box has no parent)" }
    else {
        B += "\nParent tag: " + A.tagName; if (A.id) { B += "\nParent ID: " + A.id }
        if (A.className) { B += "\nParent class: " + A.className } 
    } if (D === undefined) { D = "warning" }
    return "curvyObject " + D + ":\n" + C + B
};

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(L, J, G) {
    if (L === "transparent" || J === "transparent") 
{ throw this.newError("Cannot blend with transparent") }
if (L.charAt(0) !== "#") { L = curvyObject.format_colour(L) }
if (J.charAt(0) !== "#") { J = curvyObject.format_colour(J) }
var D = parseInt(L.substr(1, 2), 16); var K = parseInt(L.substr(3, 2), 16);
var F = parseInt(L.substr(5, 2), 16); var C = parseInt(J.substr(1, 2), 16);
var I = parseInt(J.substr(3, 2), 16); var E = parseInt(J.substr(5, 2), 16);
if (G > 1 || G < 0) { G = 1 } var H = Math.round((D * G) + (C * (1 - G)));
if (H > 255) { H = 255 } if (H < 0) { H = 0 } var B = Math.round((K * G) + (I * (1 - G)));
if (B > 255) { B = 255 } if (B < 0) { B = 0 } var A = Math.round((F * G) + (E * (1 - G)));
if (A > 255) { A = 255 } if (A < 0) { A = 0 }
return "#" + curvyObject.IntToHex(H) + curvyObject.IntToHex(B) + curvyObject.IntToHex(A)
};
curvyObject.pixelFraction = function(G, F, A) {
    var I = 0; var B = new Array(1);
    var E = new Array(1); var H = 0; var C = ""; var D = Math.sqrt(Math.pow(A, 2) - Math.pow(G, 2));
    if (D >= F && D < (F + 1)) {
        C = "Left";
        B[H] = 0; E[H] = D - F; ++H
    } D = Math.sqrt(Math.pow(A, 2) - Math.pow(F + 1, 2));
    if (D >= G && D < (G + 1)) { C = C + "Top"; B[H] = D - G; E[H] = 1; ++H }
    D = Math.sqrt(Math.pow(A, 2) - Math.pow(G + 1, 2)); if (D >= F && D < (F + 1))
    { C = C + "Right"; B[H] = 1; E[H] = D - F; ++H } D = Math.sqrt(Math.pow(A, 2) - Math.pow(F, 2));
    if (D >= G && D < (G + 1)) { C = C + "Bottom"; B[H] = D - G; E[H] = 0 }
    switch (C) {
        case "LeftRight": I = Math.min(E[0], E[1]) + ((Math.max(E[0], E[1]) - Math.min(E[0], E[1])) / 2);
            break; 
            case "TopRight": I = 1 - (((1 - B[0]) * (1 - E[1])) / 2);
            break;
        case "TopBottom": I = Math.min(B[0], B[1]) + ((Math.max(B[0], B[1]) - Math.min(B[0], B[1])) / 2); break;
        case "LeftBottom": I = E[0] * B[1] / 2; break; default: I = 1
    } return I
};
curvyObject.rgb2Array = function(A) { var B = A.substring(4, A.indexOf(")")); return B.split(", ") };
curvyObject.rgb2Hex = function(B) {
    try {
        var C = curvyObject.rgb2Array(B);
        var G = parseInt(C[0]); var E = parseInt(C[1]); var A = parseInt(C[2]);
        var D = "#" + curvyObject.IntToHex(G) + curvyObject.IntToHex(E) + curvyObject.IntToHex(A)
    }
    catch (F) {
        var H = "getMessage" in F ? F.getMessage() : F.message;
        throw new Error("Error (" + H + ") converting RGB value to Hex in rgb2Hex")
    } return D
};
curvyObject.setOpacity = function(F, C) {
    C = (C == 100) ? 99.999 : C;
    if (curvyBrowser.isSafari && F.tagName != "IFRAME") {
        var B = curvyObject.rgb2Array(F.style.backgroundColor);
        var E = parseInt(B[0]); var D = parseInt(B[1]);
        var A = parseInt(B[2]);
        F.style.backgroundColor = "rgba(" + E + ", " + D + ", " + A + ", " + C / 100 + ")"
    }
    else {
        if (typeof F.style.opacity !== "undefined") { F.style.opacity = C / 100 }
        else {
            if (typeof F.style.MozOpacity !== "undefined") { F.style.MozOpacity = C / 100 }
            else {
                if (typeof F.style.filter != "undefined") { F.style.filter = "alpha(opacity:" + C + ")" }
                else { if (typeof F.style.KHTMLOpacity != "undefined") { F.style.KHTMLOpacity = C / 100 } } 
            } 
        } 
    } 
};
function addEvent(D, C, B, A) {
    if (D.addEventListener) { D.addEventListener(C, B, A); return true }
    if (D.attachEvent) { return D.attachEvent("on" + C, B) } D["on" + C] = B; return false
}
curvyObject.getComputedColour = function(E) {
    var F = document.createElement("DIV");
    F.style.backgroundColor = E; document.body.appendChild(F); if (window.getComputedStyle) {
        var D = document.defaultView.getComputedStyle(F, null).getPropertyValue("background-color");
        F.parentNode.removeChild(F); if (D.substr(0, 3) === "rgb") { D = curvyObject.rgb2Hex(D) } return D
    }
    else {
        var A = document.body.createTextRange(); A.moveToElementText(F);
        A.execCommand("BackColor", false, E); var B = A.queryCommandValue("BackColor");
        var C = "rgb(" + (B & 255) + ", " + ((B & 65280) >> 8) + ", " + ((B & 16711680) >> 16) + ")";
        F.parentNode.removeChild(F); A = null; return curvyObject.rgb2Hex(C)
    } 
};
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(H, F) {
    var E = new Array; if (F === undefined) { F = document } H = H.split(".");
    var A = "*"; if (H.length === 1) { A = H[0]; H = false }
    else { if (H[0]) { A = H[0] } H = H[1] } var D, C, B;
    if (A.charAt(0) === "#") { C = document.getElementById(A.substr(1)); if (C) { E.push(C) } } else { C = F.getElementsByTagName(A); B = C.length; if (H) { var G = new RegExp("(^|\\s)" + H + "(\\s|$)"); for (D = 0; D < B; ++D) { if (G.test(C[D].className)) { E.push(C[D]) } } } else { for (D = 0; D < B; ++D) { E.push(C[D]) } } } return E
}; if (curvyBrowser.isMoz || curvyBrowser.isWebkit) { curvyCornersNoAutoScan = true } else {
    curvyCorners.scanStyles = function() {
    function B(F) { var G = /^\d+(\w+)$/.exec(F); return G[1] } var E, D, C;
    if (curvyBrowser.isIE) {
        function A(L) {
            var J = L.style; if (curvyBrowser.ieVer > 6) {
                var H = J["-webkit-border-radius"] || 0; var K = J["-webkit-border-top-right-radius"] || 0;
                var F = J["-webkit-border-top-left-radius"] || 0;
                var G = J["-webkit-border-bottom-right-radius"] || 0;
                var M = J["-webkit-border-bottom-left-radius"] || 0
            }
            else {
                var H = J["webkit-border-radius"] || 0;
                var K = J["webkit-border-top-right-radius"] || 0;
                var F = J["webkit-border-top-left-radius"] || 0;
                var G = J["webkit-border-bottom-right-radius"] || 0;
                var M = J["webkit-border-bottom-left-radius"] || 0
            }
            if (H || F || K || G || M) {
                var I = new curvyCnrSpec(L.selectorText);
                if (H) { I.setcorner(null, null, parseInt(H), B(H)) }
                else {
                    if (K) { I.setcorner("t", "r", parseInt(K), B(K)) }
                    if (F) { I.setcorner("t", "l", parseInt(F), B(F)) }
                    if (M) { I.setcorner("b", "l", parseInt(M), B(M)) }
                    if (G) { I.setcorner("b", "r", parseInt(G), B(G)) } 
                } curvyCorners(I)
            } 
        }
        for (E = 0; E < document.styleSheets.length; ++E) {
            if (document.styleSheets[E].imports) {
                for (D = 0; D < document.styleSheets[E].imports.length; ++D) {
                    for (C = 0; C < document.styleSheets[E].imports[D].rules.length; ++C)
                    { A(document.styleSheets[E].imports[D].rules[C]) } 
                } 
            }
            for (D = 0; D < document.styleSheets[E].rules.length; ++D) { A(document.styleSheets[E].rules[D]) } 
        } 
    }
    else {
        if (curvyBrowser.isOp) {
            for (E = 0; E < document.styleSheets.length; ++E) {
                if (operasheet.contains_border_radius(E)) {
                    C = new operasheet(E); for (D in C.rules)
                    { if (!isNaN(D)) { curvyCorners(C.rules[D]) } } 
                } 
            } 
        }
        else { alert("Wasting my time!") } 
    } 
}; 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 (false) //this triggers those errors with https
    {
        document.write("<script id='__ie_onload' defer='defer' src='javascript:void(0)'><\/script>");
        var script = document.getElementById("__ie_onload");
        script.onreadystatechange = function() 
        {
            if (this.readyState == "complete") { curvyCorners.init() } 
        } 
    }
    else 
{
    if (document.addEventListener) {
        if (curvyBrowser.isOp)
        { document.addEventListener("DOMContentLoaded", curvyCorners.init, false) } 
    }
    else {
        if (curvyBrowser.isWebKit) {
            curvyCorners.init.timer = setInterval(function()
            { if (/loaded|complete/.test(document.readyState)) { curvyCorners.init("WebKit") } }, 10)
        }
        else { window.onload = curvyCorners.init } 
    } 
      }
};