if(!window.CanvasRenderingContext2D){
(function(){
opera=(navigator.userAgent.indexOf("Opera")!=-1);
safari=(navigator.userAgent.indexOf("Safari")!=-1);
konq=(!safari&&(navigator.userAgent.indexOf("Konqueror")!=-1))?true:false;
gecko=((!safari&&!konq)&&(navigator.userAgent.indexOf("Gecko")!=-1))?true:false;
if(opera||gecko){
return;
}
var m=Math;
var mr=m.round;
var ms=m.sin;
var mc=m.cos;
var _5={init:function(_6){
var _7=_6||document;
if(/MSIE/.test(navigator.userAgent)&&!window.opera){
var _8=this;
_7.attachEvent("onreadystatechange",function(){
_8.init_(_7);
});
}
},init_:function(_9,e){
if(_9.readyState=="complete"){
if(!_9.namespaces["g_vml_"]){
_9.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml");
}
var ss=_9.createStyleSheet();
ss.cssText="canvas{display:inline-block;overflow:hidden;"+"text-align:left;}"+"g_vml_\\:*{behavior:url(#default#VML)}";
var _c=_9.getElementsByTagName("canvas");
for(var i=0;i<_c.length;i++){
if(!_c[i].getContext){
this.initElement(_c[i]);
}
}
}
},fixElement_:function(el){
var _f=el.outerHTML;
var _10=document.createElement(_f);
if(_f.slice(-2)!="/>"){
var _11="/"+el.tagName;
var ns;
while((ns=el.nextSibling)&&ns.tagName!=_11){
ns.removeNode();
}
if(ns){
ns.removeNode();
}
}
el.parentNode.replaceChild(_10,el);
return _10;
},initElement:function(el){
el=this.fixElement_(el);
el.getContext=function(){
if(this.context_){
return this.context_;
}
return this.context_=new CanvasRenderingContext2D_(this);
};
el.attachEvent("onresize",onResize);
var _14=el.attributes;
if(_14.width&&_14.width.specified){
el.style.width=_14.width.nodeValue+"px";
}
if(_14.height&&_14.height.specified){
el.style.height=_14.height.nodeValue+"px";
}
return el;
}};
function onPropertyChange(e){
switch(e.propertyName){
case "width":
case "height":
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";
}
}
_5.init();
var _18=[];
for(var i=0;i<16;i++){
for(var j=0;j<16;j++){
_18[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 _1d=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];
}
_1d[x][y]=sum;
}
}
return _1d;
}
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(_24){
var str,_26=1;
_24=String(_24);
if(_24.substring(0,3)=="rgb"){
var _27=_24.indexOf("(",3);
var end=_24.indexOf(")",_27+1);
var _29=_24.substring(_27+1,end).split(",");
str="#";
for(var i=0;i<3;i++){
str+=_18[parseInt(_29[i])];
}
if((_29.length==4)&&(_24.substr(3,1)=="a")){
_26=_29[3];
}
}else{
str=_24;
}
return [str,_26];
}
function processLineCap(_2b){
switch(_2b){
case "butt":
return "flat";
case "round":
return "round";
case "square":
default:
return "square";
}
}
function CanvasRenderingContext2D_(_2c){
this.m_=createMatrixIdentity();
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 el=document.createElement("div");
el.style.width=_2c.clientWidth+"px";
el.style.height=_2c.clientHeight+"px";
el.style.overflow="hidden";
el.style.position="absolute";
_2c.appendChild(el);
this.element_=el;
this.arcScaleX_=1;
this.arcScaleY_=1;
}
var _2e=CanvasRenderingContext2D_.prototype;
_2e.clearRect=function(){
this.element_.innerHTML="";
this.currentPath_=[];
};
_2e.beginPath=function(){
this.currentPath_=[];
};
_2e.moveTo=function(aX,aY){
this.currentPath_.push({type:"moveTo",x:aX,y:aY});
};
_2e.lineTo=function(aX,aY){
this.currentPath_.push({type:"lineTo",x:aX,y:aY});
};
_2e.bezierCurveTo=function(_33,_34,_35,_36,aX,aY){
this.currentPath_.push({type:"bezierCurveTo",cp1x:_33,cp1y:_34,cp2x:_35,cp2y:_36,x:aX,y:aY});
};
_2e.quadraticCurveTo=function(_39,_3a,aX,aY){
this.bezierCurveTo(_39,_3a,_39,_3a,aX,aY);
};
_2e.arc=function(aX,aY,_3f,_40,_41,_42){
_3f*=10;
var _43=_42?"at":"wa";
var _44=aX+(mc(_40)*_3f)-5;
var _45=aY+(ms(_40)*_3f)-5;
var _46=aX+(mc(_41)*_3f)-5;
var _47=aY+(ms(_41)*_3f)-5;
this.currentPath_.push({type:_43,x:aX,y:aY,radius:_3f,xStart:_44,yStart:_45,xEnd:_46,yEnd:_47});
};
_2e.rect=function(aX,aY,_4a,_4b){
this.moveTo(aX,aY);
this.lineTo(aX+_4a,aY);
this.lineTo(aX+_4a,aY+_4b);
this.lineTo(aX,aY+_4b);
this.closePath();
};
_2e.strokeRect=function(aX,aY,_4e,_4f){
this.beginPath();
this.moveTo(aX,aY);
this.lineTo(aX+_4e,aY);
this.lineTo(aX+_4e,aY+_4f);
this.lineTo(aX,aY+_4f);
this.closePath();
this.stroke();
};
_2e.fillRect=function(aX,aY,_52,_53){
this.beginPath();
this.moveTo(aX,aY);
this.lineTo(aX+_52,aY);
this.lineTo(aX+_52,aY+_53);
this.lineTo(aX,aY+_53);
this.closePath();
this.fill();
};
_2e.createLinearGradient=function(aX0,aY0,aX1,aY1){
var _58=new CanvasGradient_("gradient");
return _58;
};
_2e.createRadialGradient=function(aX0,aY0,aR0,aX1,aY1,aR1){
var _5f=new CanvasGradient_("gradientradial");
_5f.radius1_=aR0;
_5f.radius2_=aR1;
_5f.focus_.x=aX0;
_5f.focus_.y=aY0;
return _5f;
};
_2e.drawImage=function(_60,_61){
var dx,dy,dw,dh,sx,sy,sw,sh;
var w=_60.width;
var h=_60.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 _6f=[];
_6f.push(" <g_vml_:group"," coordsize=\"1000,1000\""," coordorigin=\"0, 0\""," style=\"width:100px;height:100px;position:absolute;");
if(this.m_[0][0]!=1||this.m_[0][1]){
var _70=[];
_70.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);
_6f.push(" padding:0 ",mr(max.x),"px ",mr(max.y),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",_70.join(""),", sizingmethod='clip');");
}else{
_6f.push(" top:",d.y,"px;left:",d.x,"px;");
}
_6f.push(" \">","<g_vml_:image src=\"",_60.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",_6f.join(""));
};
_2e.stroke=function(_75){
var _76=[];
var _77=false;
var a=processStyle(_75?this.fillStyle:this.strokeStyle);
var _79=a[0];
var _7a=a[1]*this.globalAlpha;
_76.push("<g_vml_:shape"," fillcolor=\"",_79,"\""," filled=\"",Boolean(_75),"\""," style=\"position:absolute;width:10;height:10;\""," coordorigin=\"0 0\" coordsize=\"100 100\""," stroked=\"",!_75,"\""," strokeweight=\"",this.lineWidth,"\""," strokecolor=\"",_79,"\""," path=\"");
var _7b=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"){
_76.push(" m ");
var c=this.getCoords_(p.x,p.y);
_76.push(mr(c.x),",",mr(c.y));
}else{
if(p.type=="lineTo"){
_76.push(" l ");
var c=this.getCoords_(p.x,p.y);
_76.push(mr(c.x),",",mr(c.y));
}else{
if(p.type=="close"){
_76.push(" x ");
}else{
if(p.type=="bezierCurveTo"){
_76.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);
_76.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"){
_76.push(" ",p.type," ");
var c=this.getCoords_(p.x,p.y);
var _83=this.getCoords_(p.xStart,p.yStart);
var _84=this.getCoords_(p.xEnd,p.yEnd);
_76.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(_83.x),",",mr(_83.y)," ",mr(_84.x),",",mr(_84.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;
}
}
}
_76.push(" \">");
if(typeof this.fillStyle=="object"){
var _85={x:"50%",y:"50%"};
var _86=(max.x-min.x);
var _87=(max.y-min.y);
var _88=(_86>_87)?_86:_87;
_85.x=mr((this.fillStyle.focus_.x/_86)*100+50)+"%";
_85.y=mr((this.fillStyle.focus_.y/_87)*100+50)+"%";
var _89=[];
if(this.fillStyle.type_=="gradientradial"){
var _8a=(this.fillStyle.radius1_/_88*100);
var _8b=(this.fillStyle.radius2_/_88*100)-_8a;
}else{
var _8a=0;
var _8b=100;
}
var _8c={offset:null,color:null};
var _8d={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];
_89.push((fs.offset*_8b)+_8a,"% ",fs.color,",");
if(fs.offset>_8c.offset||_8c.offset==null){
_8c.offset=fs.offset;
_8c.color=fs.color;
}
if(fs.offset<_8d.offset||_8d.offset==null){
_8d.offset=fs.offset;
_8d.color=fs.color;
}
}
_89.pop();
_76.push("<g_vml_:fill"," color=\"",_8d.color,"\""," color2=\"",_8c.color,"\""," type=\"",this.fillStyle.type_,"\""," focusposition=\"",_85.x,", ",_85.y,"\""," colors=\"",_89.join(""),"\""," opacity=\"",_7a,"\" />");
}else{
if(_75){
_76.push("<g_vml_:fill color=\"",_79,"\" opacity=\"",_7a,"\" />");
}else{
_76.push("<g_vml_:stroke"," opacity=\"",_7a,"\""," joinstyle=\"",this.lineJoin,"\""," miterlimit=\"",this.miterLimit,"\""," endcap=\"",processLineCap(this.lineCap),"\""," weight=\"",this.lineWidth,"px\""," color=\"",_79,"\" />");
}
}
_76.push("</g_vml_:shape>");
this.element_.insertAdjacentHTML("beforeEnd",_76.join(""));
this.currentPath_=[];
};
_2e.fill=function(){
this.stroke(true);
};
_2e.closePath=function(){
this.currentPath_.push({type:"close"});
};
_2e.getCoords_=function(aX,aY){
return {x:10*(aX*this.m_[0][0]+aY*this.m_[1][0]+this.m_[2][0])-5,y:10*(aX*this.m_[0][1]+aY*this.m_[1][1]+this.m_[2][1])-5};
};
_2e.save=function(){
var o={};
copyState(this,o);
this.aStack_.push(o);
this.mStack_.push(this.m_);
this.m_=matrixMultiply(createMatrixIdentity(),this.m_);
};
_2e.restore=function(){
copyState(this.aStack_.pop(),this);
this.m_=this.mStack_.pop();
};
_2e.translate=function(aX,aY){
var m1=[[1,0,0],[0,1,0],[aX,aY,1]];
this.m_=matrixMultiply(m1,this.m_);
};
_2e.rotate=function(_97){
var c=mc(_97);
var s=ms(_97);
var m1=[[c,s,0],[-s,c,0],[0,0,1]];
this.m_=matrixMultiply(m1,this.m_);
};
_2e.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_);
};
_2e.clip=function(){
};
_2e.arcTo=function(){
};
_2e.createPattern=function(){
return new CanvasPattern_;
};
function CanvasGradient_(_9e){
this.type_=_9e;
this.radius1_=0;
this.radius2_=0;
this.colors_=[];
this.focus_={x:0,y:0};
}
CanvasGradient_.prototype.addColorStop=function(_9f,_a0){
_a0=processStyle(_a0);
this.colors_.push({offset:1-_9f,color:_a0});
};
function CanvasPattern_(){
}
G_vmlCanvasManager=_5;
CanvasRenderingContext2D=CanvasRenderingContext2D_;
CanvasGradient=CanvasGradient_;
CanvasPattern=CanvasPattern_;
})();
}

