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 stl=document.createStyleSheet();stl.addRule("v\\:*","behavior: url(#default#VML);");document.namespaces.add("v","urn:schemas-microsoft-com:vml")}}function getImages(d){var c=document.getElementsByTagName("img");var e=new Array();var b=0;var g;var f;var a=0;for(b=0;b<c.length;b++){g=c[b];f=g.className.split(" ");for(var a=0;a<f.length;a++){if(f[a]==d){e.push(g);break}}}return e}function getClasses(d,c){var a="";for(var b=0;b<d.length;b++){if(d[b]!=c){if(a){a+=" "}a+=d[b]}}return a}function getClassValue(d,c){var a=0;var e=c.length;for(var b=0;b<d.length;b++){if(d[b].indexOf(c)==0){a=Math.min(d[b].substring(e),100);break}}return Math.max(0,a)}function getClassColor(d,c){var a=0;var e="";var f=c.length;for(var b=0;b<d.length;b++){if(d[b].indexOf(c)==0){a=d[b].substring(f);e="#"+a.toLowerCase();break}}if(e.match(/^#[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]$/i)){return e}else{return 0}}function getClassAttribute(d,c){var a=0;var e=c.length;for(var b=0;b<d.length;b++){if(d[b].indexOf(c)==0){a=1;break}}return a}function roundedRect(d,c,g,f,b,a,e){if(!e){d.beginPath()}d.moveTo(c,g+a);d.lineTo(c,g+b-a);d.quadraticCurveTo(c,g+b,c+a,g+b);d.lineTo(c+f-a,g+b);d.quadraticCurveTo(c+f,g+b,c+f,g+b-a);d.lineTo(c+f,g+a);d.quadraticCurveTo(c+f,g,c+f-a,g);d.lineTo(c+a,g);d.quadraticCurveTo(c,g,c,g+a);if(!e){d.closePath()}}function addRadialStyle(j,c,i,e,a,h,d,g){var f=j.createRadialGradient(c,i,e,a,h,d);var b=Math.min(parseFloat(g+0.1),1);f.addColorStop(0,"rgba(0,0,0,"+b+")");f.addColorStop(0.25,"rgba(0,0,0,"+g+")");f.addColorStop(1,"rgba(0,0,0,0)");return f}function addLinearStyle(c,a,i,b,g,d){var f=c.createLinearGradient(a,i,b,g);var e=Math.min(parseFloat(d+0.1),1);f.addColorStop(0,"rgba(0,0,0,"+e+")");f.addColorStop(0.25,"rgba(0,0,0,"+d+")");f.addColorStop(1,"rgba(0,0,0,0)");return f}function addBright(d,c,h,g,b,a,e){var f=d.createLinearGradient(0,h,0,h+b);f.addColorStop(0,"rgba(254,254,254,"+e+")");f.addColorStop(1,"rgba(254,254,254,0.1)");d.beginPath();d.moveTo(c,h+a);d.lineTo(c,h+b-a);d.quadraticCurveTo(c,h+b,c+a,h+b);d.lineTo(c+g-a,h+b);d.quadraticCurveTo(c+g,h+b,c+g,h+b-a);d.lineTo(c+g,h+a);d.quadraticCurveTo(c+g,h,c+g-a,h);d.lineTo(c+a,h);d.quadraticCurveTo(c,h,c,h+a);d.closePath();d.fillStyle=f;d.fill()}function addDark(d,c,h,g,b,a,e){var f=d.createLinearGradient(0,h,0,h+b);f.addColorStop(0,"rgba(0,0,0,0)");f.addColorStop(1,"rgba(0,0,0,"+e+")");d.beginPath();d.moveTo(c,h);d.lineTo(c,h+b-a);d.quadraticCurveTo(c,h+b,c+a,h+b);d.lineTo(c+g-a,h+b);d.quadraticCurveTo(c+g,h+b,c+g,h+b-a);d.lineTo(c+g,h);d.lineTo(c,h);d.closePath();d.fillStyle=f;d.fill()}function addFrame(d,c,h,g,b,a,e){roundedRect(d,c,h,g,b,a);var f=d.createLinearGradient(0,0,0,b);f.addColorStop(0,"rgba(254,254,254,"+e+")");f.addColorStop(1,"rgba(0,0,0,"+e+")");d.lineWidth=(a+c)/2;d.strokeStyle=f;d.stroke()}function glossyShadow(i,g,f,b,h,e,d){var a;var c=e/2;i.beginPath();i.rect(g+e,f,b-(e*2),f+c);i.closePath();a=addLinearStyle(i,g+e,f+c,g+e,f,d);i.fillStyle=a;i.fill();i.beginPath();i.rect(g,f,e,e);i.closePath();a=addRadialStyle(i,g+e,f+e,e-c,g+e,f+e,e,d);i.fillStyle=a;i.fill();i.beginPath();i.rect(g,f+e,c,h-(e*2));i.closePath();a=addLinearStyle(i,g+c,f+e,g,f+e,d);i.fillStyle=a;i.fill();i.beginPath();i.rect(g,f+h-e,e,e);i.closePath();a=addRadialStyle(i,g+e,f+h-e,e-c,g+e,f+h-e,e,d);i.fillStyle=a;i.fill();i.beginPath();i.rect(g+e,f+h-c,b-(e*2),c);i.closePath();a=addLinearStyle(i,g+e,f+h-c,g+e,f+h,d);i.fillStyle=a;i.fill();i.beginPath();i.rect(g+b-e,f+h-e,e,e);i.closePath();a=addRadialStyle(i,g+b-e,f+h-e,e-c,g+b-e,f+h-e,e,d);i.fillStyle=a;i.fill();i.beginPath();i.rect(g+b-c,f+e,c,h-(e*2));i.closePath();a=addLinearStyle(i,g+b-c,f+e,g+b,f+e,d);i.fillStyle=a;i.fill();i.beginPath();i.rect(g+b-e,f,e,e);i.closePath();a=addRadialStyle(i,g+b-e,f+e,e-c,g+b-e,f+e,e,d);i.fillStyle=a;i.fill()}function addIEGlossy(){var o=getImages("glossy");var j;var E;var c;var b;var s;var C=null;var t=null;var k=0;var B=null;var l=null;var y=0;var h=0.25;var x="";var D="";var w=null;var n=0;var e=0;var u="";var m=0;var g=0;var a=null;var p=null;var r=null;var f=null;var v;var d;var A;var q;var F;var z;for(s=0;s<o.length;s++){j=o[s];E=j.parentNode;d="";A="";q="";F="";z="";if(j.width>=16&&j.height>=16){x=j.className.split(" ");y=0;l=0;h=0.25;k=0;C=0;B=0;C=getClassValue(x,"iradius");B=getClassColor(x,"ibgcolor");l=getClassColor(x,"igradient");k=getClassAttribute(x,"noshadow");y=getClassAttribute(x,"horizontal");D=getClasses(x,"glossy");m=j.width;g=j.height;w=Math.min(m,g)/2;v=0;h=C>0?Math.min(Math.max(C,20),50)/100:h;C=Math.round(45*h);f=Math.round(Math.max(Math.round(w*h),4)/4)*4;if(k<1){e=f/4;t=C*0.75;n=e;radius=t;t=radius*0.75;F='<v:roundrect arcsize="'+radius+'%" strokeweight="0" filled="t" stroked="f" fillcolor="#000000" style="filter:Alpha(opacity=60), progid:dxImageTransform.Microsoft.Blur(PixelRadius='+n+", MakeShadow=false); zoom:1;margin:-1px 0 0 -1px;padding: 0;display:block;position:absolute;top:"+n+"px;left:0px;width:"+(m-(2*n))+"px;height:"+(g-(3*n))+'px;"><v:fill color="#000000" opacity="1" /></v:roundrect>';z='<v:rect strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="zoom:1;margin:-1px 0 0 -1px;padding: 0;display:block;position:absolute;top:0px;left:0px;width:'+m+"px;height:"+g+'px;"><v:fill color="#ffffff" opacity="0.0" /></v:rect>'}else{radius=C;n=0;e=f/4;t=C*0.75}if(isNaN(B)){q='<v:roundrect arcsize="'+radius+'%" strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="zoom:1;margin:-1px 0 0 -1px;padding: 0;display:block;position:absolute;top:0px;left:'+n+"px;width:"+(m-(2*n))+"px;height:"+(g-(2*n))+'px;">';if(isNaN(l)){if(y>0){v=90}q=q+'<v:fill method="sigma" type="gradient" angle="'+v+'" color="'+l+'" color2="'+B+'" /></v:roundrect>'}else{q=q+'<v:fill color="'+B+'" /></v:roundrect>'}}r=(j.currentStyle.display.toLowerCase()=="block")?"block":"inline-block";a=document.createElement(['<var style="zoom:1;overflow:hidden;display:'+r+";width:"+m+"px;height:"+g+'px;padding:0;">'].join(""));p=j.currentStyle.styleFloat.toLowerCase();r=(p=="left"||p=="right")?"inline":r;d='<v:group style="zoom:1; display:'+r+"; margin:-1px 0 0 -1px; padding:0; position:relative; width:"+m+"px;height:"+g+'px;" coordsize="'+m+","+g+'">'+z;A='<v:roundrect arcsize="'+radius+'%" strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="zoom:1;margin:-1px 0 0 -1px;padding: 0;display:block;position:absolute;top:0px;left:'+n+"px;width:"+(m-(2*n))+"px;height:"+(g-(2*n))+'px;"><v:fill src="'+j.src+'" type="frame" /></v:roundrect><v:roundrect arcsize="'+(t*2)+'%" strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="zoom:1;margin:-1px 0 0 -1px;padding: 0;display: block;position:absolute;top:'+e+"px;left:"+(e+n)+"px;width:"+(m-(2*e)-(2*n))+"px;height:"+((g/2)-e-n)+'px;"><v:fill method="linear" type="gradient" angle="0" color="#ffffff" opacity="0.1" color2="#ffffff" o:opacity2="0.75" /></v:roundrect><v:roundrect arcsize="'+(radius*2)+'%" strokeweight="0" filled="t" stroked="f" fillcolor="#000000" style="zoom:1;margin:-1px 0 0 -1px;padding: 0;display: block;position:absolute;top:'+((g/2)-n)+"px;left:"+n+"px;width:"+(m-(2*n))+"px;height:"+((g/2)-n)+'px;"><v:fill method="sigma" type="gradient" angle="180" color="#000000" opacity="0.0" color2="#000000" o:opacity2="0.5" /></v:roundrect></v:group>';a.innerHTML=d+F+q+A;a.className=D;a.style.cssText=j.style.cssText;a.style.visibility="visible";a.src=j.src;a.alt=j.alt;a.width=j.width;a.height=j.height;if(j.id!=""){a.id=j.id}if(j.title!=""){a.title=j.title}if(j.getAttribute("onclick")!=""){a.setAttribute("onclick",j.getAttribute("onclick"))}E.replaceChild(a,j)}}}function addGlossy(){var j=getImages("glossy");var e;var t;var b;var a;var k;var r=null;var l=null;var f=0;var q=null;var g=null;var p=0;var d=0.25;var o="";var s="";var n=null;var h=0;var c=0;var m="";for(k=0;k<j.length;k++){e=j[k];t=e.parentNode;b=document.createElement("canvas");if(b.getContext&&e.width>=16&&e.height>=16){o=e.className.split(" ");p=0;g=0;d=0.25;f=0;r=0;q=0;r=getClassValue(o,"iradius");q=getClassColor(o,"ibgcolor");g=getClassColor(o,"igradient");f=getClassAttribute(o,"noshadow");p=getClassAttribute(o,"horizontal");s=getClasses(o,"glossy");b.className=s;b.style.cssText=e.style.cssText;b.style.height=e.height+"px";b.style.width=e.width+"px";b.height=e.height;b.width=e.width;b.src=e.src;b.alt=e.alt;if(e.id!=""){b.id=e.id}if(e.title!=""){b.title=e.title}if(e.getAttribute("onclick")!=""){b.setAttribute("onclick",e.getAttribute("onclick"))}n=Math.min(b.width,b.height)/2;d=r>0?Math.min(Math.max(r,20),50)/100:d;r=Math.max(Math.round(n*d),4);if(f<1){r=Math.round(r/4)*4;c=r/4;l=r*0.75;h=c;radius=l;l=radius*0.75}else{radius=r;h=0;c=r/4;l=r*0.75}a=b.getContext("2d");t.replaceChild(b,e);a.clearRect(0,0,b.width,b.height);if(f<1){glossyShadow(a,0,0,b.width,b.height,r,0.5)}a.save();globalCompositeOperation="source-in";roundedRect(a,h,0,b.width-(h*2),b.height-(h*2),radius);a.clip();if(isNaN(q)){if(isNaN(g)){if(p>0){m=a.createLinearGradient(0,0,b.width,0)}else{m=a.createLinearGradient(0,0,0,b.height-(h*2))}m.addColorStop(0,q);m.addColorStop(1,g);a.beginPath();a.rect(0,0,b.width,b.height-(h*2));a.closePath();a.fillStyle=m;a.fill()}else{a.fillStyle=q;a.fillRect(0,0,b.width,b.height-(h*2))}}else{a.clearRect(0,0,b.width,b.height)}a.drawImage(e,h,0,b.width-(h*2),b.height-(h*2));addBright(a,c+h,c,b.width-(2*(c+h)),(b.height/2)-c,l,0.75);addDark(a,h,(b.height/2)-h,b.width-(2*h),(b.height/2)-h,l,0.5);addFrame(a,h,0,b.width-(h*2),b.height-(h*2),radius,0.25);b.style.visibility="visible"}}}var glossyOnload=window.onload;window.onload=function(){if(glossyOnload){glossyOnload()}if(isIE){addIEGlossy()}else{addGlossy()}};