if(!window.CanvasRenderingContext2D){
(function(){
var m=Math;
var mr=m.round;
var ms=m.sin;
var mc=m.cos;
var Z=10;
var Z2=Z/2;
var _7={init:function(_8){
var _9=_8||document;
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
var _a=this;
_9.attachEvent("onreadystatechange",function(){
_a.init_(_9);
});
}
},init_:function(_b){
if(_b.readyState=="complete"){
if(!_b.namespaces["g_vml_"]){
_b.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml");
}
var ss=_b.createStyleSheet();
ss.cssText="canvas{display:inline-block;overflow:hidden;"+"text-align:left;width:300px;height:150px}"+"g_vml_\\:*{behavior:url(#default#VML)}";
var _d=_b.getElementsByTagName("canvas");
for(var i=0;i<_d.length;i++){
if(!_d[i].getContext){
this.initElement(_d[i]);
}
}
}
},fixElement_:function(el){
var _10=el.outerHTML;
var _11=el.ownerDocument.createElement(_10);
if(_10.slice(-2)!="/>"){
var _12="/"+el.tagName;
var ns;
while((ns=el.nextSibling)&&ns.tagName!=_12){
ns.removeNode();
}
if(ns){
ns.removeNode();
}
}
el.parentNode.replaceChild(_11,el);
return _11;
},initElement:function(el){
el=this.fixElement_(el);
el.getContext=function(){
if(this.context_){
return this.context_;
}
return this.context_=new CanvasRenderingContext2D_(this);
};
el.attachEvent("onpropertychange",onPropertyChange);
el.attachEvent("onresize",onResize);
var _15=el.attributes;
if(_15.width&&_15.width.specified){
el.style.width=_15.width.nodeValue+"px";
}else{
el.width=el.clientWidth;
}
if(_15.height&&_15.height.specified){
el.style.height=_15.height.nodeValue+"px";
}else{
el.height=el.clientHeight;
}
return el;
}};
function onPropertyChange(e){
var el=e.srcElement;
switch(e.propertyName){
case "width":
el.style.width=el.attributes.width.nodeValue+"px";
el.getContext().clearRect();
break;
case "height":
el.style.height=el.attributes.height.nodeValue+"px";
el.getContext().clearRect();
break;
}
}
function onResize(e){
var el=e.srcElement;
if(el.firstChild){
el.firstChild.style.width=el.clientWidth+"px";
el.firstChild.style.height=el.clientHeight+"px";
}
}
_7.init();
var _1a=[];
for(var i=0;i<16;i++){
for(var j=0;j<16;j++){
_1a[i*16+j]=i.toString(16)+j.toString(16);
}
}
function createMatrixIdentity(){
return [[1,0,0],[0,1,0],[0,0,1]];
}
function matrixMultiply(m1,m2){
var _1f=createMatrixIdentity();
for(var x=0;x<3;x++){
for(var y=0;y<3;y++){
var sum=0;
for(var z=0;z<3;z++){
sum+=m1[x][z]*m2[z][y];
}
_1f[x][y]=sum;
}
}
return _1f;
}
function copyState(o1,o2){
o2.fillStyle=o1.fillStyle;
o2.lineCap=o1.lineCap;
o2.lineJoin=o1.lineJoin;
o2.lineWidth=o1.lineWidth;
o2.miterLimit=o1.miterLimit;
o2.shadowBlur=o1.shadowBlur;
o2.shadowColor=o1.shadowColor;
o2.shadowOffsetX=o1.shadowOffsetX;
o2.shadowOffsetY=o1.shadowOffsetY;
o2.strokeStyle=o1.strokeStyle;
o2.arcScaleX_=o1.arcScaleX_;
o2.arcScaleY_=o1.arcScaleY_;
}
function processStyle(_26){
var str,_28=1;
_26=String(_26);
if(_26.substring(0,3)=="rgb"){
var _29=_26.indexOf("(",3);
var end=_26.indexOf(")",_29+1);
var _2b=_26.substring(_29+1,end).split(",");
str="#";
for(var i=0;i<3;i++){
str+=_1a[Number(_2b[i])];
}
if((_2b.length==4)&&(_26.substr(3,1)=="a")){
_28=_2b[3];
}
}else{
str=_26;
}
return [str,_28];
}
function processLineCap(_2d){
switch(_2d){
case "butt":
return "flat";
case "round":
return "round";
case "square":
default:
return "square";
}
}
function CanvasRenderingContext2D_(_2e){
this.m_=createMatrixIdentity();
this.mStack_=[];
this.aStack_=[];
this.currentPath_=[];
this.strokeStyle="#000";
this.fillStyle="#000";
this.lineWidth=1;
this.lineJoin="miter";
this.lineCap="butt";
this.miterLimit=Z*1;
this.globalAlpha=1;
this.canvas=_2e;
var el=_2e.ownerDocument.createElement("div");
el.style.width=_2e.clientWidth+"px";
el.style.height=_2e.clientHeight+"px";
el.style.overflow="hidden";
el.style.position="absolute";
_2e.appendChild(el);
this.element_=el;
this.arcScaleX_=1;
this.arcScaleY_=1;
}
var _30=CanvasRenderingContext2D_.prototype;
_30.clearRect=function(){
this.element_.innerHTML="";
this.currentPath_=[];
};
_30.beginPath=function(){
this.currentPath_=[];
};
_30.moveTo=function(aX,aY){
this.currentPath_.push({type:"moveTo",x:aX,y:aY});
this.currentX_=aX;
this.currentY_=aY;
};
_30.lineTo=function(aX,aY){
this.currentPath_.push({type:"lineTo",x:aX,y:aY});
this.currentX_=aX;
this.currentY_=aY;
};
_30.bezierCurveTo=function(_35,_36,_37,_38,aX,aY){
this.currentPath_.push({type:"bezierCurveTo",cp1x:_35,cp1y:_36,cp2x:_37,cp2y:_38,x:aX,y:aY});
this.currentX_=aX;
this.currentY_=aY;
};
_30.quadraticCurveTo=function(_3b,_3c,aX,aY){
var _3f=this.currentX_+2/3*(_3b-this.currentX_);
var _40=this.currentY_+2/3*(_3c-this.currentY_);
var _41=_3f+(aX-this.currentX_)/3;
var _42=_40+(aY-this.currentY_)/3;
this.bezierCurveTo(_3f,_40,_41,_42,aX,aY);
};
_30.arc=function(aX,aY,_45,_46,_47,_48){
_45*=Z;
var _49=_48?"at":"wa";
var _4a=aX+(mc(_46)*_45)-Z2;
var _4b=aY+(ms(_46)*_45)-Z2;
var _4c=aX+(mc(_47)*_45)-Z2;
var _4d=aY+(ms(_47)*_45)-Z2;
if(_4a==_4c&&!_48){
_4a+=0.125;
}
this.currentPath_.push({type:_49,x:aX,y:aY,radius:_45,xStart:_4a,yStart:_4b,xEnd:_4c,yEnd:_4d});
};
_30.rect=function(aX,aY,_50,_51){
this.moveTo(aX,aY);
this.lineTo(aX+_50,aY);
this.lineTo(aX+_50,aY+_51);
this.lineTo(aX,aY+_51);
this.closePath();
};
_30.strokeRect=function(aX,aY,_54,_55){
this.beginPath();
this.moveTo(aX,aY);
this.lineTo(aX+_54,aY);
this.lineTo(aX+_54,aY+_55);
this.lineTo(aX,aY+_55);
this.closePath();
this.stroke();
};
_30.fillRect=function(aX,aY,_58,_59){
this.beginPath();
this.moveTo(aX,aY);
this.lineTo(aX+_58,aY);
this.lineTo(aX+_58,aY+_59);
this.lineTo(aX,aY+_59);
this.closePath();
this.fill();
};
_30.createLinearGradient=function(aX0,aY0,aX1,aY1){
var _5e=new CanvasGradient_("gradient");
return _5e;
};
_30.createRadialGradient=function(aX0,aY0,aR0,aX1,aY1,aR1){
var _65=new CanvasGradient_("gradientradial");
_65.radius1_=aR0;
_65.radius2_=aR1;
_65.focus_.x=aX0;
_65.focus_.y=aY0;
return _65;
};
_30.drawImage=function(_66,_67){
var dx,dy,dw,dh,sx,sy,sw,sh;
var _70=_66.runtimeStyle.width;
var _71=_66.runtimeStyle.height;
_66.runtimeStyle.width="auto";
_66.runtimeStyle.height="auto";
var w=_66.width;
var h=_66.height;
_66.runtimeStyle.width=_70;
_66.runtimeStyle.height=_71;
if(arguments.length==3){
dx=arguments[1];
dy=arguments[2];
sx=sy=0;
sw=dw=w;
sh=dh=h;
}else{
if(arguments.length==5){
dx=arguments[1];
dy=arguments[2];
dw=arguments[3];
dh=arguments[4];
sx=sy=0;
sw=w;
sh=h;
}else{
if(arguments.length==9){
sx=arguments[1];
sy=arguments[2];
sw=arguments[3];
sh=arguments[4];
dx=arguments[5];
dy=arguments[6];
dw=arguments[7];
dh=arguments[8];
}else{
throw "Invalid number of arguments";
}
}
}
var d=this.getCoords_(dx,dy);
var w2=sw/2;
var h2=sh/2;
var _77=[];
var W=10;
var H=10;
_77.push(" <g_vml_:group"," coordsize=\"",Z*W,",",Z*H,"\""," coordorigin=\"0,0\""," style=\"width:",W,";height:",H,";position:absolute;");
if(this.m_[0][0]!=1||this.m_[0][1]){
var _7a=[];
_7a.push("M11='",this.m_[0][0],"',","M12='",this.m_[1][0],"',","M21='",this.m_[0][1],"',","M22='",this.m_[1][1],"',","Dx='",mr(d.x/Z),"',","Dy='",mr(d.y/Z),"'");
var max=d;
var c2=this.getCoords_(dx+dw,dy);
var c3=this.getCoords_(dx,dy+dh);
var c4=this.getCoords_(dx+dw,dy+dh);
max.x=Math.max(max.x,c2.x,c3.x,c4.x);
max.y=Math.max(max.y,c2.y,c3.y,c4.y);
_77.push("padding:0 ",mr(max.x/Z),"px ",mr(max.y/Z),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",_7a.join(""),", sizingmethod='clip');");
}else{
_77.push("top:",mr(d.y/Z),"px;left:",mr(d.x/Z),"px;");
}
_77.push(" \">","<g_vml_:image src=\"",_66.src,"\""," style=\"width:",Z*dw,";"," height:",Z*dh,";\""," cropleft=\"",sx/w,"\""," croptop=\"",sy/h,"\""," cropright=\"",(w-sx-sw)/w,"\""," cropbottom=\"",(h-sy-sh)/h,"\""," />","</g_vml_:group>");
this.element_.insertAdjacentHTML("BeforeEnd",_77.join(""));
};
_30.stroke=function(_7f){
var _80=[];
var _81=false;
var a=processStyle(_7f?this.fillStyle:this.strokeStyle);
var _83=a[0];
var _84=a[1]*this.globalAlpha;
var W=10;
var H=10;
_80.push("<g_vml_:shape"," fillcolor=\"",_83,"\""," filled=\"",Boolean(_7f),"\""," style=\"position:absolute;width:",W,";height:",H,";\""," coordorigin=\"0 0\" coordsize=\"",Z*W," ",Z*H,"\""," stroked=\"",!_7f,"\""," strokeweight=\"",this.lineWidth,"\""," strokecolor=\"",_83,"\""," path=\"");
var _87=false;
var min={x:null,y:null};
var max={x:null,y:null};
for(var i=0;i<this.currentPath_.length;i++){
var p=this.currentPath_[i];
if(p.type=="moveTo"){
_80.push(" m ");
var c=this.getCoords_(p.x,p.y);
_80.push(mr(c.x),",",mr(c.y));
}else{
if(p.type=="lineTo"){
_80.push(" l ");
var c=this.getCoords_(p.x,p.y);
_80.push(mr(c.x),",",mr(c.y));
}else{
if(p.type=="close"){
_80.push(" x ");
}else{
if(p.type=="bezierCurveTo"){
_80.push(" c ");
var c=this.getCoords_(p.x,p.y);
var c1=this.getCoords_(p.cp1x,p.cp1y);
var c2=this.getCoords_(p.cp2x,p.cp2y);
_80.push(mr(c1.x),",",mr(c1.y),",",mr(c2.x),",",mr(c2.y),",",mr(c.x),",",mr(c.y));
}else{
if(p.type=="at"||p.type=="wa"){
_80.push(" ",p.type," ");
var c=this.getCoords_(p.x,p.y);
var _8f=this.getCoords_(p.xStart,p.yStart);
var _90=this.getCoords_(p.xEnd,p.yEnd);
_80.push(mr(c.x-this.arcScaleX_*p.radius),",",mr(c.y-this.arcScaleY_*p.radius)," ",mr(c.x+this.arcScaleX_*p.radius),",",mr(c.y+this.arcScaleY_*p.radius)," ",mr(_8f.x),",",mr(_8f.y)," ",mr(_90.x),",",mr(_90.y));
}
}
}
}
}
if(c){
if(min.x==null||c.x<min.x){
min.x=c.x;
}
if(max.x==null||c.x>max.x){
max.x=c.x;
}
if(min.y==null||c.y<min.y){
min.y=c.y;
}
if(max.y==null||c.y>max.y){
max.y=c.y;
}
}
}
_80.push(" \">");
if(typeof this.fillStyle=="object"){
var _91={x:"50%",y:"50%"};
var _92=(max.x-min.x);
var _93=(max.y-min.y);
var _94=(_92>_93)?_92:_93;
_91.x=mr((this.fillStyle.focus_.x/_92)*100+50)+"%";
_91.y=mr((this.fillStyle.focus_.y/_93)*100+50)+"%";
var _95=[];
if(this.fillStyle.type_=="gradientradial"){
var _96=(this.fillStyle.radius1_/_94*100);
var _97=(this.fillStyle.radius2_/_94*100)-_96;
}else{
var _96=0;
var _97=100;
}
var _98={offset:null,color:null};
var _99={offset:null,color:null};
this.fillStyle.colors_.sort(function(cs1,cs2){
return cs1.offset-cs2.offset;
});
for(var i=0;i<this.fillStyle.colors_.length;i++){
var fs=this.fillStyle.colors_[i];
_95.push((fs.offset*_97)+_96,"% ",fs.color,",");
if(fs.offset>_98.offset||_98.offset==null){
_98.offset=fs.offset;
_98.color=fs.color;
}
if(fs.offset<_99.offset||_99.offset==null){
_99.offset=fs.offset;
_99.color=fs.color;
}
}
_95.pop();
_80.push("<g_vml_:fill"," color=\"",_99.color,"\""," color2=\"",_98.color,"\""," type=\"",this.fillStyle.type_,"\""," focusposition=\"",_91.x,", ",_91.y,"\""," colors=\"",_95.join(""),"\""," opacity=\"",_84,"\" />");
}else{
if(_7f){
_80.push("<g_vml_:fill color=\"",_83,"\" opacity=\"",_84,"\" />");
}else{
_80.push("<g_vml_:stroke"," opacity=\"",_84,"\""," joinstyle=\"",this.lineJoin,"\""," miterlimit=\"",this.miterLimit,"\""," endcap=\"",processLineCap(this.lineCap),"\""," weight=\"",this.lineWidth,"px\""," color=\"",_83,"\" />");
}
}
_80.push("</g_vml_:shape>");
this.element_.insertAdjacentHTML("beforeEnd",_80.join(""));
this.currentPath_=[];
};
_30.fill=function(){
this.stroke(true);
};
_30.closePath=function(){
this.currentPath_.push({type:"close"});
};
_30.getCoords_=function(aX,aY){
return {x:Z*(aX*this.m_[0][0]+aY*this.m_[1][0]+this.m_[2][0])-Z2,y:Z*(aX*this.m_[0][1]+aY*this.m_[1][1]+this.m_[2][1])-Z2};
};
_30.save=function(){
var o={};
copyState(this,o);
this.aStack_.push(o);
this.mStack_.push(this.m_);
this.m_=matrixMultiply(createMatrixIdentity(),this.m_);
};
_30.restore=function(){
copyState(this.aStack_.pop(),this);
this.m_=this.mStack_.pop();
};
_30.translate=function(aX,aY){
var m1=[[1,0,0],[0,1,0],[aX,aY,1]];
this.m_=matrixMultiply(m1,this.m_);
};
_30.rotate=function(_a3){
var c=mc(_a3);
var s=ms(_a3);
var m1=[[c,s,0],[-s,c,0],[0,0,1]];
this.m_=matrixMultiply(m1,this.m_);
};
_30.scale=function(aX,aY){
this.arcScaleX_*=aX;
this.arcScaleY_*=aY;
var m1=[[aX,0,0],[0,aY,0],[0,0,1]];
this.m_=matrixMultiply(m1,this.m_);
};
_30.clip=function(){
};
_30.arcTo=function(){
};
_30.createPattern=function(){
return new CanvasPattern_;
};
function CanvasGradient_(_aa){
this.type_=_aa;
this.radius1_=0;
this.radius2_=0;
this.colors_=[];
this.focus_={x:0,y:0};
}
CanvasGradient_.prototype.addColorStop=function(_ab,_ac){
_ac=processStyle(_ac);
this.colors_.push({offset:1-_ab,color:_ac});
};
function CanvasPattern_(){
}
G_vmlCanvasManager=_7;
CanvasRenderingContext2D=CanvasRenderingContext2D_;
CanvasGradient=CanvasGradient_;
CanvasPattern=CanvasPattern_;
})();
}
