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