if(!window.CanvasRenderingContext2D){
(function(){
var _1={init:function(_2){
var _3=_2||document;
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
var _4=this;
_3.attachEvent("onreadystatechange",function(){
_4.init_(_3);
});
}
},init_:function(_5,e){
if(_5.readyState=="complete"){
if(!_5.namespaces["g_vml_"]){
_5.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml");
}
var ss=_5.createStyleSheet();
ss.cssText="canvas{display:inline-block;overflow:hidden;"+"text-align:left;}"+"canvas *{behavior:url(#default#VML)}";
var _8=_5.getElementsByTagName("canvas");
for(var i=0;i<_8.length;i++){
if(!_8[i].getContext){
this.initElement(_8[i]);
}
}
}
},fixElement_:function(el){
var _b=el.outerHTML;
var _c=document.createElement(_b);
if(_b.slice(-2)!="/>"){
var _d="/"+el.tagName;
var ns;
while((ns=el.nextSibling)&&ns.tagName!=_d){
ns.removeNode();
}
if(ns){
ns.removeNode();
}
}
el.parentNode.replaceChild(_c,el);
return _c;
},initElement:function(el){
el=this.fixElement_(el);
el.getContext=function(){
if(this.context_){
return this.context_;
}
return this.context_=new CanvasRenderingContext2D_(this);
};
var _10=this;
el.attachEvent("onpropertychange",function(e){
switch(e.propertyName){
case "width":
case "height":
break;
}
});
var _12=el.attributes;
if(_12.width&&_12.width.specified){
el.style.width=_12.width.nodeValue+"px";
}
if(_12.height&&_12.height.specified){
el.style.height=_12.height.nodeValue+"px";
}
}};
_1.init();
var _13=[];
for(var i=0;i<16;i++){
for(var j=0;j<16;j++){
_13[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 _18=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];
}
_18[x][y]=sum;
}
}
return _18;
}
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;
}
function processStyle(_1f){
var str,_21=1;
_1f=String(_1f);
if(_1f.substring(0,3)=="rgb"){
var _22=_1f.indexOf("(",3);
var end=_1f.indexOf(")",_22+1);
var _24=_1f.substring(_22+1,end).split(",");
str="#";
for(var i=0;i<3;i++){
str+=_13[parseInt(_24[i])];
}
if((_24.length==4)&&(_1f.substr(3,1)=="a")){
_21=_24[3];
}
}else{
str=_1f;
}
return [str,_21];
}
function processLineCap(_26){
switch(_26){
case "butt":
return "flat";
case "round":
return "round";
case "square":
default:
return "square";
}
}
function CanvasRenderingContext2D_(_27){
this.m_=createMatrixIdentity();
this.element_=_27;
this.mStack_=[];
this.aStack_=[];
this.currentPath_=[];
this.strokeStyle="#000";
this.fillStyle="#ccc";
this.lineWidth=1;
this.lineJoin="miter";
this.lineCap="butt";
this.miterLimit=10;
this.globalAlpha=1;
}
var _28=CanvasRenderingContext2D_.prototype;
_28.clearRect=function(){
this.element_.innerHTML="";
this.currentPath_=[];
};
_28.beginPath=function(){
this.currentPath_=[];
};
_28.moveTo=function(aX,aY){
this.currentPath_.push({type:"moveTo",x:aX,y:aY});
};
_28.lineTo=function(aX,aY){
this.currentPath_.push({type:"lineTo",x:aX,y:aY});
};
_28.bezierCurveTo=function(_2d,_2e,_2f,_30,aX,aY){
this.currentPath_.push({type:"bezierCurveTo",cp1x:_2d,cp1y:_2e,cp2x:_2f,cp2y:_30,x:aX,y:aY});
};
_28.quadraticCurveTo=function(_33,_34,aX,aY){
this.bezierCurveTo(_33,_34,_33,_34,aX,aY);
};
_28.arc=function(aX,aY,_39,_3a,_3b,_3c){
if(!_3c){
var t=_3a;
_3a=_3b;
_3b=t;
}
var _3e=aX+(Math.cos(_3a)*_39);
var _3f=aY+(Math.sin(_3a)*_39);
var _40=aX+(Math.cos(_3b)*_39);
var _41=aY+(Math.sin(_3b)*_39);
this.currentPath_.push({type:"arc",x:aX,y:aY,radius:_39,xStart:_3e,yStart:_3f,xEnd:_40,yEnd:_41});
};
_28.rect=function(aX,aY,_44,_45){
this.moveTo(aX,aY);
this.lineTo(aX+_44,aY);
this.lineTo(aX+_44,aY+_45);
this.lineTo(aX,aY+_45);
this.closePath();
};
_28.strokeRect=function(aX,aY,_48,_49){
this.beginPath();
this.moveTo(aX,aY);
this.lineTo(aX+_48,aY);
this.lineTo(aX+_48,aY+_49);
this.lineTo(aX,aY+_49);
this.closePath();
this.stroke();
};
_28.fillRect=function(aX,aY,_4c,_4d){
this.beginPath();
this.moveTo(aX,aY);
this.lineTo(aX+_4c,aY);
this.lineTo(aX+_4c,aY+_4d);
this.lineTo(aX,aY+_4d);
this.closePath();
this.fill();
};
_28.createLinearGradient=function(aX0,aY0,aX1,aY1){
var _52=new CanvasGradient_("gradient");
return _52;
};
_28.createRadialGradient=function(aX0,aY0,aR0,aX1,aY1,aR1){
var _59=new CanvasGradient_("gradientradial");
_59.radius1_=aR0;
_59.radius2_=aR1;
_59.focus_.x=aX0;
_59.focus_.y=aY0;
return _59;
};
_28.drawImage=function(_5a,_5b){
var dx,dy,dw,dh,sx,sy,sw,sh;
var w=_5a.width;
var h=_5a.height;
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 _69=[];
_69.push(" <g_vml_:group"," coordsize=\"100,100\""," coordorigin=\"0, 0\""," style=\"width:100px;height:100px;position:absolute;");
if(this.m_[0][0]!=1||this.m_[0][1]){
var _6a=[];
_6a.push("M11='",this.m_[0][0],"',","M12='",this.m_[1][0],"',","M21='",this.m_[0][1],"',","M22='",this.m_[1][1],"',","Dx='",d.x,"',","Dy='",d.y,"'");
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);
_69.push(" padding:0 ",Math.floor(max.x),"px ",Math.floor(max.y),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",_6a.join(""),", sizingmethod='clip');");
}else{
_69.push(" top:",d.y,"px;left:",d.x,"px;");
}
_69.push(" \">","<g_vml_:image src=\"",_5a.src,"\""," style=\"width:",dw,";"," height:",dh,";\""," cropleft=\"",sx/w,"\""," croptop=\"",sy/h,"\""," cropright=\"",(w-sx-sw)/w,"\""," cropbottom=\"",(h-sy-sh)/h,"\""," />","</g_vml_:group>");
this.element_.insertAdjacentHTML("BeforeEnd",_69.join(""));
};
_28.stroke=function(_6f){
var _70=[];
var _71=false;
var a=processStyle(_6f?this.fillStyle:this.strokeStyle);
var _73=a[0];
var _74=a[1]*this.globalAlpha;
_70.push("<g_vml_:shape"," fillcolor=\"",_73,"\""," filled=\"",Boolean(_6f),"\""," style=\"position:absolute;width:10;height:10;\""," coordorigin=\"0 0\" coordsize=\"10 10\""," stroked=\"",!_6f,"\""," strokeweight=\"",this.lineWidth,"\""," strokecolor=\"",_73,"\""," path=\"");
var _75=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"){
_70.push(" m ");
var c=this.getCoords_(p.x,p.y);
_70.push(Math.floor(c.x),",",Math.floor(c.y));
}else{
if(p.type=="lineTo"){
_70.push(" l ");
var c=this.getCoords_(p.x,p.y);
_70.push(Math.floor(c.x),",",Math.floor(c.y));
}else{
if(p.type=="close"){
_70.push(" x ");
}else{
if(p.type=="bezierCurveTo"){
_70.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);
_70.push(Math.floor(c1.x),",",Math.floor(c1.y),",",Math.floor(c2.x),",",Math.floor(c2.y),",",Math.floor(c.x),",",Math.floor(c.y));
}else{
if(p.type=="arc"){
_70.push(" ar ");
var c=this.getCoords_(p.x,p.y);
var _7d=this.getCoords_(p.xStart,p.yStart);
var _7e=this.getCoords_(p.xEnd,p.yEnd);
var _7f=this.m_[0][0];
var _80=this.m_[1][1];
_70.push(Math.floor(c.x-_7f*p.radius),",",Math.floor(c.y-_80*p.radius)," ",Math.floor(c.x+_7f*p.radius),",",Math.floor(c.y+_80*p.radius)," ",Math.floor(_7d.x),",",Math.floor(_7d.y)," ",Math.floor(_7e.x),",",Math.floor(_7e.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;
}
}
}
_70.push(" \">");
if(typeof this.fillStyle=="object"){
var _81={x:"50%",y:"50%"};
var _82=(max.x-min.x);
var _83=(max.y-min.y);
var _84=(_82>_83)?_82:_83;
_81.x=Math.floor((this.fillStyle.focus_.x/_82)*100+50)+"%";
_81.y=Math.floor((this.fillStyle.focus_.y/_83)*100+50)+"%";
var _85=[];
if(this.fillStyle.type_=="gradientradial"){
var _86=(this.fillStyle.radius1_/_84*100);
var _87=(this.fillStyle.radius2_/_84*100)-_86;
}else{
var _86=0;
var _87=100;
}
var _88={offset:null,color:null};
var _89={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];
_85.push((fs.offset*_87)+_86,"% ",fs.color,",");
if(fs.offset>_88.offset||_88.offset==null){
_88.offset=fs.offset;
_88.color=fs.color;
}
if(fs.offset<_89.offset||_89.offset==null){
_89.offset=fs.offset;
_89.color=fs.color;
}
}
_85.pop();
_70.push("<g_vml_:fill"," color=\"",_89.color,"\""," color2=\"",_88.color,"\""," type=\"",this.fillStyle.type_,"\""," focusposition=\"",_81.x,", ",_81.y,"\""," colors=\"",_85.join(""),"\""," opacity=\"",_74,"\" />");
}else{
if(_6f){
_70.push("<g_vml_:fill color=\"",_73,"\" opacity=\"",_74,"\" />");
}else{
_70.push("<g_vml_:stroke"," opacity=\"",_74,"\""," joinstyle=\"",this.lineJoin,"\""," miterlimit=\"",this.miterLimit,"\""," endcap=\"",processLineCap(this.lineCap),"\""," weight=\"",this.lineWidth,"px\""," color=\"",_73,"\" />");
}
}
_70.push("</g_vml_:shape>");
this.element_.insertAdjacentHTML("beforeEnd",_70.join(""));
this.currentPath_=[];
};
_28.fill=function(){
this.stroke(true);
};
_28.closePath=function(){
this.currentPath_.push({type:"close"});
};
_28.getCoords_=function(aX,aY){
return {x:(aX*this.m_[0][0]+aY*this.m_[1][0]+this.m_[2][0]),y:(aX*this.m_[0][1]+aY*this.m_[1][1]+this.m_[2][1])};
};
_28.save=function(){
var o={};
copyState(this,o);
this.aStack_.push(o);
this.mStack_.push(this.m_);
this.m_=matrixMultiply(createMatrixIdentity(),this.m_);
};
_28.restore=function(){
copyState(this.aStack_.pop(),this);
this.m_=this.mStack_.pop();
};
_28.translate=function(aX,aY){
var m1=[[1,0,0],[0,1,0],[aX,aY,1]];
this.m_=matrixMultiply(m1,this.m_);
};
_28.rotate=function(_93){
var c=Math.cos(_93);
var s=Math.sin(_93);
var m1=[[c,s,0],[-s,c,0],[0,0,1]];
this.m_=matrixMultiply(m1,this.m_);
};
_28.scale=function(aX,aY){
var m1=[[aX,0,0],[0,aY,0],[0,0,1]];
this.m_=matrixMultiply(m1,this.m_);
};
_28.clip=function(){
};
_28.arcTo=function(){
};
_28.createPattern=function(){
return new CanvasPattern_;
};
function CanvasGradient_(_9a){
this.type_=_9a;
this.radius1_=0;
this.radius2_=0;
this.colors_=[];
this.focus_={x:0,y:0};
}
CanvasGradient_.prototype.addColorStop=function(_9b,_9c){
_9c=processStyle(_9c);
this.colors_.push({offset:1-_9b,color:_9c});
};
function CanvasPattern_(){
}
G_vmlCanvasManager=_1;
CanvasRenderingContext2D=CanvasRenderingContext2D_;
CanvasGradient=CanvasGradient_;
CanvasPattern=CanvasPattern_;
})();
}


