function addCorners(){var a=getImages("corner");var b;var c;var d;var e;var f;var g=null;var h=null;var i=null;var j=null;var k="";var l="";var m=null;var n=null;var o=null;for(f=0;f<a.length;f++){b=a[f];c=b.parentNode;d=document.createElement("canvas");if(d.getContext){k=b.className.split(" ");g=getClassValue(k,"iradius");i=getClassValue(k,"ishadow");h=getClassValue(k,"ishade");j=getClassAttribute(k,"inverse");l=getClasses(k,"corner");d.className=l;d.style.cssText=b.style.cssText;d.style.height=b.height+"px";d.style.width=b.width+"px";d.height=b.height;d.width=b.width;d.src=b.src;d.alt=b.alt;if(b.id!="")d.id=b.id;if(b.title!="")d.title=b.title;if(b.getAttribute("onclick")!="")d.setAttribute("onclick",b.getAttribute("onclick"));m=Math.min(d.width,d.height)/2;g=Math.min(m,g);o=4;o=i>0?j>0?0:Math.min(Math.max(o,g/2),16):0;e=d.getContext("2d");if(b.getAttribute("usemap")){c.style.position="relative";c.style.height=b.height+"px";c.style.width=b.width+"px";d.left=0;d.top=0;d.style.position="absolute";d.style.left=0+"px";d.style.top=0+"px";b.left=0;b.top=0;b.style.position="absolute";b.style.height=b.height+"px";b.style.width=b.width+"px";b.style.left=0+"px";b.style.top=0+"px";b.style.opacity=0;c.insertBefore(d,b)}else{c.replaceChild(d,b)}e.clearRect(0,0,d.width,d.height);e.save();if(i>0&&j<=0){i=i/100;if(g>0){roundedShadow(e,o,o,d.width-o,d.height-o,g,i)}else{o=8;roundedShadow(e,o,o,d.width-o,d.height-o,o,i)}}if(g<=0){e.beginPath();e.rect(0,0,d.width-o,d.height-o);e.closePath()}else{roundedRect(e,0,0,d.width-o,d.height-o,g)}e.clip();e.fillStyle="rgba(0,0,0,0)";e.fillRect(0,0,d.width,d.height);e.drawImage(b,0,0,d.width-o,d.height-o);if(i>0&&j>0){i=i/100;if(g>0){addShine(e,d.width,d.height,g,i,1);roundedRect(e,0,0,d.width,d.height,g)}else{g=16;addShine(e,d.width,d.height,g,i,1);e.beginPath();e.rect(0,0,d.width,d.height);e.closePath()}e.strokeStyle="rgba(0,0,0,"+i+")";e.lineWidth=2;e.stroke()}if(h>0){h=h/100;if(g<=0)g=16;addShade(e,d.width-o,d.height-o,g,h);addShine(e,d.width-o,d.height-o,g,h)}d.style.visibility="visible"}}}function addIECorners(){var a=getImages("corner");var b;var c;var d;var e;var f;var g;var h="";var i=null;var j=null;var k=null;var l=null;var m="";var n=null;var o=null;var p=null;var q="";var r=null;var s=null;var t=null;var u,v,w,x,y,z,A;var B,C,D,E,F,G,H,I;for(g=0;g<a.length;g++){b=a[g];c=b.parentNode;h=b.className.split(" ");i=getClassValue(h,"iradius");j=getClassValue(h,"ishadow");k=getClassValue(h,"ishade");l=getClassAttribute(h,"inverse");m=getClasses(h,"corner");s=b.width;t=b.height;n=Math.min(s,t)/2;i=Math.min(n,i);o=4;o=j>0?l>0?0:Math.min(Math.max(o,i/2),16):0;p=getRadius(i,s,t);q=b.currentStyle.display.toLowerCase()=="block"?"block":"inline-block";d=document.createElement(['<var style="overflow:hidden;display:'+q+";width:"+s+"px;height:"+t+'px;padding:0;">'].join(""));r=b.currentStyle.styleFloat.toLowerCase();q=r=="left"||r=="right"?"inline":q;u='<v:group style="zoom:1; display:'+q+"; margin:-1px 0 0 -1px; padding:0; position:relative; width:"+s+"px;height:"+t+'px;" coordsize="'+s+","+t+'">';y='<v:fill src="'+b.src+'" type="frame" />';z=i>0?"</v:roundrect>":"</v:rect>";A="</v:group>";w="";x="";F="";B="";C="";D="";E="";if(i<=0){if(j>0){if(l<=0){j=j/50;o=8;I=4;w='<v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0 ;width:'+s+"px;height:"+t+'px;"><v:fill color="#ffffff" opacity="0.0" /></v:rect><v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#000000" style="filter:Alpha(opacity='+j*64+"), progid:dxImageTransform.Microsoft.Blur(PixelRadius="+I+", MakeShadow=false); zoom:1;margin:-1px 0 0 -1px;padding: 0;display:block;position:absolute;top:"+I+"px;left:"+I+"px;width:"+(s-3*I)+"px;height:"+(t-3*I)+'px;"><v:fill color="#000000" opacity="1" /></v:rect>';v='<v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0 ;width:'+(s-o)+"px;height:"+(t-o)+'px;">'}else if(l>0){j=j/50;i=12;H="linear";v='<v:rect filled="t" stroked="t" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0; width:'+s+"px;height:"+t+'px;">';x='<v:stroke weight="0.5" opacity="'+j/2+'" color="#000000" />';C='<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="'+s+","+i+'" path="m 0,0 l '+s+",0,"+s+","+i+","+i+","+i+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:'+s+"px; height:"+i+'px;"><v:fill method="'+H+'" type="gradient" angle="0" color="#000000" opacity="0" color2="#000000" o:opacity2="'+j+'" /></v:shape>';B='<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="'+i+","+t+'" path="m 0,0 l 0,'+t+","+i+","+t+","+i+","+i+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:'+i+"px; height:"+t+'px;"><v:fill method="'+H+'" type="gradient" angle="90" color="#000000" opacity="0" color2="#000000" o:opacity2="'+j+'" /></v:shape>'}}else{v='<v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="margin:-1px 0 0 -1px;padding:0;display:'+q+";width:"+s+"px;height:"+t+'px;">'}if(k>0){k=k/50;i=12;C='<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" coordorigin="0,0" coordsize="'+(s-o)+","+i+'" path="m 0,0 l '+(s-o)+",0,"+(s-o)+","+i+","+i+","+i+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:'+(s-o)+"px; height:"+i+'px;"><v:fill method="linear" type="gradient" angle="0" color="#ffffff" opacity="0" color2="#ffffff" o:opacity2="'+k+'" /></v:shape>';B='<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" coordorigin="0,0" coordsize="'+i+","+(t-o)+'" path="m 0,0 l 0,'+(t-o)+","+i+","+(t-o)+","+i+","+i+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:'+i+"px; height:"+(t-o)+'px;"><v:fill method="linear" type="gradient" angle="90" color="#ffffff" opacity="0" color2="#ffffff" o:opacity2="'+k+'" /></v:shape>';D='<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="'+(s-o)+","+i+'" path="m 0,'+i+" l "+(s-o)+","+i+","+(s-o-i)+",0,"+i+',0 x e" style="position:absolute; margin: 0; top:'+(t-o-i)+"px; left: 0px; width:"+(s-o)+"px; height:"+i+'px;"><v:fill method="linear" type="gradient" angle="180" color="#000000" opacity="0" color2="#000000" o:opacity2="'+k+'" /></v:shape>';E='<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="'+i+","+(t-o)+'" path="m '+i+",0 l "+i+","+(t-o)+",0,"+(t-o-i)+",0,"+i+' x e" style="position:absolute; margin: 0; top: 0px; left:'+(s-o-i)+"px; width:"+i+"px; height:"+(t-o)+'px;"><v:fill method="linear" type="gradient" angle="270" color="#000000" opacity="0" color2="#000000" o:opacity2="'+k+'" /></v:shape>'}}else{if(j>0){H="linear sigma";f=2;if(l<=0){j=j/50;I=Math.round(o*.5);w='<v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0 ;width:'+s+"px;height:"+t+'px;"><v:fill color="#ffffff" opacity="0.0" /></v:rect><v:roundrect arcsize="'+(p+I)+'" strokeweight="0" filled="t" stroked="f" fillcolor="#000000" style="filter:Alpha(opacity='+j*64+"), progid:dxImageTransform.Microsoft.Blur(PixelRadius="+I+", MakeShadow=false); zoom:1;margin:-1px 0 0 -1px;padding: 0;display:block;position:absolute;top:"+I+"px;left:"+I+"px;width:"+(s-3*I)+"px;height:"+(t-3*I)+'px;"><v:fill color="#000000" opacity="1" /></v:roundrect>';v='<v:roundrect arcsize="'+p+'" strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0; width:'+(s-o)+"px;height:"+(t-o)+'px;">'}else if(l>0){j=j/50;v='<v:roundrect arcsize="'+p+'" filled="t" stroked="t" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0; width:'+s+"px;height:"+t+'px;">';x='<v:stroke weight="0.5" opacity="'+j/2+'" color="#000000" />';C='<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="'+s+","+i+'" path="m '+i+","+i+" l "+s+","+i+" qy "+(s-i)+",0 l "+i+',0 x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: -1px; width:'+(s+1)+"px; height:"+i+'px;"><v:fill method="'+H+'" type="gradient" angle="0" color="#000000" opacity="0" color2="#000000" o:opacity2="'+j+'" /></v:shape>';B='<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="'+i+","+t+'" path="m 0,'+i+" l 0,"+(t-i)+" qy "+i+","+t+" l "+i+","+i+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: -1px; left: 0px; width:'+i+"px; height:"+(t+1)+'px;"><v:fill method="'+H+'" type="gradient" angle="90" color="#000000" opacity="0" color2="#000000" o:opacity2="'+j+'" /></v:shape>';F='<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#000000" coordorigin="0,0" coordsize="'+i+","+i+'" path="m '+i+","+i+" l 0,"+i+" qy "+i+",0 l "+i+","+i+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:'+i+"px; height:"+i+'px;"><v:fill method="'+H+'" focus="1" focusposition="1,1" focussize="0.5,0.5" type="gradientradial" color="#000000" opacity="0" color2="#000000" o:opacity2="'+j+'" /></v:shape>'}}else{f=1;o=0;v='<v:roundrect arcsize="'+p+'" strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0; width:'+s+"px;height:"+t+'px;">'}if(k>0){k=k/50;H="linear";C='<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" coordorigin="0,0" coordsize="'+(s-o)+","+i+'" path="m '+i+","+i+" l "+(s-o)+","+i+" qy "+(s-o-i)+",0 l "+i+',0 x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: -1px; width:'+(s-o+f)+"px; height:"+i+'px;"><v:fill method="'+H+'" type="gradient" angle="0" color="#ffffff" opacity="0" color2="#ffffff" o:opacity2="'+k+'" /></v:shape>';B='<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" coordorigin="0,0" coordsize="'+i+","+(t-o)+'" path="m 0,'+i+" l 0,"+(t-i-o)+" qy "+i+","+(t-o)+" l "+i+","+i+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: -1px; left: 0px; width:'+i+"px; height:"+(t-o+f)+'px;"><v:fill method="'+H+'" type="gradient" angle="90" color="#ffffff" opacity="0" color2="#ffffff" o:opacity2="'+k+'" /></v:shape>';F='<v:shape strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" coordorigin="0,0" coordsize="'+i+","+i+'" path="m '+i+","+i+" l 0,"+i+" qy "+i+",0 l "+i+","+i+' x e" style="position:absolute; margin: -1px 0 0 -1px; top: 0px; left: 0px; width:'+i+"px; height:"+i+'px;"><v:fill method="'+H+'" focus="1" focusposition="1,1" focussize="0.5,0.5" type="gradientradial" color="#ffffff" opacity="0" color2="#ffffff" o:opacity2="'+k+'" /></v:shape>'}}d.innerHTML=u+w+v+y+x+z+E+D+C+B+F+A;d.className=m;d.style.cssText=b.style.cssText;d.style.height=b.height+"px";d.style.width=b.width+"px";d.height=b.height;d.width=b.width;d.src=b.src;d.alt=b.alt;if(b.id!="")d.id=b.id;if(b.title!="")d.title=b.title;if(b.getAttribute("onclick")!="")d.setAttribute("onclick",b.getAttribute("onclick"));if(b.getAttribute("usemap")){if(i>0){f=o}else{f=0}c.style.position="relative";c.style.height=t+"px";c.style.width=s+"px";b.left=0;b.top=0;b.style.position="absolute";b.style.height=t+"px";b.style.width=s+"px";b.style.left=0+"px";b.style.top=0+"px";b.style.filter="Alpha(opacity=0)";c.insertBefore(d,b)}else{c.replaceChild(d,b)}}}function roundedShadow(a,b,c,d,e,f,g){var h;a.beginPath();a.rect(b,c+e-f,f,f);a.closePath();h=addRadialStyle(a,b+f,c+e-f,f-b,b+f,c+e-f,f,g);a.fillStyle=h;a.fill();a.beginPath();a.rect(b+f,c+e-c,d-f*2.25,c);a.closePath();h=addLinearStyle(a,b+f,c+e-c,b+f,c+e,g);a.fillStyle=h;a.fill();a.beginPath();a.rect(b+d-f*1.25,c+e-f*1.25,f*1.25,f*1.25);a.closePath();h=addRadialStyle(a,b+d-f*1.25,c+e-f*1.25,f*1.25-1.5-b,b+d-f*1.25,c+e-f*1.25,f*1.25,g);a.fillStyle=h;a.fill();a.beginPath();a.rect(b+d-b,c+f,b,e-f*2.25);a.closePath();h=addLinearStyle(a,b+d-b,c+f,b+d,c+f,g);a.fillStyle=h;a.fill();a.beginPath();a.rect(b+d-f,c,f,f);a.closePath();h=addRadialStyle(a,b+d-f,c+f,f-b,b+d-f,c+f,f,g);a.fillStyle=h;a.fill()}function addShade(a,b,c,d,e){var f;f=addGradient(a,b,d,b-d,d,0,e);a.beginPath();a.moveTo(b,0);a.lineTo(b,c);a.lineTo(b-d,c-d);a.lineTo(b-d,0);a.closePath();a.fillStyle=f;a.fill();f=addGradient(a,d,c,d,c-d,0,e);a.beginPath();a.moveTo(b,c);a.lineTo(0,c);a.lineTo(0,c-d);a.lineTo(b-d,c-d);a.closePath();a.fillStyle=f;a.fill()}function addShine(a,b,c,d,e,f){var g;var h=f!=1?254:0;g=addGradient(a,0,d,d,d,h,e);a.beginPath();a.moveTo(0,0);a.lineTo(0,c);a.lineTo(d,c);a.lineTo(d,d);a.closePath();a.fillStyle=g;a.fill();g=addGradient(a,d,0,d,d,h,e);a.beginPath();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,d);a.lineTo(d,d);a.closePath();a.fillStyle=g;a.fill()}function addLinearStyle(a,b,c,d,e,f){var g=a.createLinearGradient(b,c,d,e);var h=Math.min(parseFloat(f+.1),1);g.addColorStop(0,"rgba(0,0,0,"+h+")");g.addColorStop(.25,"rgba(0,0,0,"+f+")");g.addColorStop(1,"rgba(0,0,0,0)");return g}function addRadialStyle(a,b,c,d,e,f,g,h){var i=a.createRadialGradient(b,c,d,e,f,g);var j=Math.min(parseFloat(h+.1),1);i.addColorStop(0,"rgba(0,0,0,"+j+")");i.addColorStop(.25,"rgba(0,0,0,"+h+")");i.addColorStop(1,"rgba(0,0,0,0)");return i}function addGradient(a,b,c,d,e,f,g){var h=a.createLinearGradient(b,c,d,e);var i=f>0?.25:.2;h.addColorStop(0,"rgba("+f+","+f+","+f+",0.9)");h.addColorStop(i,"rgba("+f+","+f+","+f+","+g+")");h.addColorStop(.75,"rgba("+f+","+f+","+f+",0)");h.addColorStop(1,"rgba("+f+","+f+","+f+",0)");return h}function roundedRect(a,b,c,d,e,f,g){if(!g)a.beginPath();a.moveTo(b,c+f);a.lineTo(b,c+e-f);a.quadraticCurveTo(b,c+e,b+f,c+e);a.lineTo(b+d-f,c+e);a.quadraticCurveTo(b+d,c+e,b+d,c+e-f);a.lineTo(b+d,c+f);a.quadraticCurveTo(b+d,c,b+d-f,c);a.lineTo(b+f,c);a.quadraticCurveTo(b,c,b,c+f);if(!g)a.closePath()}function getClassAttribute(a,b){var c=0;var d=b.length;for(var e=0;e<a.length;e++){if(a[e].indexOf(b)==0){c=1;break}}return c}function getClassValue(a,b){var c=0;var d=b.length;for(var e=0;e<a.length;e++){if(a[e].indexOf(b)==0){c=Math.min(a[e].substring(d),100);break}}return Math.max(0,c)}function getClasses(a,b){var c="";for(var d=0;d<a.length;d++){if(a[d]!=b){if(c){c+=" "}c+=a[d]}}return c}function getImages(a){var b=document.getElementsByTagName("img");var c=new Array;var d=0;var e;var f;var g=0;for(d=0;d<b.length;d++){e=b[d];f=e.className.split(" ");for(var g=0;g<f.length;g++){if(f[g]==a){c.push(e);break}}}return c}function getRadius(a,b,c){var d=Math.min(b,c)/100;a=Math.max(Math.min(100,a/d),0);return a+"%"}var tmp=navigator.appName=="Microsoft Internet Explorer"&&navigator.userAgent.indexOf("Opera")<1?1:0;if(tmp)var isIE=document.namespaces?1:0;if(isIE){if(document.namespaces["v"]==null){var e=["shape","shapetype","group","background","path","formulas","handles","fill","stroke","shadow","textbox","textpath","imagedata","line","polyline","curve","roundrect","oval","rect","arc","image"],s=document.createStyleSheet();for(var i=0;i<e.length;i++){s.addRule("v\\:"+e[i],"behavior: url(#default#VML);")}document.namespaces.add("v","urn:schemas-microsoft-com:vml")}}if(window.attachEvent&&!window.opera)window.attachEvent("onload",addIECorners);else window.addEventListener("load",addCorners,false)
