if(!window.CanvasRenderingContext2D){(function(){var fK;var gU={iA:function(iE){var ds=iE||document;ds.createElement('canvas');if(/MSIE/.test(navigator.userAgent)&& !window.opera){var self=this;hH();ds.attachEvent('onreadystatechange',function(){self.iy(ds);});}},iy:function(ds){var hN=ds.createStyleSheet();hN.cssText='canvas{display:inline-block;overflow:hidden;'+'text-align:left;width:300px;height:150px}'+'canvas object{width:100%;height:100%;border:0;'+'background:transparen;margin:0}';var fV=ds.getElementsByTagName('canvas');for(var i=0;i<fV.length;i++){if(!fV[i].getContext){this.fa(fV[i]);}}},fa:function(aM){aM.getContext=function(){if(this.gO){return this.gO;}return this.gO=new gb(this);};var cT=aM.attributes;if(cT.width&&cT.width.specified){aM.style.width=cT.width.nodeValue+'px';}else{aM.width=aM.clientWidth;}if(cT.height&&cT.height.specified){aM.style.height=cT.height.nodeValue+'px';}else{aM.height=aM.clientHeight;}aM.innerHTML=hM();aM.attachEvent('onpropertychange',hT);return aM;}};function hT(e){var aM=e.srcElement;switch(e.propertyName){case 'width':aM.style.width=aM.attributes.width.nodeValue+'px';aM.getContext().clearRect();break;case 'height':aM.style.height=aM.attributes.height.nodeValue+'px';aM.getContext().clearRect();break;}};gU.iA();function hH(){document.write('<script type=text/xaml>'+'<Canvas x:Name="root" '+'xmlns="http://schemas.microsoft.com/client/2007" '+'xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" '+'Width="300" '+'Height="150" '+'Background="Transparent"> '+'</Canvas>'+'</script>');var scripts=document.scripts;var script=scripts[scripts.length-1];fK=script.uniqueID;script.id=fK;};function hM(ji){return '<object type="application/x-silverlight" >'+'<param name="windowless" value="true">'+'<param name="background" value="transparent">'+'<param name="source" value="#'+fK+'">'+'</object>';};function jr(){try{new ActiveXObject('AgControl.AgControl');return true;}catch(_){return false;}};var cr=[];for(var i=0;i<16;i++){for(var j=0;j<16;j++){cr[i*16+j]=i.toString(16)+j.toString(16);}}function dP(){return[[1,0,0],[0,1,0],[0,0,1]];};function cV(cd,dI){var result=dP();for(var x=0;x<3;x++){for(var y=0;y<3;y++){var bD=0;for(var z=0;z<3;z++){bD+=cd[x][z]*dI[z][y];}result[x][y]=bD;}}return result;};function je(ad){fF(ad,fw(ad),ad.ce);};function fF(ad,gC,m){var transform=gC.renderTransform;var matrix;if(!transform){transform=bE(ad,'<MatrixTransform/>');matrix=bE(ad,'<Matrix/>');transform.matrix=matrix;gC.renderTransform=transform;}else{matrix=transform.matrix;}matrix.m11=m[0][0];matrix.m12=m[0][1];matrix.m21=m[1][0];matrix.m22=m[1][1];matrix.offsetX=m[2][0];matrix.offsetY=m[2][1];};function gm(bq,aT){aT.fillStyle=bq.fillStyle;aT.lineCap=bq.lineCap;aT.lineJoin=bq.lineJoin;aT.lineWidth=bq.lineWidth;aT.miterLimit=bq.miterLimit;aT.shadowBlur=bq.shadowBlur;aT.shadowColor=bq.shadowColor;aT.shadowOffsetX=bq.shadowOffsetX;aT.shadowOffsetY=bq.shadowOffsetY;aT.strokeStyle=bq.strokeStyle;aT.globalAlpha=bq.globalAlpha;aT.ip=bq.ip;aT.ik=bq.ik;};function fE(s){var gk=/rgba\(([^)]+)\)/gi.exec(s);if(gk){var aR=gk[1].split(',');return '#'+cr[Math.floor(Number(aR[3])*255)]+cr[Number(aR[0])]+cr[Number(aR[1])]+cr[Number(aR[2])];}var gh=/rgb\(([^)]+)\)/gi.exec(s);if(gh){var aR=gh[1].split(',');return '#FF'+cr[Number(aR[0])]+cr[Number(aR[1])]+cr[Number(aR[2])];}return s;};function hS(lineCap){switch(lineCap){case 'butt':return 'flat';case 'round':return 'round';case 'square':default:return 'square';}};function fw(ad){return ad.canvas.firstChild.content.findName('root');};function bE(ad,s,eg){if(eg){s=s.replace(/\%(\d+)/g,function(match,index){return eg[Number(index)-1];});}try{return ad.canvas.firstChild.content.createFromXaml(s);}catch(ex){throw Error('Could not bE XAML from: '+s);}};function dN(ad,s,eg){var canvas=ad.lastCanvas_||bE(ad,'<Canvas/>');var shape=bE(ad,s,eg);canvas.children.add(shape);fF(ad,canvas,ad.ce);if(!ad.lastCanvas_){fw(ad).children.add(canvas);ad.lastCanvas_=canvas;}return shape;};function dS(ad,text,x,y){var font=ad.font.split(' ');var i=0;if((i=font[1].indexOf('px'))!= -1){font[1]=font[1].substr(0,i);}else if((i=font[1].indexOf('pt'))!= -1){font[1]=font[1].substr(0,i);}var e=dN(ad,'<TextBlock Canvas.Left="%1" Canvas.Top="%2" FontFamily="%3" FontSize="%4"/>',[x,y,font[2],font[1]]);e.Text=text;var hQ=fA(ad,ad.fillStyle);e.Foreground=hQ;switch(ad.textAlign){case 'right':e["Canvas.Left"]-=e.ActualWidth;break;case 'left':break;case 'center':e["Canvas.Left"]-=e.ActualWidth/2;break;}switch(ad.textBaseline){case 'middle':e["Canvas.Top"]-=e.ActualHeight/2;break;case 'top':break;case 'bottom':e["Canvas.Top"]-=e.ActualHeight;break;}return e;};function fA(ad,value){if(value instanceof ca){return value.gL(ad);}else if(value instanceof fP){throw Error('Not implemented');}else{return bE(ad,'<SolidColorBrush Color="%1"/>',[fE(value)]);}};function gb(hx){this.ce=dP();this.lastCanvas_=null;this.ge=[];this.hb=[];this.aL=[];this.strokeStyle='#000';this.fillStyle='#000';this.lineWidth=1;this.lineJoin='miter';this.lineCap='butt';this.miterLimit=10;this.globalAlpha=1;this.canvas=hx;};var ap=gb.prototype;ap.clearRect=function(){var root=fw(this);root.children.clear();this.aL=[];this.lastCanvas_=null;};ap.beginPath=function(){this.aL=[];};ap.moveTo=function(an,al){this.aL.push('M'+an+','+al);};ap.lineTo=function(an,al){if(this.aL.length==0)return;this.aL.push('L'+an+','+al);};ap.bezierCurveTo=function(iO,iQ,iT,iq,an,al){if(this.aL.length==0)return;this.aL.push('C'+iO+','+iQ+' '+iT+','+iq+' '+an+' '+al);};ap.quadraticCurveTo=function(hJ,hO,an,al){if(this.aL.length==0)return;this.aL.push('Q'+hJ+','+hO+' '+an+','+al);};ap.arcTo=function(bf,aO,iY,az,dA){if(this.aL.length==0)return;};ap.arc=function(an,al,cp,cg,eN,ef){var gW=Math.abs(cg-eN);if(cg==eN){return;}var bp=an+cp*Math.cos(eN);var gT=al+cp*Math.sin(eN);if(gW>=2*Math.PI){this.arc(an,al,cp,cg,cg+Math.PI,ef);this.arc(an,al,cp,cg+Math.PI,cg+2*Math.PI,ef);this.moveTo(bp,gT);return;}var gu=an+cp*Math.cos(cg);var gv=al+cp*Math.sin(cg);var gi=gW*180/Math.PI;var hw=ef?0:1;var iR=gi>=180==Boolean(ef)?0:1;if(this.aL.length!=0){this.lineTo(gu,gv);}else{this.moveTo(gu,gv);}this.aL.push('A'+cp+','+cp+' '+gi+' '+iR+' '+hw+' '+bp+','+gT);};ap.rect=function(an,al,ck,cu){this.moveTo(an,al);this.lineTo(an+ck,al);this.lineTo(an+ck,al+cu);this.lineTo(an,al+cu);this.closePath();};ap.strokeRect=function(an,al,ck,cu){this.beginPath();this.moveTo(an,al);this.lineTo(an+ck,al);this.lineTo(an+ck,al+cu);this.lineTo(an,al+cu);this.closePath();this.stroke();this.aL=[];};ap.fillRect=function(an,al,ck,cu){this.beginPath();this.moveTo(an,al);this.lineTo(an+ck,al);this.lineTo(an+ck,al+cu);this.lineTo(an,al+cu);this.closePath();this.fill();this.aL=[];};ap.fillText=function(text,x,y){dS(this,text,x,y);};ap.strokeText=function(text,x,y){};ap.measureText=function(text){var canvas=this.lastCanvas_||bE(this,'<Canvas/>');var e=dS(this,text,0,0);var w=e.ActualWidth;canvas.children.remove(e);return{width:w};};ap.createLinearGradient=function(hX,hY,hW,ia){return new fx(hX,hY,hW,ia);};ap.createRadialGradient=function(cZ,cU,eu,bf,aO,eE){return new gr(cZ,cU,eu,bf,aO,eE);};ap.drawImage=function(image,jw){var cb,bY,dv,dC,bZ,eK,sw,cl;if(arguments.length==3){cb=arguments[1];bY=arguments[2];}else if(arguments.length==5){cb=arguments[1];bY=arguments[2];dv=arguments[3];dC=arguments[4];}else if(arguments.length==9){bZ=arguments[1];eK=arguments[2];sw=arguments[3];cl=arguments[4];cb=arguments[5];bY=arguments[6];dv=arguments[7];dC=arguments[8];}else{throw Error('Invalid number of arguments');}var cF;if(arguments.length==9){cF=dN(this,'<Image Source="%1"/>',[image.src]);var hu=bE(this,'<RectangleGeometry Rect="%1,%2,%3,%4"/>',[bZ,eK,sw,cl]);cF.clip=hu;var m=dP();m[2][0]= -bZ;m[2][1]= -eK;var dI=dP();dI[0][0]=dv/sw;dI[1][1]=dC/cl;m=cV(m,dI);m[2][0]+=cb;m[2][1]+=bY;fF(this,cF,m);}else{cF=dN(this,'<Image Source="%1" Canvas.Left="%2" Canvas.Top="%3"/>',[image.src,cb,bY]);if(dv!=undefined||dC!=undefined){cF.width=dv;cF.height=dC;cF.stretch='fill';}}};ap.stroke=function(){if(this.aL.length==0)return;var aF=dN(this,'<Path/>');aF.Data=this.aL.join(' ');aF.stroke=fA(this,this.strokeStyle);aF.opacity=this.globalAlpha;aF.strokeThickness=this.lineWidth;aF.strokeMiterLimit=this.miterLimit;aF.strokeLineJoin=this.lineJoin;aF.strokeEndLineCap=aF.strokeStartLineCap=hS(this.lineCap);};ap.fill=function(){if(this.aL.length==0)return;var aF=dN(this,'<Path Data="%1"/>',[this.aL.join(' ')]);aF.data.fillRule='NonZero';aF.fill=fA(this,this.fillStyle);};ap.closePath=function(){this.aL.push('z');};function cL(self,m){self.ce=m;self.lastCanvas_=null;};ap.save=function(){var o={};gm(this,o);this.hb.push(o);this.ge.push(this.ce);cL(this,cV(dP(),this.ce));};ap.restore=function(){gm(this.hb.pop(),this);cL(this,this.ge.pop());};ap.translate=function(an,al){var cd=[[1,0,0],[0,1,0],[an,al,1]];cL(this,cV(cd,this.ce));};ap.rotate=function(hg){var c=Math.cos(hg);var s=Math.sin(hg);var cd=[[c,s,0],[-s,c,0],[0,0,1]];cL(this,cV(cd,this.ce));};ap.scale=function(an,al){var cd=[[an,0,0],[0,al,0],[0,0,1]];cL(this,cV(cd,this.ce));};ap.transform=function(m11,m12,m21,m22,cb,bY){var cd=[[m11,m12,0],[m21,m22,0],[cb,bY,1]];cL(this,cV(cd,this.ce));};ap.jf=function(m11,m12,m21,m22,cb,bY){cL(this,[[m11,m12,0],[m21,m22,0],[cb,bY,1],]);};ap.clip=function(){};ap.createPattern=function(){return new fP;};function ca(){this.fz=[];};ca.prototype.addColorStop=function(ii,fW){fW=fE(fW);this.fz.push({offset:ii,color:fW});};ca.prototype.gM=function(ad,cD,cI){var iF=cD.gradientStops;for(var i=0,c;c=cI[i];i++){var color=fE(c.color);iF.add(bE(ad,'<GradientStop Color="%1" Offset="%2"/>',[color,c.offset]));}};function fx(cZ,cU,bf,aO){ca.call(this);this.eQ=cZ;this.ei=cU;this.eR=bf;this.et=aO;};fx.prototype=new ca;fx.prototype.gL=function(ad){var cD=bE(ad,'<LinearGradientBrush MappingMode="Absolute" '+'StartPoint="%1,%2" EndPoint="%3,%4"/>',[this.eQ,this.ei,this.eR,this.et]);this.gM(ad,cD,this.fz);return cD;};function eS(v){return isNaN(v)|| !isFinite(v);};function gr(cZ,cU,eu,bf,aO,eE){if(eu<0||eE<0||eS(cZ)||eS(cU)||eS(bf)||eS(aO)){var error=Error('DOMException.INDEX_SIZE_ERR');error.code=1;throw error;}ca.call(this);this.eQ=cZ;this.ei=cU;this.eA=eu;this.eR=bf;this.et=aO;this.eF=eE;};gr.prototype=new ca;ca.prototype.gL=function(ad){if(this.eQ==this.eR&&this.ei==this.et&&this.eA==this.eF){return null;}var dA=Math.max(this.eA,this.eF);var fv=Math.min(this.eA,this.eF);var cD=bE(ad,'<RadialGradientBrush MappingMode="Absolute" '+'GradientOrigin="%1,%2" Center="%3,%4" '+'RadiusX="%5" RadiusY="%5"/>',[this.eQ,this.ei,this.eR,this.et,dA]);var cI=this.fz.concat();if(this.eF<this.eA){cI.reverse();for(var i=0,c;c=cI[i];i++){c.offset=1-c.offset;}}cI.sort(function(dK,im){return dK.offset-im.offset;});if(fv>0){for(var i=0,c;c=cI[i];i++){c.offset=fv/dA+(dA-fv)/dA*c.offset;}}this.gM(ad,cD,cI);return cD;};function fP(){};G_vmlCanvasManager=gU;CanvasRenderingContext2D=gb;CanvasGradient=ca;CanvasPattern=fP;})();};
if(!Array.prototype.indexOf)Array.prototype.indexOf=function(item,i){i||(i=0);var length=this.length;if(i<0)i=length+i;for(;i<length;i++)if(this[i]===item)return i;return-1;};window.Canvas=window.Canvas||{};window.Canvas.Text={jz:{'Arial':['Utkal','Nimbus Sans L','FreeSans','Malayalam','Phetsarath OT'],'Charcoal':['Rehka','Aakar','FreeSerif','Gentium'],'Comic Sans MS':['TSCu_Comic'],'Courier New':['FreeMono','Nimbus Mono L'],'Georgia':['Nimbus Roman No9 L','Century Schoolbook L','Norasi','Rekha'],'Helvetica':['FreeSans','Gargi_1.7','Jamrul','Malayalam','Mukti Narrow','Nimbus Sans L','Phetsarath OT'],'Lucida Grande':['Gargi_1.7','Garuda','Jamrul','Loma','Malayalam','Mukti Narrow'],'Tahoma':['Kalimati'],'Times New Roman':['FreeSerif'],'Verdana':['Kalimati']},jh:{'serif':['Times New Roman','Bodoni','Garamond','Minion Web','ITC Stone Serif','Georgia','Bitstream Cyberbit'],'sans-serif':['Trebuchet','Verdana','Arial','Tahoma','Helvetica','ITC Avant Garde Gothic','Univers','Futura','Gill Sans','Akzidenz Grotesk','Attika','Typiko New Era','ITC Stone Sans','Monotype Gill Sans 571'],'monospace':['Courier','Courier New','Prestige','Everson Mono'],'cursive':['Caflisch Script','Adobe Poetica','Sanvito','Ex Ponto','Snell Roundhand','Zapf-Chancery'],'fantasy':['Alpha Geometrique','Critter','Cottonwood','FB Reactor','Studz']},hf:'',faces:{},fD:0.962,fq:{}};function jA(canvas){if(window.G_vmlCanvasManager&&window.attachEvent&& !window.opera){canvas=window.G_vmlCanvasManager.fa(canvas);}return canvas;}(function(){var isOpera9=(window.opera&&navigator.userAgent.match(/Opera\/9/)),jo= !window.CanvasRenderingContext2D,aP=window.CanvasRenderingContext2D?window.CanvasRenderingContext2D.prototype:document.createElement('canvas').getContext('2d').jt,ay=window.Canvas.Text;ay.options={iK:' ',it:false,reimplement:false,iw:false};function ie(){var ht='canvas.text.js',scripts=document.getElementsByTagName("script"),i,j,src,aR;for(i=0;i<scripts.length;i++){src=scripts[i].src;if(src.indexOf(ht)>0){aR=src.split('?');ay.hf=aR[0].replace(ht,'');if(aR[1]){var options=aR[1].split('&');for(j=options.length-1;j>=0;--j){var gI=options[j].split('=');ay.options[gI[0]]=gI[1];}}break;}}};ie();var fB= !ay.options.it&&aP.hR&& !aP.strokeText;if(aP.strokeText&& !ay.options.reimplement){window.bA={fO:function(){}};return;}function hK(weight){switch(weight){case 'bolder':case 'bold':case '900':case '800':case '700':return 'bold';case '600':case '500':case '400':default:case 'normal':return 'normal';}};function gs(e){if(e.bv)return e.bv;if(window.getComputedStyle)e.bv=window.getComputedStyle(e,'');else if(e.currentStyle)e.bv=e.currentStyle;return e.bv;};function hy(){var hn=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')}];if(!ay.bT){for(i=0;i<hn.length;i++){try{ay.bT=hn[i]();break;}catch(e){}}}return ay.bT;};ay.iG=function(family,weight,style){weight='normal';style='normal';if(this.faces[family]&&this.faces[family][weight]&&this.faces[family][weight][style])return this.faces[family][weight][style];var iL=(family.replace(/[ -]/g,'_')+'-'+weight+'-'+style),bT=this.bT,url=this.hf+'faces/'+iL+'.js';bT=hy();bT.open("get",url,false);bT.send(null);if(bT.status==200){eval(bT.responseText);return this.faces[family][weight][style];}else throw 'Unable to load the font ['+family+' '+weight+' '+style+']';return false;};ay.fO=function(data){var family=data.bu.toLowerCase();this.faces[family]=this.faces[family]||{};this.faces[family][data.cssFontWeight]=this.faces[family][data.cssFontWeight]||{};this.faces[family][data.cssFontWeight][data.cssFontStyle]=data;return data;};window.bA={faces:ay.faces,fO:ay.fO};ay.ek=function(style){var weight=hK(style.weight),family=style.family.toLowerCase();return this.iG(family,weight,style.style);};try{aP.font="10px sans-serif";aP.textAlign="start";aP.textBaseline="alphabetic";}catch(e){}aP.gK=function(db){db=db.replace(/^\s\s*/,'').replace(/\s\s*$/,'');if(ay.fq[db])return this.getComputedStyle(ay.fq[db]);var aR,ev=[],i,p,v,fj,style={family:'sans-serif',size:10,weight:'normal',style:'normal'},gH={weight:['bold','bolder','lighter','100','200','300','400','500','600','700','800','900'],style:['italic','oblique']};aR=db.match(/("[^"]+"|'[^']+'|[\w\%-_]+)*/g);for(i=0;i<aR.length;i++){fj=aR[i].replace(/^["']*/,'').replace(/["']*$/,'');if(fj)ev.push(fj);}style.family=ev.pop()||style.family;style.size=ev.pop()||style.size;for(p in gH){v=gH[p];for(i=0;i<v.length;i++){if(ev.indexOf(v[i])!= -1){style[p]=v[i];break;}}}return this.getComputedStyle(ay.fq[db]=style);};aP.hc=function(style){return style.style+' '+style.weight+' '+style.size+'px "'+style.family+'"';};aP.iV=function(text,style){var face=ay.ek(style),scale=(style.size/face.gn)*(3/4),offset=0;if(!isOpera9){this.scale(scale,-scale);this.lineWidth/=scale;}var i,hl=text.split(''),length=hl.length;for(i=0;i<length;i++){offset+=this.gl(hl[i],face,scale,offset);}};if(isOpera9){aP.gl=function(c,face,scale,offset){var i,dE,dH,outline,action,aH=face.D[c],length;if(!aH)return;if(aH.o){outline=aH.fT||(aH.fT=aH.o.split(' '));length=outline.length;for(i=0;i<length;){action=outline[i++];switch(action){case 'm':this.moveTo(outline[i++]*scale+offset,outline[i++]* -scale);break;case 'l':this.lineTo(outline[i++]*scale+offset,outline[i++]* -scale);break;case 'q':dE=outline[i++]*scale+offset;dH=outline[i++]* -scale;this.quadraticCurveTo(outline[i++]*scale+offset,outline[i++]* -scale,dE,dH);break;}}}return aH.bU*scale;};}else{aP.gl=function(c,face){var i,dE,dH,outline,action,aH=face.D[c],length;if(!aH)return;if(aH.o){outline=aH.fT||(aH.fT=aH.o.split(' '));length=outline.length;for(i=0;i<length;){action=outline[i++];switch(action){case 'm':this.moveTo(outline[i++],outline[i++]);break;case 'l':this.lineTo(outline[i++],outline[i++]);break;case 'q':dE=outline[i++];dH=outline[i++];this.quadraticCurveTo(outline[i++],outline[i++],dE,dH);break;}}}if(aH.bU)this.translate(aH.bU,0);};}aP.getTextExtents=function(text,style){var width=0,height=0,bU=0,face=ay.ek(style),i,aH;for(i=0;i<text.length;i++){aH=face.D[text.charAt(i)]||face.D[ay.options.iK];width+=Math.max(aH.bU,aH.x_max);bU+=aH.bU;}return{width:width,height:face.lineHeight,bU:bU};};aP.getComputedStyle=function(style){var p,eJ=gs(this.canvas),bv={};for(p in style){bv[p]=style[p];}var eO=parseFloat(eJ.fontSize),fontSize=parseFloat(style.size);if(typeof style.size=='number'||style.size.indexOf('px')!= -1)bv.size=fontSize;else if(style.size.indexOf('em')!= -1)bv.size=eO*fontSize;else if(style.size.indexOf('%')!= -1)bv.size=(eO/100)*fontSize;else if(style.size.indexOf('pt')!= -1)bv.size=eO*(4/3)*fontSize;else bv.size=eO;return bv;};aP.getTextOffset=function(text,style,face){var eJ=gs(this.canvas),cO=this.measureText(text),scale=(style.size/face.gn)*(3/4),offset={x:0,y:0,cO:cO,scale:scale};switch(this.textAlign){default:case null:case 'left':break;case 'center':offset.x= -cO.width/2;break;case 'right':offset.x= -cO.width;break;case 'start':offset.x=(eJ.direction=='rtl')? -cO.width:0;break;case 'end':offset.x=(eJ.direction=='ltr')? -cO.width:0;break;}switch(this.textBaseline){case 'hanging':case 'top':offset.y=face.ascender;break;case 'middle':offset.y=(face.ascender+face.descender)/2;break;default:case null:case 'alphabetic':case 'ideographic':break;case 'bottom':offset.y=face.descender;break;}offset.y*=scale;return offset;};aP.dS=function(text,x,y,maxWidth,stroke){var style=this.gK(this.font),face=ay.ek(style),offset=this.getTextOffset(text,style,face);this.save();this.translate(x+offset.x,y+offset.y);if(face.strokeFont&& !stroke){this.strokeStyle=this.fillStyle;}this.beginPath();if(fB){this.il=this.hc(style);this[stroke?'mozPathText':'hR'](text);}else{this.scale(ay.fD,ay.fD);this.iV(text,style);if(face.strokeFont){this.lineWidth=style.size*(style.weight=='bold'?0.5:0.3);}}this[(stroke||(face.strokeFont&& !fB))?'stroke':'fill']();this.closePath();this.restore();if(ay.options.iw){var left=Math.floor(offset.x+x)+0.5,top=Math.floor(y)+0.5;this.save();this.strokeStyle='#F00';this.lineWidth=0.5;this.beginPath();this.moveTo(left+offset.cO.width,top);this.lineTo(left,top);this.moveTo(left-offset.x,top+offset.y);this.lineTo(left-offset.x,top+offset.y-style.size);this.stroke();this.closePath();this.restore();}};aP.fillText=function(text,x,y,maxWidth){this.dS(text,x,y,maxWidth,false);};aP.strokeText=function(text,x,y,maxWidth){this.dS(text,x,y,maxWidth,true);};aP.measureText=function(text){var style=this.gK(this.font),fN={width:0};if(fB){this.il=this.hc(style);fN.width=this.jd(text);}else{var face=ay.ek(style),scale=(style.size/face.gn)*(3/4);fN.width=this.getTextExtents(text,style).bU*scale*ay.fD;}return fN;};})();
if(bA&&bA.fO)bA.fO({"D":{"{":{"x_min":38,"x_max":423,"bU":455,"o":"m 38 416 q 121 442 89 416 q 165 516 154 469 q 176 676 176 563 q 179 825 176 789 q 202 916 185 882 q 242 971 218 951 q 303 1003 266 992 q 385 1010 328 1010 l 423 1010 l 423 904 l 402 904 q 310 878 333 904 q 288 765 288 853 q 280 541 288 587 q 239 429 268 468 q 149 359 211 390 q 255 264 222 328 q 288 54 288 200 q 290 -103 288 -78 q 317 -167 295 -149 q 402 -186 339 -186 l 423 -186 l 423 -292 l 385 -292 q 291 -281 320 -292 q 220 -230 248 -265 q 184 -142 192 -195 q 176 33 176 -88 q 165 202 176 155 q 121 276 154 249 q 38 304 89 304 l 38 416 "},"k":{"x_min":90,"x_max":675.21875,"bU":681,"o":"m 90 0 l 90 994 l 210 994 l 210 427 l 493 720 l 647 720 l 378 452 l 675 0 l 527 0 l 294 368 l 210 285 l 210 0 l 90 0 "},"U":{"x_min":107,"x_max":873,"bU":983,"o":"m 744 993 l 873 993 l 873 419 q 839 181 873 269 q 719 38 806 93 q 492 -17 633 -17 q 268 31 355 -17 q 144 170 181 79 q 107 419 107 261 l 107 993 l 236 993 l 236 420 q 259 229 236 290 q 340 135 283 168 q 481 102 398 102 q 683 167 623 102 q 744 420 744 233 l 744 993 "},"8":{"x_min":55,"x_max":697,"bU":757,"o":"m 239 539 q 129 618 165 566 q 94 741 94 669 q 170 923 94 849 q 373 997 246 997 q 579 921 501 997 q 657 738 657 846 q 621 618 657 669 q 513 539 586 566 q 650 442 603 509 q 697 284 697 376 q 608 69 697 156 q 376 -17 520 -17 q 143 70 231 -17 q 55 287 55 157 q 103 449 55 384 q 239 539 151 515 m 216 745 q 260 630 216 675 q 376 586 305 586 q 489 630 445 586 q 534 738 534 674 q 488 851 534 805 q 375 897 442 897 q 261 852 306 897 q 216 745 216 807 m 177 286 q 202 185 177 234 q 274 110 226 136 q 377 83 322 83 q 519 139 463 83 q 575 282 575 195 q 517 428 575 370 q 373 486 459 486 q 233 429 289 486 q 177 286 177 372 "},"R":{"x_min":107,"x_max":965.75,"bU":983,"o":"m 107 0 l 107 993 l 539 993 q 737 966 669 993 q 845 871 804 939 q 886 722 886 804 q 818 543 886 616 q 611 451 751 471 q 689 402 662 426 q 796 270 745 349 l 965 0 l 803 0 l 674 206 q 581 343 618 296 q 516 409 545 390 q 457 436 487 428 q 385 441 435 441 l 236 441 l 236 0 l 107 0 m 236 555 l 513 555 q 651 573 601 555 q 727 633 701 592 q 753 722 753 674 q 702 837 753 792 q 544 883 652 883 l 236 883 l 236 555 "},"[":{"x_min":92,"x_max":356.21875,"bU":378,"o":"m 92 -276 l 92 993 l 356 993 l 356 892 l 212 892 l 212 -175 l 356 -175 l 356 -276 l 92 -276 "},"1":{"x_min":147.734375,"x_max":507,"bU":757,"o":"m 507 0 l 387 0 l 387 777 q 273 693 343 735 q 147 630 203 651 l 147 748 q 323 865 248 796 q 429 998 398 933 l 507 998 l 507 0 "},"G":{"x_min":72,"x_max":973,"bU":1058,"o":"m 560 389 l 560 506 l 973 506 l 973 138 q 776 22 877 61 q 569 -17 675 -17 q 308 45 426 -17 q 131 227 191 108 q 72 492 72 345 q 131 763 72 637 q 302 949 190 888 q 559 1011 414 1011 q 750 976 665 1011 q 884 878 836 941 q 958 715 933 816 l 842 683 q 787 802 820 758 q 694 871 755 845 q 560 898 634 898 q 407 870 472 898 q 303 798 343 843 q 242 700 264 753 q 205 500 205 608 q 249 278 205 367 q 380 145 294 188 q 562 102 466 102 q 726 134 646 102 q 847 204 805 167 l 847 389 l 560 389 "},"`":{"x_min":59.15625,"x_max":309.046875,"bU":453,"o":"m 309 809 l 212 809 l 59 999 l 219 999 l 309 809 "},"p":{"x_min":90,"x_max":703,"bU":758,"o":"m 90 -276 l 90 720 l 198 720 l 198 625 q 285 708 237 681 q 403 736 334 736 q 563 688 494 736 q 667 554 632 641 q 703 365 703 468 q 664 166 703 254 q 550 30 625 77 q 394 -16 476 -16 q 287 9 335 -16 q 209 74 239 35 l 209 -276 l 90 -276 m 198 355 q 253 150 198 216 q 387 84 308 84 q 524 152 467 84 q 581 365 581 221 q 525 571 581 503 q 392 640 469 640 q 256 567 315 640 q 198 355 198 494 "},"y":{"x_min":21.9375,"x_max":668.59375,"bU":681,"o":"m 84 -277 l 71 -162 q 139 -173 110 -173 q 203 -159 179 -173 q 242 -121 227 -145 q 279 -30 253 -103 q 289 0 282 -20 l 21 720 l 150 720 l 297 303 q 348 136 326 224 q 398 300 369 220 l 548 720 l 668 720 l 400 -12 q 332 -175 356 -130 q 259 -263 301 -235 q 161 -292 218 -292 q 84 -277 126 -292 "},"w":{"x_min":3.984375,"x_max":972.3125,"bU":983,"o":"m 219 0 l 3 720 l 127 720 l 239 304 l 281 149 q 318 298 284 161 l 430 720 l 553 720 l 659 302 l 694 164 l 735 303 l 856 720 l 972 720 l 751 0 l 627 0 l 515 431 l 487 553 l 344 0 l 219 0 "},":":{"x_min":123,"x_max":259,"bU":378,"o":"m 123 581 l 123 720 l 259 720 l 259 581 l 123 581 m 123 0 l 123 139 l 259 139 l 259 0 l 123 0 "},"m":{"x_min":90,"x_max":1046,"bU":1134,"o":"m 90 0 l 90 720 l 197 720 l 197 618 q 285 703 230 671 q 410 736 340 736 q 539 702 489 736 q 610 609 589 669 q 828 736 694 736 q 989 676 933 736 q 1046 493 1046 617 l 1046 0 l 927 0 l 927 453 q 915 558 927 526 q 873 610 903 590 q 801 630 842 630 q 678 579 727 630 q 629 417 629 529 l 629 0 l 509 0 l 509 467 q 479 589 509 548 q 384 630 450 630 q 290 602 333 630 q 228 523 248 575 q 209 373 209 471 l 209 0 l 90 0 "},"K":{"x_min":100,"x_max":905.5625,"bU":908,"o":"m 100 0 l 100 994 l 229 994 l 229 501 l 712 994 l 887 994 l 478 591 l 905 0 l 735 0 l 388 503 l 229 344 l 229 0 l 100 0 "},"7":{"x_min":64,"x_max":695,"bU":757,"o":"m 64 863 l 64 980 l 695 980 l 695 885 q 508 616 601 784 q 364 272 415 449 q 328 0 328 148 l 201 0 q 244 282 201 116 q 369 603 287 448 q 541 863 450 757 l 64 863 "},"Y":{"x_min":3.5,"x_max":896.796875,"bU":907,"o":"m 379 0 l 379 421 l 3 994 l 160 994 l 352 694 q 451 526 405 610 q 557 701 495 604 l 746 994 l 896 994 l 508 421 l 508 0 l 379 0 "},"E":{"x_min":108,"x_max":835.15625,"bU":908,"o":"m 108 0 l 108 993 l 812 993 l 812 876 l 237 876 l 237 572 l 776 572 l 776 455 l 237 455 l 237 117 l 835 117 l 835 0 l 108 0 "},"b":{"x_min":89,"x_max":701,"bU":757,"o":"m 200 0 l 89 0 l 89 994 l 208 994 l 208 639 q 402 736 284 736 q 525 709 467 736 q 621 634 583 682 q 679 517 658 585 q 701 371 701 448 q 611 84 701 185 q 396 -16 521 -16 q 200 90 271 -16 l 200 0 m 199 365 q 233 178 199 236 q 386 84 290 84 q 521 153 464 84 q 579 360 579 223 q 524 568 579 501 q 391 636 469 636 q 256 566 313 636 q 199 365 199 497 "},"L":{"x_min":100,"x_max":708.84375,"bU":757,"o":"m 100 0 l 100 993 l 229 993 l 229 117 l 708 117 l 708 0 l 100 0 "},"'":{"x_min":60,"x_max":196,"bU":260,"o":"m 90 642 l 60 827 l 60 994 l 196 994 l 196 827 l 164 642 l 90 642 "},".":{"x_min":124,"x_max":260,"bU":378,"o":"m 124 0 l 124 139 l 260 139 l 260 0 l 124 0 "},"e":{"x_min":50,"x_max":700.046875,"bU":757,"o":"m 573 232 l 696 216 q 588 45 667 106 q 386 -16 509 -16 q 140 81 231 -16 q 50 354 50 178 q 141 635 50 535 q 379 736 233 736 q 610 638 520 736 q 700 361 700 539 q 700 329 700 350 l 177 329 q 236 147 177 210 q 385 84 296 84 q 498 119 451 84 q 573 232 545 154 m 182 429 l 574 429 q 528 565 566 520 q 379 636 471 636 q 239 579 296 636 q 182 429 182 523 "},"^":{"x_min":35.890625,"x_max":602.796875,"bU":639,"o":"m 158 468 l 35 468 l 270 1011 l 366 1011 l 602 468 l 482 468 l 318 872 l 158 468 "},"Q":{"x_min":58,"x_max":1008.609375,"bU":1058,"o":"m 843 106 q 1008 14 932 43 l 970 -77 q 761 44 865 -38 q 521 -17 652 -17 q 282 48 389 -17 q 116 231 174 113 q 58 496 58 348 q 116 764 58 643 q 283 947 175 884 q 524 1011 391 1011 q 767 945 659 1011 q 933 762 876 880 q 990 497 990 645 q 953 277 990 375 q 843 106 916 179 m 559 274 q 743 180 670 242 q 857 497 857 285 q 816 708 857 618 q 699 848 776 798 q 525 898 621 898 q 286 797 381 898 q 191 497 191 696 q 285 199 191 303 q 525 96 379 96 q 655 122 594 96 q 527 179 595 162 l 559 274 "},"H":{"x_min":109,"x_max":873,"bU":983,"o":"m 109 0 l 109 994 l 238 994 l 238 585 l 744 585 l 744 994 l 873 994 l 873 0 l 744 0 l 744 468 l 238 468 l 238 0 l 109 0 "},"5":{"x_min":56.9375,"x_max":703,"bU":758,"o":"m 56 260 l 182 271 q 247 130 196 177 q 369 83 298 83 q 516 149 456 83 q 576 325 576 216 q 518 490 576 430 q 367 551 461 551 q 263 524 310 551 q 190 454 217 497 l 78 469 l 172 980 l 657 980 l 657 863 l 268 863 l 215 596 q 399 659 303 659 q 615 568 527 659 q 703 336 703 478 q 625 103 703 202 q 370 -17 532 -17 q 152 58 237 -17 q 56 260 68 134 "},",":{"x_min":112.5625,"x_max":257,"bU":378,"o":"m 120 0 l 120 139 l 257 139 l 257 0 q 230 -123 257 -76 q 145 -196 203 -170 l 112 -144 q 168 -94 150 -127 q 187 0 187 -61 l 120 0 "},"\"":{"x_min":62,"x_max":419,"bU":483,"o":"m 95 642 l 62 831 l 62 994 l 198 994 l 198 831 l 168 642 l 95 642 m 315 642 l 283 831 l 283 994 l 419 994 l 419 831 l 387 642 l 315 642 "},"%":{"x_min":79,"x_max":1126,"bU":1210,"o":"m 79 754 q 131 935 79 860 q 283 1010 184 1010 q 435 943 375 1010 q 496 747 496 876 q 435 553 496 621 q 285 485 374 485 q 137 552 196 485 q 79 754 79 619 m 287 926 q 212 886 242 926 q 183 742 183 847 q 213 607 183 646 q 287 569 243 569 q 362 608 332 569 q 392 751 392 647 q 361 887 392 848 q 287 926 331 926 m 287 -37 l 820 1010 l 917 1010 l 387 -37 l 287 -37 m 709 232 q 761 413 709 339 q 914 488 813 488 q 1065 421 1005 488 q 1126 225 1126 354 q 1065 31 1126 99 q 914 -37 1004 -37 q 767 30 826 -37 q 709 232 709 97 m 917 404 q 842 364 872 404 q 813 220 813 325 q 842 86 813 125 q 916 47 872 47 q 992 86 962 47 q 1022 229 1022 125 q 992 365 1022 326 q 917 404 962 404 "},"<":{"x_min":74,"x_max":719,"bU":794,"o":"m 74 434 l 74 548 l 719 826 l 719 704 l 207 490 l 719 274 l 719 153 l 74 434 "},"t":{"x_min":24,"x_max":368.28125,"bU":378,"o":"m 351 109 l 368 1 q 278 -9 317 -9 q 177 12 212 -9 q 126 67 141 33 q 112 211 112 101 l 112 625 l 24 625 l 24 720 l 112 720 l 112 898 l 231 971 l 231 720 l 351 720 l 351 625 l 231 625 l 231 204 q 237 137 231 152 q 257 113 243 122 q 298 105 272 105 q 351 109 318 105 "},";":{"x_min":113.03125,"x_max":257,"bU":378,"o":"m 121 581 l 121 720 l 257 720 l 257 581 l 121 581 m 121 0 l 121 139 l 257 139 l 257 0 q 230 -123 257 -76 q 146 -196 203 -170 l 113 -144 q 168 -94 150 -127 q 187 0 187 -61 l 121 0 "},"n":{"x_min":90,"x_max":664,"bU":758,"o":"m 90 0 l 90 720 l 198 720 l 198 617 q 422 736 275 736 q 539 712 486 736 q 620 651 593 689 q 657 560 646 613 q 664 442 664 527 l 664 0 l 544 0 l 544 437 q 530 549 544 512 q 480 607 516 585 q 397 630 445 630 q 265 580 320 630 q 209 392 209 531 l 209 0 l 90 0 "},"g":{"x_min":44,"x_max":666,"bU":757,"o":"m 66 -59 l 184 -77 q 224 -157 191 -132 q 345 -191 269 -191 q 473 -157 428 -191 q 534 -62 518 -123 q 544 94 544 -25 q 348 0 465 0 q 123 107 203 0 q 44 363 44 214 q 80 554 44 466 q 186 688 117 641 q 349 736 255 736 q 555 632 474 736 l 555 720 l 666 720 l 666 97 q 632 -140 666 -70 q 526 -251 598 -210 q 347 -292 453 -292 q 143 -234 221 -292 q 66 -59 66 -176 m 166 372 q 222 166 166 231 q 360 101 277 101 q 498 165 442 101 q 554 368 554 230 q 496 567 554 500 q 358 635 439 635 q 222 568 278 635 q 166 372 166 502 "},"\\":{"x_min":0,"x_max":378.15625,"bU":378,"o":"m 282 -17 l 0 1010 l 96 1010 l 378 -17 l 282 -17 "},"}":{"x_min":31,"x_max":416,"bU":455,"o":"m 416 416 l 416 304 q 332 276 364 304 q 288 202 299 249 q 278 42 278 156 q 274 -106 278 -70 q 251 -198 268 -164 q 211 -253 235 -232 q 150 -284 187 -273 q 68 -292 125 -292 l 31 -292 l 31 -186 l 51 -186 q 143 -160 120 -186 q 166 -46 166 -135 q 171 168 166 123 q 214 289 182 244 q 304 359 246 334 q 197 458 228 397 q 166 665 166 519 q 162 822 166 797 q 136 886 158 868 q 51 904 114 904 l 31 904 l 31 1010 l 68 1010 q 162 999 133 1010 q 233 949 205 984 q 269 860 261 914 q 278 685 278 807 q 288 516 278 563 q 331 443 299 470 q 416 416 364 416 "},"N":{"x_min":104,"x_max":872,"bU":984,"o":"m 104 0 l 104 994 l 236 994 l 748 213 l 748 994 l 872 994 l 872 0 l 739 0 l 228 781 l 228 0 l 104 0 "},"2":{"x_min":41,"x_max":686,"bU":758,"o":"m 686 117 l 686 0 l 41 0 q 56 84 41 44 q 134 216 80 151 q 290 367 188 281 q 505 577 449 500 q 561 724 561 655 q 510 847 561 797 q 377 897 459 897 q 238 844 290 897 q 187 697 187 791 l 64 710 q 159 924 76 850 q 380 998 241 998 q 602 918 520 998 q 684 721 684 839 q 660 604 684 662 q 580 483 636 547 q 396 308 525 419 q 258 183 288 216 q 207 117 227 150 l 686 117 "},"i":{"x_min":90,"x_max":210,"bU":302,"o":"m 90 853 l 90 993 l 210 993 l 210 853 l 90 853 m 90 0 l 90 720 l 210 720 l 210 0 l 90 0 "}," ":{"x_min":0,"x_max":0,"bU":378},"+":{"x_min":76,"x_max":719,"bU":795,"o":"m 341 161 l 341 433 l 76 433 l 76 547 l 341 547 l 341 818 l 454 818 l 454 547 l 719 547 l 719 433 l 454 433 l 454 161 l 341 161 "},"W":{"x_min":16.609375,"x_max":1269.390625,"bU":1285,"o":"m 275 0 l 16 994 l 148 994 l 297 342 q 338 139 321 240 q 382 322 375 298 l 567 994 l 723 994 l 862 490 q 938 139 915 303 q 986 355 957 233 l 1139 994 l 1269 994 l 1002 0 l 877 0 l 672 757 q 642 873 646 852 q 613 757 626 805 l 406 0 l 275 0 "},">":{"x_min":74,"x_max":719,"bU":794,"o":"m 719 434 l 74 153 l 74 274 l 584 490 l 74 704 l 74 826 l 719 548 l 719 434 "},"r":{"x_min":88,"x_max":471.8125,"bU":453,"o":"m 88 0 l 88 720 l 196 720 l 196 610 q 272 711 237 687 q 348 736 306 736 q 471 696 409 736 l 430 583 q 342 610 386 610 q 272 585 303 610 q 227 519 241 561 q 207 376 207 454 l 207 0 l 88 0 "},"A":{"x_min": -2,"x_max":909.84375,"bU":908,"o":"m -2 0 l 372 993 l 511 993 l 909 0 l 762 0 l 649 301 l 241 301 l 134 0 l -2 0 m 279 408 l 609 408 l 507 683 q 438 889 461 808 q 386 699 420 793 l 279 408 "},"M":{"x_min":101,"x_max":1031,"bU":1134,"o":"m 101 0 l 101 994 l 294 994 l 525 290 q 572 143 557 191 q 624 302 588 197 l 857 994 l 1031 994 l 1031 0 l 907 0 l 907 831 l 623 0 l 507 0 l 225 846 l 225 0 l 101 0 "},")":{"x_min":82.28125,"x_max":403.953125,"bU":453,"o":"m 168 -292 l 82 -292 q 281 359 281 33 q 252 612 281 486 q 189 807 229 714 q 82 1011 163 868 l 168 1011 q 352 669 292 840 q 403 360 403 521 q 335 6 403 177 q 168 -292 266 -164 "},"a":{"x_min":49,"x_max":698.890625,"bU":757,"o":"m 550 89 q 422 7 483 31 q 290 -16 360 -16 q 111 41 174 -16 q 49 190 49 99 q 72 286 49 242 q 134 356 96 330 q 220 396 172 383 q 327 415 256 406 q 540 457 471 432 q 540 488 540 482 q 506 593 540 563 q 370 635 460 635 q 246 604 286 635 q 186 498 206 574 l 69 514 q 122 638 85 591 q 227 710 158 685 q 387 736 296 736 q 534 714 478 736 q 617 659 591 692 q 655 576 644 626 q 661 464 661 545 l 661 302 q 668 86 661 132 q 698 0 676 41 l 574 0 q 550 89 555 38 m 540 361 q 345 315 475 334 q 240 291 271 304 q 193 251 210 277 q 177 193 177 225 q 213 112 177 144 q 319 80 249 80 q 442 110 388 80 q 521 195 495 141 q 540 316 540 236 l 540 361 "},"Z":{"x_min":27,"x_max":797,"bU":831,"o":"m 27 0 l 27 121 l 525 758 q 626 876 578 825 l 83 876 l 83 993 l 781 993 l 781 876 l 233 186 l 174 117 l 797 117 l 797 0 l 27 0 "},"F":{"x_min":112,"x_max":769.359375,"bU":832,"o":"m 112 0 l 112 993 l 769 993 l 769 876 l 241 876 l 241 568 l 698 568 l 698 451 l 241 451 l 241 0 l 112 0 "},"0":{"x_min":56,"x_max":691,"bU":756,"o":"m 56 490 q 91 773 56 666 q 197 939 127 881 q 373 998 267 998 q 510 965 451 998 q 608 872 570 933 q 669 725 647 812 q 691 490 691 637 q 655 207 691 315 q 550 41 620 100 q 373 -17 480 -17 q 152 86 232 -17 q 56 490 56 210 m 178 490 q 235 164 178 245 q 373 83 291 83 q 511 164 455 83 q 568 490 568 246 q 511 816 568 735 q 372 897 455 897 q 240 825 289 897 q 178 490 178 734 "},"]":{"x_min":25.78125,"x_max":290,"bU":378,"o":"m 290 -276 l 25 -276 l 25 -175 l 170 -175 l 170 892 l 25 892 l 25 993 l 290 993 l 290 -276 "},"z":{"x_min":27,"x_max":652,"bU":681,"o":"m 27 0 l 27 99 l 476 623 q 341 623 400 623 l 54 623 l 54 720 l 631 720 l 631 639 l 248 182 l 174 102 q 325 102 255 102 l 652 102 l 652 0 l 27 0 "},"T":{"x_min":32,"x_max":804,"bU":831,"o":"m 353 0 l 353 876 l 32 876 l 32 993 l 804 993 l 804 876 l 482 876 l 482 0 l 353 0 "},"j":{"x_min": -62.53125,"x_max":209,"bU":303,"o":"m 89 852 l 89 994 l 209 994 l 209 852 l 89 852 m -62 -279 l -39 -175 q 16 -185 -4 -185 q 71 -160 53 -185 q 89 -36 89 -135 l 89 719 l 209 719 l 209 -39 q 175 -224 209 -172 q 31 -292 131 -292 q -62 -279 -17 -292 "},"&":{"x_min":58,"x_max":876.296875,"bU":908,"o":"m 646 117 q 517 16 587 50 q 366 -17 447 -17 q 129 86 216 -17 q 58 273 58 170 q 116 440 58 365 q 289 570 174 514 q 202 695 224 647 q 180 788 180 744 q 248 944 180 878 q 422 1010 317 1010 q 585 947 521 1010 q 649 798 649 885 q 465 556 649 656 l 639 329 q 686 467 669 389 l 810 440 q 724 226 778 310 q 876 74 791 135 l 795 -23 q 646 117 723 24 m 403 634 q 504 716 481 681 q 527 794 527 752 q 495 877 527 845 q 416 910 463 910 q 335 878 367 910 q 303 800 303 846 q 314 751 303 777 q 349 697 326 726 l 403 634 m 571 213 l 351 490 q 220 381 254 431 q 187 281 187 330 q 234 156 187 221 q 367 91 281 91 q 479 125 421 91 q 571 213 536 159 "},"S":{"x_min":62.015625,"x_max":836,"bU":907,"o":"m 62 319 l 182 330 q 222 207 190 255 q 320 130 253 159 q 470 101 386 101 q 600 123 543 101 q 684 184 656 145 q 712 269 712 223 q 685 351 712 316 q 597 410 658 386 q 424 458 558 425 q 236 520 289 491 q 132 612 166 557 q 98 736 98 668 q 139 876 98 811 q 262 976 181 942 q 441 1010 342 1010 q 632 973 549 1010 q 760 867 715 937 q 804 709 804 797 l 683 709 q 615 846 673 798 q 446 894 558 894 q 275 850 329 894 q 222 745 222 806 q 259 657 222 691 q 454 586 297 622 q 670 523 611 550 q 795 421 755 483 q 836 280 836 360 q 791 131 836 201 q 663 21 746 60 q 475 -17 579 -17 q 253 22 342 -17 q 112 140 163 61 q 62 319 62 219 "},"/":{"x_min":0,"x_max":378.15625,"bU":378,"o":"m 0 -17 l 282 1010 l 378 1010 l 96 -17 l 0 -17 "},"J":{"x_min":38,"x_max":575,"bU":681,"o":"m 38 281 l 158 297 q 195 142 158 184 q 299 100 233 100 q 383 122 348 100 q 432 184 419 145 q 446 308 446 223 l 446 993 l 575 993 l 575 316 q 545 123 575 191 q 452 18 515 54 q 301 -17 388 -17 q 105 58 173 -17 q 38 281 38 133 "},"D":{"x_min":105,"x_max":911,"bU":983,"o":"m 105 0 l 105 993 l 440 993 q 614 978 554 993 q 757 907 698 959 q 872 737 834 841 q 911 501 911 634 q 885 301 911 388 q 818 156 859 214 q 729 66 778 99 q 613 16 681 33 q 456 0 545 0 l 105 0 m 234 117 l 442 117 q 593 135 538 117 q 680 186 648 153 q 752 312 726 233 q 778 503 778 391 q 727 743 778 659 q 605 855 677 827 q 438 876 553 876 l 234 876 l 234 117 "},"$":{"x_min":51.890625,"x_max":693,"bU":757,"o":"m 339 -143 l 339 -21 q 192 19 249 -9 q 93 115 135 49 q 51 275 51 180 l 169 298 q 218 154 183 200 q 339 81 268 89 l 339 470 q 188 528 265 484 q 99 618 130 561 q 69 749 69 676 q 159 960 69 879 q 339 1026 220 1014 l 339 1085 l 409 1085 l 409 1026 q 574 964 513 1016 q 669 782 653 897 l 545 763 q 501 873 534 834 q 409 923 467 911 l 409 571 q 528 535 499 548 q 619 474 584 510 q 674 388 655 438 q 693 280 693 338 q 613 68 693 153 q 409 -17 534 -17 l 409 -143 l 339 -143 m 339 925 q 229 868 269 914 q 189 759 189 822 q 223 654 189 696 q 339 587 257 612 l 339 925 m 409 81 q 524 143 478 90 q 570 274 570 196 q 537 381 570 340 q 409 453 505 421 l 409 81 "},"C":{"x_min":68,"x_max":929.40625,"bU":983,"o":"m 800 348 l 929 315 q 783 68 888 153 q 525 -17 678 -17 q 269 48 368 -17 q 119 237 171 113 q 68 504 68 362 q 126 775 68 659 q 291 950 184 890 q 527 1011 399 1011 q 773 934 674 1011 q 912 721 873 858 l 785 690 q 687 848 751 799 q 525 898 623 898 q 337 843 413 898 q 231 695 262 788 q 201 505 201 603 q 237 283 201 378 q 349 142 273 189 q 515 96 426 96 q 698 159 623 96 q 800 348 773 223 "},"X":{"x_min":5.984375,"x_max":899.21875,"bU":908,"o":"m 5 0 l 382 518 l 50 994 l 204 994 l 380 739 q 459 617 435 659 q 536 730 491 671 l 732 994 l 872 994 l 530 525 l 899 0 l 739 0 l 494 354 q 451 421 473 385 q 405 346 419 366 l 160 0 l 5 0 "},"c":{"x_min":53,"x_max":667.75,"bU":680,"o":"m 550 263 l 667 248 q 569 54 648 124 q 374 -16 489 -16 q 141 80 229 -16 q 53 357 53 177 q 90 561 53 474 q 206 692 128 648 q 374 736 283 736 q 562 676 489 736 q 656 508 635 617 l 540 490 q 481 599 523 562 q 379 636 439 636 q 232 569 288 636 q 175 360 175 503 q 230 150 175 215 q 372 84 284 84 q 490 128 443 84 q 550 263 537 172 "},"v":{"x_min":17.28125,"x_max":664.609375,"bU":681,"o":"m 285 0 l 17 720 l 143 720 l 295 288 q 340 143 319 218 q 384 280 356 200 l 541 720 l 664 720 l 397 0 l 285 0 "},"x":{"x_min":9.96875,"x_max":670.59375,"bU":681,"o":"m 9 0 l 267 374 l 29 720 l 178 720 l 287 551 q 336 470 317 503 q 390 549 365 515 l 509 720 l 651 720 l 408 381 l 670 0 l 523 0 l 378 223 l 340 284 l 154 0 l 9 0 "},"9":{"x_min":56,"x_max":697,"bU":757,"o":"m 73 229 l 188 240 q 244 120 203 157 q 350 83 285 83 q 446 109 405 83 q 514 177 488 134 q 559 294 541 221 q 577 443 577 367 q 577 468 577 451 q 478 373 541 409 q 344 337 416 337 q 139 426 223 337 q 56 662 56 515 q 143 905 56 813 q 362 998 230 998 q 536 945 457 998 q 656 796 615 893 q 697 517 697 700 q 656 213 697 326 q 535 41 615 100 q 347 -17 455 -17 q 161 47 233 -17 q 73 229 88 112 m 563 668 q 508 835 563 773 q 376 897 454 897 q 238 830 297 897 q 178 658 178 764 q 235 504 178 563 q 373 445 291 445 q 510 504 456 445 q 563 668 563 563 "},"l":{"x_min":87,"x_max":207,"bU":303,"o":"m 87 0 l 87 994 l 207 994 l 207 0 l 87 0 "},"-":{"x_min":43,"x_max":411,"bU":454,"o":"m 43 298 l 43 421 l 411 421 l 411 298 l 43 298 "},"#":{"x_min":14,"x_max":740,"bU":757,"o":"m 68 -16 l 126 272 l 14 272 l 14 373 l 146 373 l 195 619 l 14 619 l 14 720 l 215 720 l 273 1010 l 373 1010 l 315 720 l 524 720 l 582 1010 l 682 1010 l 624 720 l 740 720 l 740 619 l 605 619 l 555 373 l 740 373 l 740 272 l 535 272 l 477 -16 l 377 -16 l 434 272 l 226 272 l 168 -16 l 68 -16 m 246 373 l 454 373 l 504 619 l 295 619 l 246 373 "},"=":{"x_min":76,"x_max":719,"bU":795,"o":"m 719 585 l 76 585 l 76 699 l 719 699 l 719 585 m 719 283 l 76 283 l 76 397 l 719 397 l 719 283 "},"u":{"x_min":87,"x_max":659,"bU":757,"o":"m 552 0 l 552 105 q 328 -16 469 -16 q 211 8 265 -16 q 131 69 157 32 q 94 160 105 106 q 87 274 87 196 l 87 720 l 207 720 l 207 320 q 214 192 207 225 q 262 116 225 143 q 352 89 298 89 q 453 117 406 89 q 519 193 500 145 q 539 334 539 242 l 539 720 l 659 720 l 659 0 l 552 0 "},"B":{"x_min":100,"x_max":836,"bU":908,"o":"m 100 0 l 100 993 l 465 993 q 645 962 577 993 q 750 870 712 932 q 789 739 789 807 q 754 619 789 675 q 652 528 720 563 q 788 438 740 502 q 836 288 836 374 q 807 158 836 218 q 735 65 778 98 q 628 16 693 33 q 471 0 564 0 l 100 0 m 229 576 l 439 576 q 562 587 525 576 q 637 636 612 602 q 662 723 662 671 q 638 810 662 773 q 572 862 615 848 q 423 876 528 876 l 229 876 l 229 576 m 229 117 l 471 117 q 559 121 534 117 q 633 148 604 129 q 682 204 663 167 q 702 288 702 240 q 674 384 702 343 q 596 442 646 425 q 454 459 547 459 l 229 459 l 229 117 "},"*":{"x_min":42.1875,"x_max":481.46875,"bU":529,"o":"m 42 810 l 72 906 q 226 841 178 869 q 213 1010 213 963 l 308 1010 q 294 841 308 942 q 450 906 362 877 l 481 810 q 315 772 397 782 q 430 644 356 736 l 350 587 q 259 732 311 640 q 173 587 210 637 l 94 644 q 205 772 171 741 q 42 810 119 789 "},"o":{"x_min":45,"x_max":706,"bU":757,"o":"m 45 359 q 154 656 45 559 q 375 736 245 736 q 613 638 521 736 q 706 370 706 541 q 665 151 706 231 q 546 28 624 72 q 375 -16 468 -16 q 136 80 227 -16 q 45 359 45 177 m 167 359 q 227 153 167 221 q 375 84 286 84 q 523 153 464 84 q 583 364 583 222 q 523 566 583 497 q 375 635 464 635 q 227 566 286 635 q 167 359 167 498 "},"d":{"x_min":47,"x_max":659,"bU":757,"o":"m 548 0 l 548 91 q 350 -16 480 -16 q 195 31 266 -16 q 85 163 124 78 q 47 359 47 248 q 82 554 47 467 q 187 689 117 642 q 345 736 258 736 q 458 708 409 736 q 540 637 508 681 l 540 994 l 659 994 l 659 0 l 548 0 m 169 359 q 227 152 169 221 q 361 84 284 84 q 495 149 440 84 q 550 349 550 215 q 494 565 550 496 q 356 635 438 635 q 223 568 276 635 q 169 359 169 502 "},"~":{"x_min":58,"x_max":738,"bU":795,"o":"m 58 377 l 58 516 q 242 598 128 598 q 326 586 282 598 q 451 538 370 574 q 520 513 497 519 q 566 507 543 507 q 655 533 609 507 q 738 600 702 559 l 738 456 q 651 397 695 415 q 553 379 608 379 q 477 388 513 379 q 362 434 441 398 q 231 470 284 470 q 151 451 188 470 q 58 377 113 432 "},"P":{"x_min":105,"x_max":849,"bU":908,"o":"m 105 0 l 105 994 l 472 994 q 620 984 569 994 q 741 938 692 972 q 819 842 789 903 q 849 706 849 780 q 769 491 849 579 q 483 404 690 404 l 234 404 l 234 0 l 105 0 m 234 521 l 485 521 q 663 568 610 521 q 716 702 716 616 q 685 809 716 764 q 603 868 654 853 q 483 877 571 877 l 234 877 l 234 521 "},"_":{"x_min": -21,"x_max":772,"bU":757,"o":"m -21 -276 l -21 -188 l 772 -188 l 772 -276 l -21 -276 "},"I":{"x_min":127,"x_max":256,"bU":378,"o":"m 127 0 l 127 994 l 256 994 l 256 0 l 127 0 "},"6":{"x_min":51,"x_max":694,"bU":756,"o":"m 676 745 l 558 745 q 512 844 542 812 q 393 897 464 897 q 292 864 335 897 q 203 742 236 822 q 171 512 171 661 q 275 612 213 579 q 406 645 338 645 q 610 555 526 645 q 694 322 694 465 q 654 148 694 229 q 545 25 614 68 q 389 -17 476 -17 q 145 95 239 -17 q 51 464 51 207 q 155 883 51 752 q 400 997 246 997 q 588 930 515 997 q 676 745 662 863 m 188 322 q 215 201 188 258 q 288 113 241 143 q 387 83 335 83 q 517 145 463 83 q 572 315 572 208 q 518 477 572 418 q 382 537 464 537 q 245 477 301 537 q 188 322 188 418 "},"!":{"x_min":122,"x_max":260,"bU":378,"o":"m 135 247 l 135 773 l 135 994 l 248 994 l 248 773 l 248 247 l 135 247 m 122 0 l 122 139 l 260 139 l 260 0 l 122 0 "},"s":{"x_min":42.0625,"x_max":628,"bU":681,"o":"m 42 215 l 160 234 q 216 122 170 161 q 343 84 261 84 q 465 118 425 84 q 505 198 505 152 q 469 263 505 240 q 347 305 445 280 q 165 363 216 339 q 88 432 114 388 q 62 528 62 476 q 83 618 62 577 q 142 686 105 659 q 218 721 170 707 q 321 736 266 736 q 467 711 404 736 q 560 645 530 687 q 601 534 590 604 l 484 518 q 438 604 476 573 q 330 636 400 636 q 213 608 248 636 q 178 543 178 580 q 192 500 178 519 q 238 467 207 480 q 343 436 256 461 q 520 380 470 402 q 599 316 570 358 q 628 211 628 274 q 593 96 628 150 q 492 13 558 42 q 343 -16 426 -16 q 134 42 206 -16 q 42 215 61 100 "},"?":{"x_min":59.421875,"x_max":688,"bU":756,"o":"m 313 244 q 313 281 313 268 q 332 405 313 352 q 379 484 347 444 q 465 569 403 513 q 546 658 527 625 q 565 731 565 691 q 510 856 565 802 q 377 910 456 910 q 249 861 300 910 q 182 708 198 812 l 59 723 q 158 936 76 862 q 375 1010 240 1010 q 602 931 517 1010 q 688 739 688 851 q 658 619 688 674 q 541 485 628 564 q 464 407 482 432 q 437 350 446 382 q 429 244 429 317 l 313 244 m 306 0 l 306 139 l 442 139 l 442 0 l 306 0 "},"(":{"x_min":82,"x_max":403.671875,"bU":453,"o":"m 317 -292 q 150 6 218 -164 q 82 360 82 177 q 133 669 82 521 q 317 1011 193 840 l 403 1011 q 297 809 323 869 q 233 614 256 716 q 204 359 204 487 q 403 -292 204 33 l 317 -292 "},"V":{"x_min":5.984375,"x_max":897.21875,"bU":908,"o":"m 383 0 l 5 994 l 145 994 l 398 271 q 449 109 429 185 q 502 271 472 190 l 765 994 l 897 994 l 515 0 l 383 0 "},"@":{"x_min":74,"x_max":1332.5625,"bU":1382,"o":"m 771 110 q 675 28 728 59 q 567 -2 621 -2 q 452 33 508 -2 q 361 141 396 68 q 327 302 327 214 q 381 518 327 410 q 515 680 435 626 q 672 735 596 735 q 782 703 730 735 q 873 610 835 672 l 895 714 l 1014 714 l 918 260 q 899 154 899 164 q 912 123 899 136 q 945 110 926 110 q 1037 151 980 110 q 1157 296 1113 205 q 1202 485 1202 388 q 1145 696 1202 598 q 975 854 1088 795 q 726 913 862 913 q 442 838 570 913 q 242 625 313 764 q 172 328 172 487 q 242 42 172 162 q 447 -134 313 -77 q 744 -191 581 -191 q 1036 -132 918 -191 q 1212 13 1154 -72 l 1332 13 q 1216 -132 1298 -58 q 1020 -248 1133 -205 q 746 -292 906 -292 q 474 -253 598 -292 q 262 -137 349 -214 q 129 41 174 -59 q 74 317 74 169 q 140 633 74 483 q 370 914 221 816 q 732 1012 519 1012 q 1028 943 897 1012 q 1235 738 1159 874 q 1300 483 1300 620 q 1164 133 1300 286 q 900 -3 1043 -3 q 826 11 854 -3 q 784 52 797 25 q 771 110 775 69 m 450 294 q 493 149 450 201 q 592 98 536 98 q 670 121 629 98 q 749 188 712 143 q 811 302 787 233 q 835 440 835 370 q 790 583 835 532 q 680 634 745 634 q 600 611 638 634 q 527 541 563 589 q 471 422 492 492 q 450 294 450 352 "},"|":{"x_min":125,"x_max":229,"bU":353,"o":"m 125 -292 l 125 1011 l 229 1011 l 229 -292 l 125 -292 "},"q":{"x_min":48,"x_max":660,"bU":758,"o":"m 540 -276 l 540 76 q 461 10 512 36 q 355 -16 411 -16 q 138 86 229 -16 q 48 366 48 188 q 84 561 48 475 q 191 691 121 647 q 345 736 262 736 q 552 623 476 736 l 552 720 l 660 720 l 660 -276 l 540 -276 m 170 362 q 228 153 170 223 q 365 84 285 84 q 496 150 441 84 q 552 351 552 216 q 493 567 552 494 q 357 640 435 640 q 225 572 279 640 q 170 362 170 505 "},"h":{"x_min":90,"x_max":665,"bU":757,"o":"m 90 0 l 90 994 l 210 994 l 210 637 q 421 736 293 736 q 557 704 499 736 q 640 617 615 672 q 665 456 665 561 l 665 0 l 545 0 l 545 456 q 506 589 545 547 q 396 631 467 631 q 296 602 343 631 q 229 526 249 574 q 210 393 210 478 l 210 0 l 90 0 "},"f":{"x_min":13,"x_max":425.5,"bU":378,"o":"m 119 0 l 119 625 l 13 625 l 13 720 l 119 720 l 119 796 q 131 904 119 869 q 192 981 148 951 q 314 1011 235 1011 q 425 998 364 1011 l 407 892 q 337 899 370 899 q 260 875 283 899 q 238 786 238 851 l 238 720 l 375 720 l 375 625 l 238 625 l 238 0 l 119 0 "},"O":{"x_min":66,"x_max":998,"bU":1059,"o":"m 66 483 q 196 871 66 731 q 532 1011 326 1011 q 775 945 667 1011 q 941 761 884 879 q 998 495 998 644 q 938 224 998 344 q 768 44 878 105 q 532 -17 658 -17 q 286 50 394 -17 q 121 235 177 118 q 66 483 66 353 m 199 482 q 293 199 199 302 q 531 96 388 96 q 770 200 676 96 q 865 496 865 304 q 824 707 865 617 q 707 848 784 798 q 533 898 629 898 q 297 802 396 898 q 199 482 199 706 "},"3":{"x_min":56.78125,"x_max":695,"bU":757,"o":"m 56 262 l 176 278 q 246 128 197 174 q 367 83 296 83 q 509 142 451 83 q 568 290 568 202 q 514 429 568 374 q 377 484 460 484 q 292 470 343 484 l 306 577 q 325 576 317 576 q 462 616 401 576 q 524 741 524 657 q 479 852 524 808 q 364 897 434 897 q 248 852 294 897 q 188 718 201 807 l 68 739 q 168 929 90 862 q 361 997 246 997 q 508 962 441 997 q 611 867 575 927 q 646 739 646 806 q 613 622 646 674 q 512 538 579 569 q 647 453 599 517 q 695 293 695 389 q 601 72 695 163 q 366 -18 508 -18 q 153 60 238 -18 q 56 262 68 138 "},"4":{"x_min":17,"x_max":691,"bU":757,"o":"m 439 0 l 439 238 l 17 238 l 17 350 l 461 994 l 559 994 l 559 350 l 691 350 l 691 238 l 559 238 l 559 0 l 439 0 m 439 350 l 439 798 l 134 350 l 439 350 "},"ö":{"x_min":45,"x_max":706,"bU":757,"o":"m 45 359 q 154 656 45 559 q 375 736 245 736 q 613 638 521 736 q 706 370 706 541 q 665 151 706 231 q 546 28 624 72 q 375 -16 468 -16 q 136 80 227 -16 q 45 359 45 177 m 167 359 q 227 153 167 221 q 375 84 286 84 q 523 153 464 84 q 583 364 583 222 q 523 566 583 497 q 375 635 464 635 q 227 566 286 635 q 167 359 167 498 m 189 861 l 189 1000 l 314 1000 l 314 861 l 189 861 m 437 861 l 437 1000 l 562 1000 l 562 861 l 437 861 "},"β":{"x_min":93,"x_max":721,"bU":783,"o":"m 212 91 l 212 -276 l 93 -276 l 93 682 q 123 861 93 796 q 227 968 153 926 q 391 1011 301 1011 q 594 932 525 1011 q 663 761 663 854 q 607 615 663 670 q 480 546 552 559 q 658 461 595 535 q 721 281 721 388 q 646 75 721 166 q 432 -16 572 -16 q 212 91 289 -16 m 318 586 q 496 629 440 586 q 552 754 552 672 q 504 865 552 821 q 385 910 456 910 q 278 877 323 910 q 222 803 232 844 q 212 661 212 762 l 212 387 q 227 216 212 271 q 296 117 243 161 q 417 73 348 73 q 548 131 500 73 q 597 274 597 189 q 561 401 597 345 q 473 476 525 456 q 335 497 421 497 l 318 497 l 318 586 "},"Ö":{"x_min":66,"x_max":998,"bU":1059,"o":"m 66 483 q 196 871 66 731 q 532 1011 326 1011 q 775 945 667 1011 q 941 761 884 879 q 998 495 998 644 q 938 224 998 344 q 768 44 878 105 q 532 -17 658 -17 q 286 50 394 -17 q 121 235 177 118 q 66 483 66 353 m 199 482 q 293 199 199 302 q 531 96 388 96 q 770 200 676 96 q 865 496 865 304 q 824 707 865 617 q 707 848 784 798 q 533 898 629 898 q 297 802 396 898 q 199 482 199 706 m 343 1054 l 343 1193 l 468 1193 l 468 1054 l 343 1054 m 591 1054 l 591 1193 l 716 1193 l 716 1054 l 591 1054 "},"€":{"x_min": -19.0625,"x_max":735.578125,"bU":757,"o":"m 524 898 q 337 843 412 898 q 255 751 291 810 q 211 634 217 689 l 665 634 l 647 543 l 200 543 q 200 515 200 528 q 200 453 200 463 l 629 453 l 610 362 l 214 362 q 349 142 242 207 q 514 96 425 96 q 709 162 639 96 l 709 22 q 525 -17 625 -17 q 119 237 224 -17 q 82 362 97 289 l -19 362 l 0 453 l 68 453 q 68 515 68 481 q 68 543 68 528 l -19 543 l 0 634 l 76 634 q 291 951 117 854 q 527 1011 398 1011 q 735 955 651 1011 l 709 829 q 524 898 627 898 "},"ü":{"x_min":87,"x_max":659,"bU":757,"o":"m 552 0 l 552 105 q 328 -16 470 -16 q 211 8 265 -16 q 131 69 157 32 q 94 160 105 106 q 87 274 87 196 l 87 720 l 207 720 l 207 320 q 214 192 207 225 q 262 116 225 143 q 352 89 298 89 q 453 117 406 89 q 519 193 500 145 q 539 334 539 242 l 539 720 l 659 720 l 659 0 l 552 0 m 187 861 l 187 1000 l 312 1000 l 312 861 l 187 861 m 435 861 l 435 1000 l 560 1000 l 560 861 l 435 861 "},"Ü":{"x_min":107,"x_max":873,"bU":983,"o":"m 744 993 l 873 993 l 873 419 q 839 181 873 269 q 719 38 806 93 q 492 -17 633 -17 q 268 31 355 -17 q 144 170 181 79 q 107 419 107 261 l 107 993 l 236 993 l 236 420 q 259 229 236 290 q 340 135 283 168 q 481 102 398 102 q 683 167 623 102 q 744 420 744 233 l 744 993 m 302 1054 l 302 1193 l 427 1193 l 427 1054 l 302 1054 m 550 1054 l 550 1193 l 675 1193 l 675 1054 l 550 1054 "},"ä":{"x_min":49,"x_max":698.890625,"bU":757,"o":"m 550 89 q 422 7 483 31 q 290 -16 360 -16 q 111 41 174 -16 q 49 190 49 99 q 72 286 49 242 q 134 356 96 330 q 220 396 172 383 q 326 415 255 406 q 540 457 471 432 q 540 488 540 482 q 506 593 540 563 q 370 635 460 635 q 246 604 286 635 q 186 498 205 574 l 69 514 q 122 638 85 591 q 227 710 158 685 q 387 736 296 736 q 534 714 478 736 q 617 659 591 692 q 655 576 644 626 q 661 464 661 545 l 661 302 q 668 86 661 132 q 698 0 676 41 l 574 0 q 550 89 555 38 m 540 361 q 344 315 475 334 q 240 291 271 304 q 193 251 210 277 q 177 193 177 225 q 213 112 177 144 q 319 80 249 80 q 442 110 388 80 q 521 195 495 141 q 540 316 540 236 l 540 361 m 188 861 l 188 1000 l 313 1000 l 313 861 l 188 861 m 436 861 l 436 1000 l 561 1000 l 561 861 l 436 861 "},"Ä":{"x_min": -1.890625,"x_max":910.109375,"bU":908,"o":"m -1 0 l 372 993 l 511 993 l 910 0 l 763 0 l 649 301 l 242 301 l 135 0 l -1 0 m 279 408 l 609 408 l 507 683 q 438 889 461 808 q 386 699 420 793 l 279 408 m 252 1055 l 252 1194 l 377 1194 l 377 1055 l 252 1055 m 500 1055 l 500 1194 l 625 1194 l 625 1055 l 500 1055 "}},"cssFontWeight":"normal","ascender":1258,"underlinePosition": -217,"cssFontStyle":"normal","boundingBox":{"yMin": -451,"xMin": -904,"yMax":1440,"xMax":1542},"gn":1000,"original_font_information":{"postscript_name":"ArialMT","version_string":"Version 2.82","vendor_url":"http://www.monotype.com/html/mtname/ms_arial.html","full_font_name":"Arial","font_family_name":"Arial","copyright":"Typeface Â© The Monotype Corporation plc. Data Â© The Monotype Corporation plc/Type Solutions Inc. 1990-1992. All Rights Reserved","description":"Contemporary sans serif design, Arial contains more humanist characteristics than many of its predecessors and as such is more in tune with the mood of the last decades of the twentieth century.  The overall treatment of curves is softer and fuller than in most industrial style sans serif faces.  Terminal strokes are cut on the diagonal which helps to give the face a less mechanical appearance.  Arial is an extremely versatile family of typefaces which can be used with equal success for text setting in reports, presentations, magazines etc, and for display use in newspapers, advertising and promotions.","trademark":"ArialÂ® Trademark of The Monotype Corporation plc registered in the US Pat & TM Off. and elsewhere.","designer":"Monotype Type Drawing Office - Robin Nicholas, Patricia Saunders 1982","designer_url":"http://www.monotype.com/html/mtname/ms_welcome.html","unique_font_identifier":"Monotype:Arial Regular:Version 2.82 (Microsoft)","license_url":"http://www.monotype.com/html/type/license.html","license_description":"NOTIFICATION OF LICENSE AGREEMENT\r\n\r\nThis typeface is the property of Monotype Typography and its use by you is covered under the terms of a license agreement. You have obtained this typeface software either directly from Monotype ft together with software distributed by one of Monotype's licensees.\r\n\r\nThis software is a valuable asset of Monotype. Unless you have entered into a specific license agreement granting you additional rights, your use of this software is limited to your workstation for your own publishing use. You may not copy ft distribute this software.\r\n\r\nIf you have any question concerning your rights you should review the license agreement you received with the software ft contact Monotype for a copy of the license agreement.\r\n\r\nMonotype can be contacted at:\r\n\r\nUSA - (847) 718-0400\t\tUK - 01144 01737 765959\r\nhttp://www.monotype.com","manufacturer_name":"Monotype Typography","font_sub_family_name":"Regular"},"descender": -295,"bu":"Arial","lineHeight":1597,"underlineThickness":150});
function Chart(id,instrumentId,exchangeId,quoteSource,allowScroll){if(!ChartCache.ib()){throw '[Chart] charts are not supported';}if(ChartCache.get(id)!==null&&typeof console!='undefined'){console.dL('[Chart] chart with id \''+id+'\' already exists!');}ChartCache.set(id,this);this.k=false;this.be=id;this.aE=instrumentId;this.aD=exchangeId;this.bc=quoteSource;this.H=[250,150];this.B=new ChartStyle();this.ct=null;this.J=[];this.cC=null;this.ed=null;this.ab=null;this.T=null;this.aU=null;this.bj=null;this.bK=null;this.eC=null;this.eU=null;this.bn=false;this.fC=true;this.cc=false;this.bs=null;this.eo=false;this.au=[];this.F=null;this.iD=function(){var e=document.getElementById(id);e.removeChild(this.aU);e.removeChild(this.eU);if(this.bK){e.removeChild(this.bK);}for(var i=0;i<this.au.length;i++){this.au[i].source.release(this.au[i].gw);}var fJ;for(var i=0;i<this.J.length;i++){fJ=document.getElementById(this.be+'_chart_bg_'+i);if(fJ){e.removeChild(fJ);}}};var e=document.getElementById(id);if(!e){throw "[Chart] element with id '"+id+"' does not exist!"}e.innerHTML='';e.style.position='relative';if(typeof e=='undefined'||e===null){return null;}var w=e.offsetWidth,h=e.offsetHeight;if(w&&h){this.H[0]=w;this.H[1]=h;}var c=document.createElement('canvas');c.width=this.H[0];c.height=this.H[1];c.id=id+'aU';c.style.position='absolute';e.appendChild(c);if(typeof G_vmlCanvasManager!=='undefined'){G_vmlCanvasManager.fa(c);}this.bj=c.getContext("2d");this.aU=c;this.bj.font="12px 'arial'";this.aU.style.cursor='pointer';var l=document.createElement('div');l.style.backgroundColor="#dddddd";l.style.backgroundImage="url('"+ChartSource.prototype.cz+"load.gif"+"')";l.style.backgroundRepeat="no-repeat";l.style.backgroundPosition="center center";l.style.opacity=0.4;l.style.filter="alpha(opacity = 40)";l.style.width="100%";l.style.height="100%";l.style.position='absolute';l.style.display='none';e.appendChild(l);this.eU=l;var s=document.createElement('div');s.id=id+'bK';s.style.height='30px';s.style.width='300px';s.style.position='absolute';s.style.top=((this.H[1]/2)-15)+'px';s.style.left=((this.H[0]/2)-150)+'px';s.style.border='1px solid black';s.style.display='none';var bJ=document.createElement('div');bJ.style.position='relative';bJ.style.left='50px';bJ.style.width='50px';bJ.style.height='30px';bJ.style.backgroundColor='black';bJ.style.opacity=0.5;s.appendChild(bJ);e.appendChild(s);this.bK=s;this.eC=bJ;if(allowScroll!==false){c.style.cursor='pointer';var R=this;var f=function(e){R.bB(e);return false;};function ak(e,name,f){if(e.addEventListener){e.addEventListener(name,f,false);}else{e.attachEvent('on'+name,f);}};if(navigator.appVersion.indexOf('iPhone')!= -1){this.k=true;ak(c,'touchmove',f);ak(c,'touchstart',f);ak(c,'touchend',f);ak(s,'touchmove',f);ak(s,'touchstart',f);ak(s,'touchend',f);ak(bJ,'touchmove',f);ak(bJ,'touchstart',f);ak(bJ,'touchend',f);ak(l,'touchmove',f);ak(l,'touchstart',f);ak(l,'touchend',f);}else{ak(c,'contextmenu',f);ak(c,'mousedown',f);ak(c,'mouseup',f);ak(c,'mousemove',f);ak(c,'mouseout',f);ak(c,'mouseover',f);ak(l,'contextmenu',f);ak(l,'mousedown',f);ak(l,'mouseup',f);ak(l,'mousemove',f);ak(l,'mouseout',f);ak(l,'mouseover',f);}if(window.addEventListener){c.addEventListener('DOMMouseScroll',f,false);l.addEventListener('DOMMouseScroll',f,false);}ak(c,'mousewheel',f);ak(l,'mousewheel',f);}this.dr=function(x,y){this.H=[x,y];this.bK.style.top=((this.H[1]/2)-15)+'px';this.bK.style.left=((this.H[0]/2)-150)+'px';this.aU.width=this.H[0];this.aU.height=this.H[1];var e=document.getElementById(id);e.style.width=this.H[0]+'px';e.style.height=this.H[1]+'px';this.setInterval(this.aK());this.V();};this.dn=function(){var y=0;var b=null;for(var i=0;i<this.J.length;i++){b=document.getElementById(this.be+'_chart_bg_'+i);if(b){b.style.height=this.J[i].H+'px';b.style.top=y+'px';}this.J[i].aG=y;y+=this.J[i].H;}if(y!=this.H[1]){this.dr(this.H[0],y);}};this.dm=function(visible,left,right){if(this.F.offset===null){if(visible){var n=((this.F.span[1].index-this.F.span[0].index)+this.F.ai+this.F.ag);var ax=(this.H[0]-this.B.offset)/n;this.F.ag=Math.ceil(this.B.offset/ax);}else{this.F.ag=0;}this.F.ai=0;this.F.offset=0;}else{if(this.F.ag!=0&&right){this.F.ag=0;}if(this.F.ai!=0&&left){this.F.ai=0;}}};this.dp=function(mode){var eZ=this.eo;this.eo=mode;if(eZ!=mode){this.V();}};this.bQ=function(cursor){if(cursor==''){cursor='pointer';}this.aU.style.cursor=cursor;};this.gx=function(du,load){if(typeof load=='undefined'){load=true;}var w=(this.F.span[1].index-this.F.span[0].index)+this.F.ai+this.F.ag;w/=2;w=w|0;var begin=bz(du,-w);var end=bz(du,w);var ai=w-(du.index-begin.index);var ag=w-(end.index-du.index);if(load&&ai>0){this.bx(true);var z=this.aa<=ESpans.DAY?ESpans.DAY:ESpans.MONTH;this.F.source.requestData(begin.timestamp-z,end.timestamp+z,this.aa,function(){R.bx(false);R.gx(du,false);});return;}this.F.span=[begin,end];this.F.ai=ai;this.F.ag=ag;this.cx();for(var i=0;i<this.J.length;i++){this.J[i].bi();}this.V();};this.gE=function(begin,end){if(!begin|| !end||end.index<=begin.index){return;}var fi=this.F.span;var ft=this.F.ag/(this.F.span[1].index-this.F.span[0].index);this.F.span=[begin,end];this.setInterval(this.aK());this.dm(!this.F.span[1].next,begin!=fi[0],end!=fi[1]);if(!end.next&&fi[1]==end){this.F.ag=ft*(this.F.span[1].index-this.F.span[0].index);}this.cx();for(var i=0;i<this.J.length;i++){this.J[i].bi();}this.V();};this.aK=function(span){if(typeof span=='undefined'){if(this.bn|| !this.F.span){return this.aa;}span=((this.F.span[1].index-this.F.span[0].index)+this.F.ai+this.F.ag)*this.aa;}var am=[ESpans.MONTH,ESpans.WEEK,ESpans.DAY,ESpans.HOUR,ESpans.THIRTY_MINUTES,ESpans.FIFTEEN_MINUTES,ESpans.FIVE_MINUTES,ESpans.MINUTE];var w=this.B.pointSpacing+1;for(var c=0;c<this.J.length;c++){if(this.J[c].aI=='candle'||this.J[c].aI=='ohlc'){w=this.B.candleSpacing+6;break;}}var n=0;for(var i=am.length;i>=0;i--){n=span/am[i];if(this.H[0]/n>=w){return am[i];}}return ESpans.MONTH;};this.dY=function(source){if(!this.F.span){return;}if(typeof source!=='undefined'){if(!source.span|| !source.G){return;}var value=source.G.findTimestamp(this.ct);if(value){source.relative=value.close;}else{source.relative=1;}return;}for(var j=0;j<this.au.length;j++){source=this.au[j];this.dY(source);}};this.cx=function(){if(!this.F.span){return;}var begin=this.F.span[0];var end=this.F.span[1];var i=this.F.G.L;var R=this;var source=null,cE=false;for(var j=0;j<this.au.length;j++){source=this.au[j];if(source==this.F){continue;}var s=source;var f=function(a,b,c,l){if(!s.G||s.G.L!=c){s.G=s.source.getBuffer(c);}if(s.G){s.span=s.G.findSpan(begin.timestamp,end.timestamp);R.dY(s);}else{s.span=null;s.relative=1;}if(l){for(var i=0;i<R.J.length;i++){R.J[i].bi();}R.V();}};cE=source.source.requestData(begin.timestamp,end.timestamp,i,f,true);}};this.iS=function(source){for(var i=0;i<this.au.length;i++){if(this.au[i]==source){this.au[i].source.release(this.au[i].gw);this.au.splice(i,1);return;}}};this.fh=function(instrumentId,exchangeId,quoteSource){if(instrumentId instanceof ChartSource){hm=instrumentId;}else{for(var i=0;i<this.au.length;i++){if(this.au[i].instrumentId==instrumentId&&this.au[i].exchangeId==exchangeId&&this.au[i].quoteSource==quoteSource){return this.au[i];}}hm=ChartSourceCache.get(instrumentId,exchangeId,quoteSource);}var R=this;var f=function(cP){R.dJ(cP);};var source={};source.source=hm;source.G=null;source.span=null;source.gw=f;source.offset=0;source.ai=0;source.ag=0;source.relative=0;source.source.acquire(f);this.au.push(source);if(this.F){this.cx();}return source;};this.gB=function(){return this.bj;};this.ec=function(){return this.bn;};this.bx=function(mode){if(mode){this.bn=true;this.eU.style.display='block';}else{this.bn=false;this.eU.style.display='none';}};this.setSource=function(source){if(this.bn||source==this.F.source){return;}this.aE=source.aE;this.aD=source.aD;this.bc=source.bc;var setSpan=false,start,end,L;if(this.F&&this.F.span){setSpan=true;start=this.F.span[0].timestamp;end=this.F.span[1].timestamp;L=this.aa;if(L<ESpans.DAY) { var aA=((new Date()).getTime())/1000;if(!this.F.span[0].prev|| !this.F.span[0].prev.prev){start=Math.floor(aA/ESpans.DAY)*ESpans.DAY}if(!this.F.span[1].next){end=aA;}}}this.iS(this.F);this.F=null;this.F=this.fh(source);for(var i=0;i<this.J.length;i++){this.J[i].I=this.F;this.J[i].gy();}if(setSpan){this.setSpan(start,end,L);}};this.setInstrument=function(instrumentId,exchangeId,quoteSource){this.aE=instrumentId;this.aD=exchangeId;this.bc=quoteSource;this.setSource(ChartSourceCache.get(instrumentId,exchangeId,quoteSource));};this.getSource=function(){return this.F.source;};this.setLocked=function(aq){if(this.bs){this.bQ('pointer');}this.cc=aq;};this.isLocked=function(){return this.cc;};this.setLink=function(link){if(this.cc){this.bQ('pointer');}this.bs=link;};this.getLink=function(){return this.bs;};this.setSize=function(x,y){var s=y/this.H[1];var y=0;for(var i=0;i<this.J.length;i++){this.J[i].H*=s;}this.dr(x,y);this.dn();for(var i=0;i<this.J.length;i++){this.J[i]._updateStyle();}this.V();};this.setStyle=function(style){this.B=style;this.eC.style.backgroundColor=style.sliderColor;this.bK.style.border='1px solid '+style.sliderColor;for(var i=0;i<this.J.length;i++){this.J[i]._updateStyle();}this.V();};this.zoom=function(l,r,load){if(this.bn|| !this.F.span){return;}if(typeof load=='undefined'){load=true;}var begin=this.F.span[0];var end=this.F.span[1];var prev=bz(begin,l);if(load&&l<0&&(prev.index-begin.index)>l){this.bx(true);var z=this.aa<=ESpans.DAY?ESpans.DAY:ESpans.MONTH;this.F.source.requestData(begin.timestamp-z,end.timestamp+z,this.aa,function(){R.bx(false);R.zoom(l,r,false);});return;}if(l<0){if(!begin.prev&& !end.next&&this.F.G.L<ESpans.DAY){this.setSpanSimple(ESpans.MONTH);return;}}else if(l>0){if(!end.next&&end.index-begin.index<=2&&this.F.G.L>=ESpans.DAY){this.setSpanSimple(ESpans.DAY);return;}}if(this.F.ag>0&&r<0){this.F.ag+=r;if(this.F.ag<0){r=this.F.ag;this.F.ag=0;}else{r=0;}}if(this.F.ai>0&&l>0){this.F.ai-=l;if(this.F.ai<0){l= -this.F.ai;this.F.ai=0;}else{l=0;}}begin=bz(begin,l);end=bz(end,r);if(begin.index<end.index){var ft=this.F.ag/(this.F.span[1].index-this.F.span[0].index);var dF=begin.index-this.F.span[0].index;var dB=end.index-this.F.span[1].index;this.F.ai-=l-dF;this.F.ag+=r-dB;this.F.span=[begin,end];this.setInterval(this.aK());this.cx();this.dm(!this.F.span[1].next,dF!=0,dB!=0);if(r==0){this.F.ag=ft*(this.F.span[1].index-this.F.span[0].index);}for(var i=0;i<this.J.length;i++){this.J[i].bi();}this.V();}};this.scroll=function(s,load){if(this.bn|| !this.F.span){return;}if(typeof load=='undefined'){var eZ=this.F.offset;this.F.offset+=s;if(((eZ+s)|0)==(eZ|0)){this.V();return;}load=true;}s=(this.F.offset|0);if(s!=0){var l=s,r=s;if(this.F.ag>0&&s<0){this.F.ag+=s;if(this.F.ag<0){r=this.F.ag;this.F.ag=0;}else{r=0;}}if(this.F.ai>0&&s>0){this.F.ai-=s;if(this.F.ai<0){l= -this.F.ai;this.F.ai=0;}else{l=0;}}var begin=bz(this.F.span[0],l);var end=bz(this.F.span[1],r);if(load&&((s<0&& !begin.prev)||(s>0&& !end.next))){var R=this;this.bx(true);var cE=this.F.source.requestData(begin.timestamp+s*this.aa,end.timestamp+s*this.aa,this.aa,function(s,e,i,l){R.bx(false);if(l){R.scroll(s,false);}});if(cE){return;}else{this.bx(false);}}var dF=begin.index-this.F.span[0].index;var dB=end.index-this.F.span[1].index;this.F.ai-=l-dF;this.F.ag+=r-dB;if(l!=0||r!=0){this.F.offset-=s;this.F.span=[begin,end];this.cx();this.dm(!this.F.span[1].next,dF!=0,dB!=0);for(var i=0;i<this.J.length;i++){this.J[i].bi();}}}this.V();};this.setReferenceSpan=function(span){if(span<this.aa){return;}this.ct=((new Date()).getTime()/1000)-span;this.dY();for(var i=0;i<this.J.length;i++){this.J[i].bi();}this.V();};this.setSpanSimple=function(span,L,offset){var aA=((new Date()).getTime()/1000)|0;var end=Math.ceil(aA/ESpans.DAY)*ESpans.DAY;var start=Math.ceil((aA-span)/ESpans.DAY)*ESpans.DAY+1;this.setSpan(start,end,L,offset);};this.setInterval=function(i){if(this.bn||i==this.aa){return;}var G=this.F.G;var begin=this.F.span[0],end=this.F.span[1];var n=end.index-begin.index;if(i>this.aa){do{G=G.parent;begin=begin.parent;end=end.parent;}while(end&&begin&&G&&G.L!=i);}else{do{G=G.bH;begin=begin.begin;end=end.end;}while(end&&begin&&G&&G.L!=i);}if(end&&begin&&G&&begin.index<end.index){if((i<=ESpans.DAY&&this.aa>=ESpans.DAY)||(i>=ESpans.DAY&&this.aa<=ESpans.DAY)){this.F.offset=null;}else{var f=(end.index-begin.index)/n;if(this.F.offset){this.F.offset*=f;}if(this.F.ag){this.F.ag*=f;}if(this.F.ai){this.F.ai*=f;}}this.aa=i;this.F.G=G;this.F.span=[begin,end];this.cx();this.dm(!this.F.span[1].next,false,false);for(var i=0;i<this.J.length;i++){this.J[i].bi();}this.V();}};this.setSpan=function(start,end,L,offset){if(this.ec()){return;}if(end<start){throw "invalid bO specified!";}var aC=L;if(typeof L=='undefined'||L===null){aC=this.aK(end-start);}this.aa=aC;offset=typeof offset!="undefined"?offset:null;this.F.offset=offset;this.F.ai=0;this.F.ag=0;this.bx(true);this.ed=[start,end];var R=this;if(aC<ESpans.DAY){var span=this.F.source.getAvailableSpan();if(span&&start>span[1]&&span[1]-span[0]>0){start=Math.floor(span[1]/ESpans.DAY)*ESpans.DAY;}}this.F.source.requestData(start,end,aC,function(s,e,i){R.fm(s,e,i);});};this.fl=false;this.hD=function(){var c=this.bj;c.clearRect(0,0,this.H[0],this.H[1]);for(var i=0;i<this.J.length;i++){this.J[i].bl(this.eo);}this.fl=false;};this.V=function(){if(this.fl||this.ba.length>0){return;}this.fl=true;setTimeout('ChartCache.get(\''+this.be+'\').hD()',0);};this.gF=function(h,y,isNavBar){var jx=false;var e=document.getElementById(this.be);var b=document.createElement('div');b.id=this.be+'_chart_bg_'+(this.J.length-1);if(!isNavBar){if(this.B.backgroundColor){b.style.backgroundColor=this.B.backgroundColor;}if(this.J[this.J.length-1].dk&&this.B.backgroundImage){b.style.backgroundImage="url('"+this.B.backgroundImage+"')";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition="center center";}}else{if(this.B.navBarBackgroundColor){b.style.backgroundColor=this.B.navBarBackgroundColor;}}b.style.zIndex=0;b.style.width='100%';b.style.height=h+'px';b.style.position='absolute';b.style.left='0px';b.style.top=y+'px';e.insertBefore(b,e.firstChild)};this.addNavBar=function(h){var y=0;for(var i=0;i<this.J.length;i++){y+=this.J[i].H;}var w=this.H[0];if(typeof h!='number'){if(this.J.length==0&&this.H[1]>0){h=this.H[1];}else{h=100;}}var chart=new NavBar(this,this.F);chart.H=h;chart.aG=y;this.J.push(chart);this.gF(h,y,true);this.dn();this.V();return chart;};this.addVolumeChart=function(h){var chart=this.addChart(h,false);chart.setType('line');chart.showData(3);chart.showLabels(false,true);chart.showMarkers(false);chart.showInformation(false);chart.showCursor(false);return chart;};this.addIndicatorChart=function(h){var chart=this.addChart(h);chart.showData(2);chart.showLabels(false,true);chart.showCurrentValue(false);chart.showInformation(false);chart.showCursor(false);return chart;};this.addChart=function(h,showBackgroundImage){var y=0;for(var i=0;i<this.J.length;i++){y+=this.J[i].H;}var w=this.H[0];if(typeof h!='number'){if(this.J.length==0&&this.H[1]>0){h=this.H[1];}else{h=100;}}var chart=new fG(this,this.F);chart.H=h;chart.aG=y;chart.dk=typeof showBackgroundImage=='undefined'||showBackgroundImage?true:false;if(this.B.yAxisMargins[0]+this.B.yAxisMargins[1]>h*0.5){var m=this.B.yLabelFontSize/2;if(h*0.5<m*2){m=0;}chart.setYAxisMargins(m,m);}chart.setType(this.B.hh);this.J.push(chart);this.gF(h,y);this.dn();this.V();return chart;};this.removeChart=function(index){if(index<0||index>=this.J.length){return;}var b=document.getElementById(this.be+'_chart_bg_'+index);if(b){var e=document.getElementById(this.be).removeChild(b);}this.J.splice(index,1);for(var i=index;i<this.J.length;i++){b=document.getElementById(this.be+'_chart_bg_'+(i+1));if(b){b.id=this.be+'_chart_bg_'+i;}}this.dn();this.V();};this.moveChart=function(index,bm){if(index<0||bm<0||index>=this.J.length||bm>=this.J.length){return;}var b=document.getElementById(this.be+'_chart_bg_'+index);var hd=document.getElementById(this.be+'_chart_bg_'+bm);hd.id=this.be+'_chart_bg_temp';b.id=this.be+'_chart_bg_'+bm;hd.id=this.be+'_chart_bg_'+index;var dK=this.J[index];this.J[index]=this.J[bm];this.J[bm]=dK;this.dn();this.V();};this.getNumCharts=function(){return this.J.length;};this.getChart=function(i){if(i<0||i>=this.J.length){return null;}return this.J[i];};this.saveImage=function(hk){if(this.ec()){return;}this.bx(true);var aN=null;if(typeof XMLHttpRequest!='undefined'){aN=new XMLHttpRequest();}else if(window.ActiveXObject){if(navigator.userAgent.toLowerCase().indexOf("msie 5")!= -1){aN=new ActiveXObject("Microsoft.XMLHTTP");}else{aN=new ActiveXObject("Msxml2.XMLHTTP");}}var data=this.aU.toDataURL('image/png');aN.open("POST",ChartSource.prototype.cz+'download.php',true);var R=this;aN.onreadystatechange=function(){if(aN.readyState==4){if(hk){hk(ChartSource.prototype.cz+'download.php?id='+aN.responseText);}R.bx(false);}};var color,image;var dG='{';dG+='"data": "'+data+'", "charts": [';for(var i=0;i<this.J.length;i++){if(i!=0){dG+=',';}if(this.J[i]instanceof NavBar){color=this.B.navBarBackgroundColor!==null?this.B.navBarBackgroundColor:'';image='';}else{color=this.B.backgroundColor!==null?this.B.backgroundColor:'';image=this.J[i].dk&&this.B.backgroundImage!==null?this.B.backgroundImage:'';}dG+='{"position":'+this.J[i].aG+', "size":'+this.J[i].H+', "backgroundColor":"'+color+'", "backgroundImage":"'+image+'"}';}dG+=']}';aN.send(dG);};this.dJ=function(cP){if(!this.F|| !this.F.span){if(!this.bn){var G=this.F.source.getBuffer(60);this.F.span=[G.begin,G.end];this.F.G=G;}else{return;}}if(cP&&this.F.span[1].next==this.F.G.end){this.F.span[1]=this.F.span[1].next;}this.dm(!this.F.span[1].next,false,false);for(var i=0;i<this.J.length;i++){this.J[i].bi();}this.V();};this.fm=function(start,end,L){if(start===false||end===false||L===false||end-start==0){this.bx(false);if(L!==false&&this.aa<ESpans.DAY){var span=this.F.source.getAvailableSpan();if(span[1]-span[0]>0){var start=Math.floor(span[1]/ESpans.DAY)*ESpans.DAY;this.setSpan(start,start+ESpans.DAY);}else{var b=this.F.source.getBuffer(ESpans.DAY);if(!b||b.size==1){this.setSpanSimple(ESpans.WEEK);}}}else{this.V();}return;}L=L<ESpans.DAY?60:ESpans.DAY;var G=this.F.source.getBuffer(L);var cH=G.findSpan(start,end);var aC=this.aK(((cH[1].index-cH[0].index)+1)*L);if(aC<ESpans.DAY&&L>=ESpans.DAY){var G=this.F.source.getBuffer(aC);if(G&&G.begin&&G.begin.timestamp<=cH[0].timestamp){L=aC;}}else{L=aC;}this.F.G=this.F.source.getBuffer(L);this.F.span=this.F.G.findSpan(start,end);if(this.ct===null||this.ct<=L){var dD=this.F.source.getPreviousClose();if((this.ed[1]-this.ed[0])==ESpans.DAY&&dD){this.ct=dD.timestamp;}else{this.ct=start;}this.dY();}else{this.dY(this.F);}this.aa=L;this.setInterval(this.aK());this.cx();this.dm(!this.F.span[1].next,true,true);for(var i=0;i<this.J.length;i++){this.J[i].bi();}this.bx(false);this.V();};this.gX=function(){var w=this.bK.offsetWidth;this.eC.style.width=(((this.F.span[1].index-this.F.span[0].index)/this.F.G.size)*w)+'px';this.eC.style.left=((this.F.span[0].index/this.F.G.size)*w)+'px';};this.ba=[];this.bB=function(e){if(this.cc){var button=e.which?e.which:e.button;if(e.type=='mousedown'&&button==1&&this.bs){document.location=this.bs;}if(e.type!='mousemove'&&e.type!='mouseout'&&e.type!='mouseover'){return;}}var dM=false;if(e.type.indexOf('touch')!= -1){switch(e.type){case 'touchstart':if(this.ba.length==0){this.bK.style.display='block';this.gX();}var s=null;for(var i=0;i<e.changedTouches.length;i++){s={id:e.changedTouches[i].identifier,x:e.changedTouches[i].pageX,y:e.changedTouches[i].pageY,cJ:0,ew:0};this.ba.push(s);}break;case 'touchend':if(this.ba.length>0){for(var j=0;j<e.changedTouches.length;j++){for(var i=0;i<this.ba.length;i++){if(this.ba[i].id==e.changedTouches[j].identifier){this.ba.splice(i,i+1);break;}}}if(this.ba.length==0){this.bK.style.display='none';this.V();}}break;case 'touchmove':var n=((this.F.span[1].index-this.F.span[0].index)+this.F.ai+this.F.ag);var ax=this.H[0]/n;var t=null;for(var j=0;j<e.changedTouches.length;j++){for(var i=0;i<this.ba.length;i++){t=this.ba[i];if(t.id==e.changedTouches[j].identifier){t.cJ+=e.changedTouches[j].pageX-t.x;t.ew+=e.changedTouches[j].pageY-t.y;t.x=e.changedTouches[j].pageX;t.y=e.changedTouches[j].pageY;}}}if(this.ba.length==2){var left=this.ba[0];var right=this.ba[1];if(left.x>right.x){var hz=right;right=left;left=hz;}this.zoom(-(left.cJ/ax),-(right.cJ/ax));left.cJ=0;left.ew=0;right.cJ=0;right.ew=0;}else if(this.ba.length==1){var touch=this.ba[0];this.scroll(-(touch.cJ/ax));touch.cJ=0;touch.ew=0;}this.gX();break;}}else if(!this.k){var layerX,layerY;if(e.layerX&&e.layerY){layerX=e.layerX;layerY=e.layerY;}else{layerX=e.offsetX;layerY=e.offsetY;}if(e.type=='mouseover'){return;}else if(e.type=='mouseout'){if(this.ec()){return;}if(this.cC!==null){this.J[this.cC].bB({type:'mouseout',pageX:e.pageX,pageY:e.pageY,layerX:e.layerX,layerY:e.layerY});}this.cC=null;if(e.target==this.aU){this.fC=true;this.bQ('default');}return;}if(this.fC){if(e.type=='mousemove'){this.bQ('');this.fC=false;}else{return;}}var p,s;for(var i=0;i<this.J.length;i++){p=this.J[i].aG;s=this.J[i].H;if(layerY>=p&&layerY<=p+s){dM=i;break;}}if(dM!==this.cC){if(this.cC!==null){this.J[this.cC].bB({type:'mouseout'},e.which?e.which:e.button,layerX,layerY);}this.J[dM].bB({type:'mouseover'},e.which?e.which:e.button,layerX,layerY);this.cC=dM;}if(dM!==false){this.J[dM].bB(e,e.which?e.which:e.button,layerX,layerY);}}e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}if(e.preventDefault){e.preventDefault();}e.returnValue=false;return false;};this.F=this.fh(instrumentId,exchangeId,quoteSource);this.bQ('default');};
function pc(v){return(v|0)+0.5;};function bz(o,n){if(n>0){for(var i=0;i<n;i++){if(!o.next){break;}o=o.next;}}else{for(var i=n;i<0;i++){if(!o.prev){break;}o=o.prev;}}return o;};function dT(number,iz,gV,gp){var n=number,cA=iz;n= !isFinite(+n)?0: +n;cA= !isFinite(+cA)?0:Math.abs(cA);var iM=(typeof gp=="undefined")?',':gp;var gR=(typeof gV=="undefined")?'.':gV;var s=(cA>0)?n.toFixed(cA):Math.round(n).toFixed(cA);var abs=Math.abs(n).toFixed(cA);var _,i;if(abs>=1000){_=abs.split(/\D/);i=_[0].length%3||3;_[0]=s.slice(0,i+(n<0))+_[0].slice(i).replace(/(\d{3})/g,iM+'$1');s=_.join(gR);}else{s=s.replace('.',gR);}return s;};function fG(set,source,allowScroll){this._gradient=null;this.C=set;this.aI='candle';this._content=1;this.fe=set.B.showMarkers;this.fd=set.B.showInformation;this.eq=set.B.showXLabels;this.ee=set.B.showYLabels;this.dQ=set.B.showCursor;this.dk=true;this.cR=null;this.bj=set.gB();this.I=source;this.at=0;this.bW=null;this.bC=null;this.fp=0;this.bd=(source.G&&source.G.end)?source.G.end.close:0;this.H=200;this.bP=[set.B.yAxisMargins[0],set.B.yAxisMargins[1]];this.dV=null;this.aG=50;this.av=[0,0];this.cN=2;this.ao=[];this.ac=[];this.aB=[];this.ea=null;this.eb=null;this.eV=[null,null,null,null];this.bo=null;this.gJ=null;this.setYAxisMargins=function(bottom,top){this.bP=[bottom,top];};this.setHeight=function(h){this.H=h;this.C.dn();};this.setType=function(type){if(!(type=='candle'||type=='mountain'||type=='line'||type=='ohlc')){return;}if(type==this.aI){return;}this.aI=type;var i=this.C.aK();if(i!=this.C.aa){this.C.setInterval(i);}else{this.V();}};this.showCursor=function(aq){this.dQ=aq;this.bo=null;this.V();};this.showMarkers=function(aq){this.fe=aq;this.V();};this.showInformation=function(aq){this.fd=aq;this.V();};this.showLabels=function(x,y){this.eq=x;this.ee=y;this.V();};this.showData=function(aq){if(aq===true){this._content=1;}else if(typeof aq=='number'){this._content=aq;}else{this._content=2;}this.eB();this.V();};this.addBenchmark=function(instrumentId,exchangeId,quoteSource){if(this.eb){this.eb=null;}var source=this.C.fh(instrumentId,exchangeId,quoteSource);this.ao.push(source);this.bi();};this.removeBenchmark=function(index){if(index<0||index>=this.ao.length){return;}this.ao.splice(index,1);this.bi();};this.getNumBenchmarks=function(){return this.ao.length;};this.addTool=function(cB){if(this.ao.length>0){return;}this.eb=cB;};this.iu=function(x,y){console.log(x,y);var t=this.gg(x);var v=this.gf(y);var cB=new ToolLine(t,v);for(var i=0;i<cB.aS.length;i++){this.gS(cB.aS[i]);}this.aB.push(cB);return cB.aS[0];};this.removeTool=function(i){if(i<0||i>=this.aB.length){return;}this.aB.splice(i,1);this.V();};this.getNumTools=function(){return this.aB.length;};this.getTool=function(){if(i<0||i>=this.aB.length){return null;}return this.aB[i];};this.getNumIndicators=function(){return this.ac.length;};this.getIndicator=function(i){if(i<0||i>=this.ac.length){return null;}return this.ac[i];};this.getIndicatorColor=function(i){if(i<0){return '';}return this.C.B.indicatorColor[i<this.C.B.indicatorColor.length?i:0];};this.addIndicator=function(type,U,aZ,aV){var object=this.I.source.addIndicator(type,U,aZ,aV);if(!object){return;}for(var j=0;j<this.ac.length;j++){if(this.ac[j]==object){this.I.source.removeIndicator(object);return;}}this.ac.push(object);this.eB();this.V();};this.removeIndicator=function(index){if(index<0||index>=this.ac.length){return;}this.I.source.removeIndicator(this.ac[index]);this.ac.splice(index,1);this.V();};this.isEndVisible=function(end){if(!this.I.G|| !this.I.span){return false;}if(typeof end=='undefined'){return this.I.span[1]&& !this.I.span[1].next;}if(this.I){return bR(end,this.I.G.L)>=bR(this.I.getBuffer(this.I.G.L).getLastTimestamp(),this.I.G.L);}return false;};this._updateStyle=function(){var bp=this.C.H[0];if(this.isEndVisible()){bp=this.aj(this.I.span[1].index-this.I.span[0].index);}this.fe=this.C.B.showMarkers;this.fd=this.C.B.showInformation;this.eq=this.C.B.showXLabels;this.ee=this.C.B.showYLabels;this.dQ=this.C.B.showCursor;if(typeof this.C.B.mountainColor=='string'){this._gradient=this.C.B.mountainColor;}else{this._gradient=this.bj.createLinearGradient(0,this.C.H[0]/2,bp,this.H/2);this._gradient.addColorStop(0,this.C.B.mountainColor[0]);this._gradient.addColorStop(1,this.C.B.mountainColor[1]);}};this.dZ=function(){if(!this.I.span){return;}var cK=this.I.G.end.close;if(!this.bd||cK==this.bd){this.at=0;}else if(cK>this.bd){this.at=1;}else if(cK<this.bd){this.at= -1;}if(this.at!=0){if(this.bW!==null){clearTimeout(this.bW);}var R=this;this.bW=setTimeout(function(){R.dZ();R.V();},(this.iH=='candle'||this.iH=='ohlc')?1000:1500);this.fp=0;if(this.bC===null){this.bC=setInterval(function(){R.fp+=1;R.V();},150);}}else{clearInterval(this.bC);this.bC=null;}this.bd=cK;};this.gy=function(){this.cR=null;this.bd=null;if(this.bW!==null){clearTimeout(this.bW);}if(this.bC!==null){clearInterval(this.bC);}if(this.I.span){this.bi();}};this.bi=function(){if(this.bo){var er=this.gD(this.gJ);this.bo=er;}this.dV=this.bX();this.iv();this.eB();this.dZ();if(this.ao.length==0){var h=null;for(var i=0;i<this.aB.length;i++){for(var j=0;j<this.aB[i].aS.length;j++){this.gS(this.aB[i].aS[j]);}}}return true;};this.df=function(){return[this.C.H[0],this.H];};this.hZ=function(h,x,y){h.index=this.I.span[0].index+this.fk(x);h.timestamp=this.gg(x);h.value=this.gf(y);};this.gS=function(h){h.index=this.hG(h.timestamp);};this.gf=function(y){y-=this.bP[1];var height=this.df()[1]-this.bP[0]-this.bP[1];return(1-(y/height))*(this.av[1]-this.av[0])+this.av[0];};this.hG=function(t){var A=this.I.G.begin;while(A){if(A.timestamp>=t){return A.index;}A=A.next;}return 0;};this.fk=function(x){var n=(this.I.span[1].index-this.I.span[0].index)+1+this.I.ai+this.I.ag;var o= -this.dV*(this.I.offset-this.I.ai);var step=this.C.H[0]/(n-1);return Math.round((x-o)/step);};this.gD=function(x){if(!this.I|| !this.I.span){return null;}var i=this.fk(x)+this.I.span[0].index;var A=this.I.span[0];while(A){if(A.index==i){return A;}A=A.next;}return null;};this.gg=function(x){var i=this.fk(x)+this.I.span[0].index;var A=this.I.span[0];while(A){if(A.index==i){return A.timestamp;}A=A.next;}return 0;};this.bX=function(i){if(!this.I|| !this.I.span){return 1;}var n=(this.I.span[1].index-this.I.span[0].index)+1+this.I.ai+this.I.ag;if(n==1){return this.C.H[0];}var step=this.C.H[0]/(n-1);if(typeof i!="number"){return step;}return((step*(i+1))|0)-((step*(i))|0);};this.aj=function(value){if(!this.I|| !this.I.span){return 1;}var n=(this.I.span[1].index-this.I.span[0].index)+1+this.I.ai+this.I.ag;var o= -this.dV*this.I.offset;o+=this.dV*this.I.ai;var step=(this.C.H[0]-2)/(n-1);return 1+((value*step)|0)+(o|0)+0.5;};this.ae=function(value){var height=this.H-this.bP[0]-this.bP[1];return this.bP[1]+(((1-((value-this.av[0])/(this.av[1]-this.av[0])))*height)|0)+0.5;};this.eB=function(){if(this.I.G===null){return;}var s=this.I.span[0];var e=this.I.span[1];if(s.prev){s=s.prev;};if(e.next){e=e.next;};var A=s;var low=1E+18;var high=0;var i;if(this._content==3){low=0;}var indicators=[];for(var index in this.ac){for(var bm in this.ac[index].id){indicators.push(this.ac[index].id[bm]);}}if(this.ao.length>0){var v=0;if(this._content==1){do{v=(A.close/this.I.relative)*100;if(v<low){low=v;}if(v>high){high=v;}A=A.next;}while(A&&A!=e.next);}for(var i=0;i<this.ao.length;i++){if(!this.ao[i].span){continue;}A=this.ao[i].span[0];e=this.ao[i].span[1];do{v=(A.close/this.ao[i].relative)*100;if(v<low){low=v;}if(v>high){high=v;}A=A.next;}while(A&&A!=e.next);}}else{do{if(this._content==1){if(A.low<low){low=A.low;}if(A.high>high){high=A.high;}}else if(this._content==3){if(A.volume<low){low=A.volume;}if(A.volume>high){high=A.volume;}}for(i in indicators){if(A.indicator[i]===null){continue;}if(A.indicator[i]<low){low=A.indicator[i];}if(A.indicator[i]>high){high=A.indicator[i];}}A=A.next;}while(A&&A!=e.next);}var bO=(high-low)*0.1;if(bO==0){bO=low*0.1;}if(low-bO<0){this.av[0]=0;}else{this.av[0]=low-bO;}this.av[1]=high+bO;};this.iv=function(){if(!this.I|| !this.I.G|| !this.I.G.begin){this.cN=2;return;}var s=this.I.G.begin.close.toString();var p=s.indexOf('.');if(p== -1){p=2;}else{p=(s.length-s.indexOf('.')-1);}if(p>4){p=4;}else if(p<2){p=2;}this.cN=p;};this.V=function(){this.C.V();};this.bl=function(isMoving){var c=this.bj;c.save();c.beginPath();c.rect(0,this.aG,this.C.H[0],this.H);c.clip();c.translate(0,this.aG);var x=0,y=0;var eG=this.df();var da=(this.av[1]-this.av[0]);var s,af,e,ah;if(this.I.G===null|| !this.I.span){s=af=e=ah=null;}else{s=af=this.I.span[0];e=ah=this.I.span[1];while(af&&this.aj(af.index-s.index)<0){af=af.next;}while(ah&&this.aj(ah.index-s.index)>this.C.H[0]){ah=ah.prev;}if(af&&af.prev){af=af.prev;};if(ah&&ah.next){ah=ah.next;};}var eK=this.av[0],jv=this.av[1];var v=0,l=null;var xLabelStep=0;if(!af|| !ah){c.textAlign='center';c.textBaseline='middle';c.font=this.C.B.infoLabelFontStyle+' '+this.C.B.infoLabelFontSize+'px \''+this.C.B.infoLabelFontFamily+'\'';c.fillStyle=this.C.B.infoLabelColor;c.strokeStyle=this.C.B.infoLabelColor;c.fillText(this.C.ec()?'Daten werden geladen':'Keine Daten gefunden',this.C.H[0]/2,this.H/2+50);c.restore();return;}else{var n=0,span=(ah.index-af.index)*this.I.G.L,size=this.df()[0]-(this.I.ai+this.I.offset+this.I.ag)*ax;if(this.I.G.L<86400){n=span/ESpans.HOUR;}else if(this.I.G.L<ESpans.WEEK){n=span/ESpans.WEEK;}else{n=span/ESpans.MONTH;}n=Math.ceil(n);if(n>=1){xLabelStep=1;var io=(this.C.B.xLabelFontSize+this.C.B.labelSpacing);var fit=(this.C.H[0]-this.C.B.xAxisMargins[0]-this.C.B.xAxisMargins[1])/io;xLabelStep=Math.ceil(n/fit);if(xLabelStep<1){xLabelStep=1;}}if(this.C.B.showVGrid&&xLabelStep>0){c.strokeStyle=this.C.B.vGridColor;var A=af;while(A&&A!=ah.next){if(!A.label||(A.labelIndex%xLabelStep!=0)){A=A.next;continue;}x=this.aj(A.index-s.index);c.beginPath();c.moveTo(x,1.5);c.lineTo(x,this.H-1.5);c.stroke();A=A.next;}}var height=this.df()[1]-this.bP[0]-this.bP[1];var yLabels=Math.floor(Math.min(height/(this.C.B.yLabelFontSize+this.C.B.labelSpacing),5));if(yLabels<2&&height/this.C.B.yLabelFontSize>=2){yLabels=2;}var step=da/(yLabels-1);if(da>0&&this.C.B.showHGrid){c.strokeStyle=this.C.B.hGridColor;x=this.C.H[0]-1;v=this.av[0];for(var i=0;i<yLabels;i++){y=this.ae(v);c.beginPath();c.moveTo(0.5,y);c.lineTo(x,y);c.stroke();v+=step;}}}var ax=this.dV;if(this.I.ai>0){c.fillStyle=this.C.B.inactiveColor;c.fillRect(0,0,this.aj(0),this.H);}var fS=this.isEndVisible();if(this._content==1){if((this.aI=='candle'||this.aI=='ohlc')&&this.at!=0&&fS){x=this.aj(e.index-s.index);if(this.at<0){c.fillStyle=this.C.B.flashDownColor;}else{c.fillStyle=this.C.B.flashUpColor;}c.fillRect(x-ax/2,0,ax,this.df()[1]);}}if(this.ao.length>0){c.lineWidth=this.C.B.lineWidth;var b=null;for(var i=0;i<this.ao.length;i++){if(this.C.B.benchmarkColor.length<=i){c.strokeStyle=this.C.B.benchmarkColor[this.C.B.benchmarkColor.length-1];}else{c.strokeStyle=this.C.B.benchmarkColor[i];}b=this.ao[i];if(!b.span){continue;}c.beginPath();var begin=b.span[0],end=b.span[1];if(begin.prev){begin=begin.prev;}if(end.next){end=end.next;}var A=af,bI=begin;var first=false;while(A&&A!=ah.next){while(bI.next&&bI.next.timestamp<=A.timestamp){bI=bI.next;}if(bI.timestamp<=A.timestamp){x=this.aj(A.index-s.index);y=this.ae((bI.close/b.relative)*100);if(!first){c.moveTo(x,y);first=true;}else{c.lineTo(x,y);}}A=A.next;}c.stroke();}}if(this.ao.length==0&&this.aB.length>0){var h=null;for(var i=0;i<this.aB.length;i++){this.aB[i].ci(this,s,af,ah);c.fillStyle='#000000';for(var j=0;j<this.aB[i].aS.length;j++){h=this.aB[i].aS[j];c.beginPath();c.arc(this.aj(h.index-s.index),this.ae(h.value),4,0,6.28,false);c.fill();}}}if(af&&ah&&af.index<ah.index){if(this.ac.length>0){c.lineWidth=2;var i;for(var j=0;j<this.ac.length;j++){i=this.ac[j].id;this.ac[j].ci(this,s,af,ah);}c.lineWidth=1;}if(this._content==3&&da>0){var base=this.ae(0);var v,x,y,w,bZ,h,gz;var A=af;gz=Math.floor(this.bX()/2);while(A&&A!=ah.next){v=A.volume;x=this.aj(A.index-s.index);y=this.ae(v)|0;w=this.bX(A.index-s.index);if(w<=0){A=A.next;continue;}if(!A.prev||A.close==A.prev.close){c.strokeStyle=c.fillStyle=this.C.B.volumeColor;}else if(A.close>A.prev.close){c.strokeStyle=c.fillStyle=this.C.B.volumeUpColor;}else{c.fillStyle=c.fillStyle=this.C.B.volumeDownColor;}if((x|0)<=bZ+1){A=A.next;continue;}h=base-y;if(w>1){w-=1;}bZ=((x-gz)|0)+0.5;c.beginPath();if(h>=2&&w>=2){c.rect(bZ|0,y,w|0,h+1);c.fill();}else{if(h==1){y=base;}c.moveTo(bZ,y);c.lineTo(bZ+((w-1)|0),base);c.stroke();}A=A.next;}}else if(this._content==1){if(this.ao.length>0){c.lineWidth=this.C.B.lineWidth;c.strokeStyle=this.C.B.lineColor;c.beginPath();var gc=null;var A=af;while(A&&A!=ah.next){x=this.aj(A.index-s.index);y=this.ae((A.close/this.I.relative)*100);if((!A.prev||A.prev.timestamp<this.C.ct)&&A.timestamp>=this.C.ct){gc=A;}if(A==af){c.moveTo(x,y);}else{c.lineTo(x,y);}A=A.next;}c.stroke();if(gc){var bp=this.aj(gc.index-s.index);c.strokeStyle=this.C.B.referenceLineColor;c.beginPath();c.moveTo(bp,1.5);c.lineTo(bp,((this.H-1)|0)+0.5);c.stroke();}}else if(this.aI=='mountain'){var bp=this.C.H[0]-1;var fM=this.aj(0-(s.index-af.index));if(fS){bp=this.aj(e.index-s.index);}c.fillStyle=this._gradient;c.strokeStyle=this.C.B.lineColor;c.lineWidth=this.C.B.lineWidth;for(var i=0;i<2-isMoving;i++){c.beginPath();y=this.H+1;c.moveTo(bp,y);if(af.prev){y=this.ae(af.close);c.lineTo(fM-2,this.H+1);c.lineTo(fM-2,y);}else{c.lineTo(fM,this.H+1);}var A=af;while(A&&A!=ah.next){x=this.aj(A.index-s.index);y=this.ae(A.close);c.lineTo(x,y);A=A.next;}if(!i&& !isMoving){c.fill();}else{c.stroke();}}}else if(this.aI=='line'){c.lineWidth=this.C.B.lineWidth;c.strokeStyle=this.C.B.lineColor;c.beginPath();var A=af;while(A&&A!=ah.next){x=this.aj(A.index-s.index);y=this.ae(A.close);if(A==af){c.moveTo(x,y);}else{c.lineTo(x,y);}A=A.next;}c.stroke();}else if(this.aI=='candle'){var az=0;c.strokeStyle=this.C.B.candleColor;var A=af;while(A&&A!=ah.next){x=this.aj(A.index-s.index);y=this.ae(A.low);az=this.ae(A.high);c.beginPath();c.moveTo(x,y);c.lineTo(x,az);c.stroke();y=this.ae(A.open);az=this.ae(A.close);c.strokeRect(x-2,Math.min(y,az),5,Math.abs(az-y));if(y<az){c.fillStyle=this.C.B.candleDownColor;}else{c.fillStyle=this.C.B.candleUpColor;}c.fillRect(x-2,Math.min(y,az),5,Math.abs(az-y));A=A.next;}}else{var az=0;c.strokeStyle=this.C.B.candleColor;var A=af;while(A&&A!=ah.next){x=this.aj(A.index-s.index);y=this.ae(A.open);az=this.ae(A.close);if(y<az){c.strokeStyle=this.C.B.candleDownColor;}else{c.strokeStyle=this.C.B.candleUpColor;}c.beginPath();c.moveTo(x-5,y);c.lineTo(x,y);c.stroke();c.beginPath();c.moveTo(x,az);c.lineTo(x+5,az);c.stroke();y=this.ae(A.low);az=this.ae(A.high);c.beginPath();c.moveTo(x,y);c.lineTo(x,az);c.stroke();A=A.next;}}if((this.aI=='line'||this.aI=='mountain')&&fS){if(this.at<0){c.strokeStyle=c.fillStyle=this.C.B.lineFlashDownColor;}else if(this.at>0){c.strokeStyle=c.fillStyle=this.C.B.lineFlashUpColor;}else{c.fillStyle=this.C.B.lineColor;}c.beginPath();c.arc(x,y,4,0,6.28,false);c.fill();if(this.at!=0){y-=this.at*4;for(var i=0;i<this.fp%4;i++){c.beginPath();c.moveTo(x-5,y-this.at*(i*3));c.lineTo(x,y-this.at*(5+i*3));c.lineTo(x+5,y-this.at*(i*3));c.stroke();}}}}}y=((this.H-1)|0)+0.5;x=((this.C.H[0]-1)|0)+0.5;if(da>0&&this.ee){var dir=1;if(this.C.B.yAxisInside){dir= -1;c.textAlign='right';}else{c.textAlign='left';}c.textBaseline='middle';c.strokeStyle=this.C.B.axisColor;c.fillStyle=this.C.B.yLabelColor;c.font=this.C.B.yLabelFontStyle+' '+this.C.B.yLabelFontSize+"px '"+this.C.B.yLabelFontFamily+"'";v=this.av[0];var jj=this.C.B.yLabelFontSize/2;for(var i=0;i<yLabels;i++){y=this.ae(v);c.beginPath();c.moveTo(x,y);c.lineTo(x+4*dir,y);c.stroke();c.fillText(dT(v,this.cN,',','.'),x+5*dir,y);v+=step;}}if(this.eq&&xLabelStep>0){y=((this.H-1)|0)+0.5;var h;c.fillStyle=this.C.B.xLabelColor;c.font=this.C.B.xLabelFontStyle+' '+this.C.B.xLabelFontSize+"px '"+this.C.B.xLabelFontFamily+"'";if(this.C.B.xAxisOnTop){y=0;h=eG[1];c.textAlign='right';c.textBaseline='middle';}else{c.textAlign='center';c.textBaseline='top';y=((this.H-1)|0)+0.5;h=12;}var jy= -100;var A=af;while(A&&A!=ah.next){if(!A.label||(A.labelIndex%xLabelStep!=0)){A=A.next;continue;}x=this.aj(A.index-s.index);c.strokeStyle=this.C.B.axisColor;c.beginPath();c.moveTo(x,y);c.lineTo(x,y+4);c.stroke();if(x<this.C.B.xAxisMargins[0]+6){if(x<this.C.B.xAxisMargins[0]){A=A.next;continue;}x=this.C.B.xAxisMargins[0]+6;}else if(x>eG[0]-6-this.C.B.xAxisMargins[1]){if(x>eG[0]-this.C.B.xAxisMargins[1]){A=A.next;continue;}x=eG[0]-6-this.C.B.xAxisMargins[1];}c.save();c.translate(x,y+5);c.rotate(-90*Math.PI/180);c.fillText(A.label,0,0);c.restore();A=A.next;}}if(this.fe==1){if(this.C.B.yAxisInside){dir= -1;c.textAlign='right';}else{c.textAlign='left';}c.textBaseline='middle';var padding=2,fontSize=this.C.B.markerFontSize,aW=8,dz=0,markerOffset=[0,0];var markerValues=[this.bd,this.I.G.high.high,this.I.G.low.low];var markerColors=[this.C.B.markerColor,this.C.B.markerColorUp,this.C.B.markerColorDown];var markerFontColors=[this.C.B.markerFontColor,this.C.B.markerFontColorUp,this.C.B.markerFontColorDown];var markerFontSizes=[this.C.B.markerFontSize,this.C.B.markerFontSizeUp,this.C.B.markerFontSizeDown];var markerFontFamilies=[this.C.B.markerFontFamily,this.C.B.markerFontFamilyUp,this.C.B.markerFontFamilyDown];var markerFontStyles=[this.C.B.markerFontStyle,this.C.B.markerFontStyleUp,this.C.B.markerFontStyleDown];if(this.at<0){markerColors[0]=markerColors[2];markerFontColors[0]=markerFontColors[2];}else if(this.at>0){markerColors[0]=markerColors[1];markerFontColors[0]=markerFontColors[1];}var dD=this.I.source.getPreviousClose();if(this.I.G.L<ESpans.DAY&&dD!=null){markerValues.push(dD.close);markerColors.push(this.C.B.markerColorClose);markerFontColors.push(this.C.B.markerFontColorClose);markerFontSizes.push(this.C.B.markerFontSizeClose);markerFontFamilies.push(this.C.B.markerFontFamilyClose);markerFontStyles.push(this.C.B.markerFontStyleClose);}else{this.eV[i]=null;}for(var i=markerValues.length-1;i>=0;i--){c.font=markerFontStyles[i]+' '+markerFontSizes[i]+'px \''+markerFontFamilies[i]+'\'';if(this.ao.length>0){markerValues[i]=(markerValues[i]/this.I.relative)*100;}var text=dT(markerValues[i],this.cN,',','.');var eh=c.measureText(text).width;x=((this.C.H[0]-1)|0)+0.5;var w=eh+padding*2,h=markerFontSizes[i]+padding*2;if(markerValues[i]<this.av[0]){y=((this.H-1-(fontSize/2)-padding)|0)+0.5;dz=(h/2);x-=markerOffset[0];markerOffset[0]+=eh+aW+padding*2;}else if(markerValues[i]>this.av[1]){y=(((fontSize/2)+padding)|0)+0.5;dz= -(h/2);x-=markerOffset[1];markerOffset[1]+=eh+aW+padding*2;}else{y=this.ae(markerValues[i]);dz=0;}var bf=((x-5-eh-padding)|0)+0.5,aO=((y-(markerFontSizes[i]/2)-padding)|0)+0.5;c.fillStyle=markerColors[i];if(dir==1){c.fillRect(x+5,y-8,this.C.H[0]-x,16);}else{c.beginPath();c.moveTo(bf-aW,aO+(h/2)+dz);c.lineTo(bf,aO);c.lineTo(bf+w,aO);c.lineTo(bf+w,aO+h);c.lineTo(bf,aO+h);c.lineTo(bf-aW,aO+(h/2)+dz);c.fill();}this.eV[i]=[bf,aO,w,h];c.fillStyle=markerFontColors[i];c.fillText(text,x+5*dir,y);}}if(this.fd){c.textAlign='left';c.textBaseline='bottom';c.strokeStyle='#000';c.font=this.C.B.legendLabelFontStyle+' '+this.C.B.legendLabelFontSize+'px \''+this.C.B.legendLabelFontFamily+'\'';var y=this.H-2-this.C.B.spanLabelFontSize-4-this.C.B.infoLabelFontSize;for(var i=0;i<this.ao.length;i++){if(this.C.B.benchmarkColor.length<=i){c.fillStyle=this.C.B.benchmarkColor[this.C.B.benchmarkColor.length-1];}else{c.fillStyle=this.C.B.benchmarkColor[i];}c.fillRect(13,y-(((this.C.B.legendLabelFontSize/2)-5)|0),10,10);c.strokeRect(13.5,((y-(this.C.B.legendLabelFontSize/2)-5)|0),10,10);c.fillStyle=this.C.B.legendLabelColor;c.fillText(this.ao[i].source.cS,25,y);y-=10;}c.font=this.C.B.infoLabelFontStyle+' '+this.C.B.infoLabelFontSize+'px \''+this.C.B.infoLabelFontFamily+'\'';c.fillStyle=this.C.B.infoLabelColor;c.strokeStyle=this.C.B.infoLabelColor;if(this.fd!=2){var text;if(this.I.source.cS){if(this.cR===null){this.cR=this.I.source.cS.length+1;var w;do{this.cR--;text=this.I.source.cS.substr(0,this.cR)+(this.cR!=this.I.source.cS.length?'...':'')+': '+dT(this.bd,this.cN,',','.');w=c.measureText(text).width;}while(this.C.H[0]-10-this.C.B.offset<w);}else{text=this.I.source.cS.substr(0,this.cR)+(this.cR!=this.I.source.cS.length?'...':'')+': '+dT(this.bd,this.cN,',','.');}}else{text=this.bd.toString();}c.fillText(text,10.5,((this.H-2-this.C.B.spanLabelFontSize-2)|0)+0.5);}c.font=this.C.B.spanLabelFontStyle+' '+this.C.B.spanLabelFontSize+'px \''+this.C.B.spanLabelFontFamily+'\'';text=eT(this.I.span[0].timestamp,0,this.I.G.L)+' - '+eT(this.I.span[1].timestamp,0,this.I.G.L)+' ('+hV(this.I.G.L)+')';c.fillText(text,10.5,((this.H-2)|0)+0.5);}if(!this.C.eo&&this.dQ==1&&this.bo){c.font=this.C.B.markerFontStyleCursorX+' '+this.C.B.markerFontSizeCursorX+'px \''+this.C.B.markerFontFamilyCursorX+'\'';var label=strftime(this.bo.timestamp,this.I.source.getFormatString(this.I.G.L));var h=this.C.B.markerFontSizeCursorX+8;var w=c.measureText(label).width+4,eP=(w/2)|0;var aW=8;var value=this._content==3?this.bo.volume:this.bo.close;if(this.ao.length>0){value=(this.bo.close/this.I.relative)*100;}x=this.aj(this.bo.index-s.index);y=this.ae(value);c.textBaseline='middle';c.strokeStyle=this.C.B.cursorColor;c.beginPath();c.moveTo(x,0.5);c.lineTo(x,((this.H-1)|0)+0.5);c.stroke();c.fillStyle=this.C.B.markerColorCursorX;c.textAlign='center';c.beginPath();c.moveTo(x,0.5+3);c.lineTo(x-(aW/2),3.5+aW);c.lineTo(x-eP,3.5+aW);c.lineTo(x-eP,3.5+aW+h);c.lineTo(x+eP,3.5+aW+h);c.lineTo(x+eP,3.5+aW);c.lineTo(x+(aW/2),3.5+aW);c.lineTo(x,3.5);c.fill();c.fillStyle=this.C.B.markerFontColorCursorX;c.fillText(label,x,3+aW+(h/2));if(this.aI=='line'||this.aI=='mountain'){c.fillStyle=this.C.B.lineColor;c.beginPath();c.arc(x,y,4,0,6.28,false);c.fill();}c.font=this.C.B.markerFontStyleCursorY+' '+this.C.B.markerFontSizeCursorY+'px \''+this.C.B.markerFontFamilyCursorY+'\'';var text=dT(value,this.cN,',','.');h=this.C.B.markerFontSizeCursorY+8;w=c.measureText(text).width+4;y-=h/2;c.fillStyle=this.C.B.markerColorCursorY;c.beginPath();if(x<this.C.H[0]/2){x+=14;c.moveTo(x-aW,y+(h/2));c.lineTo(x,y);c.lineTo(x+w,y);c.lineTo(x+w,y+h);c.lineTo(x,y+h);c.closePath();}else{x-=w+14;c.moveTo(x+w+aW,y+(h/2));c.lineTo(x+w,y);c.lineTo(x,y);c.lineTo(x,y+h);c.lineTo(x+w,y+h);c.closePath();}c.fill();c.textAlign='left';c.fillStyle=this.C.B.markerFontColorCursorY;c.fillText(text,x+2,y+(h/2));}c.strokeStyle=this.C.B.axisColor;y=((this.H-1)|0)+0.5;x=((this.C.H[0]-1)|0)+0.5;c.beginPath();c.moveTo(0.5,y);c.lineTo(x,y);c.stroke();c.beginPath();c.moveTo(0.5,0.5);c.lineTo(x,0.5);c.stroke();c.beginPath();c.moveTo(x,0.5);c.lineTo(x,y);c.stroke();c.beginPath();c.moveTo(0.5,0.5);c.lineTo(0.5,y);c.stroke();c.restore();};this.cY=null;this.dq=[0,0];this.bB=function(e,button,layerX,layerY){switch(e.type){case 'mouseup':if(button==this.cY){this.cY=null;this.C.dp(false);}break;}if(!this.C.ec()){switch(e.type){default:return;case 'mouseout':this.cY=null;this.bo=null;this.V();break;case 'DOMMouseScroll':case 'mousewheel':var cf=0;if(e.wheelDelta){cf=e.wheelDelta/120;if(window.opera){cf= -cf;}}else if(e.detail){cf= -e.detail/2;}cf=cf<0? -1:1;var l=cf,r= -cf;var p=this.df();var ax=this.bX();var s=Math.ceil((p[0]/ax)*0.1);l*=s;r*=s;if(this.I.ag>=(this.C.B.offset/ax)&&this.isEndVisible()){r=0;}this.C.zoom(l,r);break;case 'mouseup':this.ea=null;this.cY=null;this.C.dp(false);break;case 'mousedown':if(button==1){if(this.eb){this.eb=null;this.ea=this.iu(layerX,layerY-this.aG);}else{var area=null;for(var i=0;i<this.eV.length;i++){area=this.eV[i];if(area==null){continue;}if(layerX>=area[0]&&layerX<=area[0]+area[2]&&layerY-this.aG>=area[1]&&layerY-this.aG<=area[1]+area[3]){var value=null;switch(i){case 0:value=this.I.G.end;break;case 1:value=this.I.G.high;break;case 2:value=this.I.G.low;break;case 3:value=this.I.source.getPreviousClose(this.I.G.L);break;}if(value){this.C.gx(value);}return;}}var cl=null,h=null,x,y;for(var i=0;i<this.aB.length;i++){for(var j=0;j<this.aB[i].aS.length;j++){h=this.aB[i].aS[j];x=this.aj(h.index-this.I.span[0].index);y=this.ae(h.value);if(Math.abs(layerX-x)<=5&&Math.abs(layerY-this.aG-y)<=5){cl=h;break;}}if(cl){break;}}if(cl){this.ea=cl;}else{this.cY=button;this.dq[0]=layerX;this.dq[1]=layerY;this.C.dp(true);}}}break;case 'mousemove':var V=false;if(this.dQ){var er=this.gD(layerX);if(er!=this.bo){this.bo=er;this.gJ=layerX;V=true;}}if(this.ea){this.hZ(this.ea,layerX,layerY-this.aG);V=true;}else if(button==this.cY){var x=layerX-this.dq[0];var y=layerY-this.dq[1];this.dq[0]=layerX;this.dq[1]=layerY;var t=this.bX();this.C.scroll(-(x/t));}if(V){this.V();}break;}}};this.eB();this._updateStyle();};
function NavBar(set,source){this.C=set;this.I=source;this.bj=set.gB();this.H=0;this.aG=0;this.ju=[0,0];this.bV=false;this.fc=false;this.fu=0;this.fr=0;this.aa=60;this.V=function(){this.C.V();};this.bl=function(){var c=this.bj;if(!this.I.G){return;}c.save();c.translate(0,this.aG);var y=((this.H-1)|0)+0.5;var x=((this.C.H[0]-1)|0)+0.5;c.strokeStyle=this.C.B.axisColor;c.beginPath();c.moveTo(0.5,y);c.lineTo(x,y);c.stroke();c.beginPath();c.moveTo(0.5,0.5);c.lineTo(x,0.5);c.stroke();c.beginPath();c.moveTo(x,0.5);c.lineTo(x,y);c.stroke();c.beginPath();c.moveTo(0.5,0.5);c.lineTo(0.5,y);c.stroke();var G=this.I.source.getBuffer(this.aa);c.fillStyle=this.C.B.navBarAreaColor;c.strokeStyle=this.C.B.navBarHandleColor;var s=this.I.span[0];var e=this.I.span[1];if(this.I.G.size==1){x=0;w=this.C.H[0];}else{x=1+(s.index/(this.I.G.size-1))*(this.C.H[0]-2);w=((e.index-s.index)/(this.I.G.size-1))*(this.C.H[0]-2);}c.fillRect(x,0,w,this.H);var l=this.bV?this.bV:this.fc;if(l==2||l==3){if(l==3){x+=w;}c.lineWidth=2;c.beginPath();c.moveTo(x,0);c.lineTo(x,this.H);c.stroke();c.lineWidth=1;}c.strokeStyle=this.C.B.navBarLineColor;s=G.begin;e=G.end;c.beginPath();var A=s;var bO=G.high.high-G.low.low;var low=G.low.low-bO*0.1;var high=G.high.high+bO*0.1;if(low<0){low=0;}var ax=(this.C.H[0]-3)/(G.size-1);y=(((1-((A.close-low)/(high-low)))*this.H)|0)+0.5;x=1;c.moveTo(0.5,y);while(A){y=(((1-((A.close-low)/(high-low)))*this.H)|0)+0.5;c.lineTo((x|0)+0.5,y);A=A.next;x+=ax;}c.stroke();c.restore();};this.gA=function(x){if(!this.I.G|| !this.I.span){return false;}var left=(this.I.span[0].index/(this.I.G.size-1))*this.C.H[0];var right=(this.I.span[1].index/(this.I.G.size-1))*this.C.H[0];var o=x-left;var aT=right-x;if(o> -5&&o<5){return 2;}else if(aT> -5&&aT<5){return 3;}else if(x>left&&x<right){return 1;}return false;};this._updateStyle=function(){};this.fR=function(x){var a=this.gA(x);if(a!=this.fc){var cursor='';if(a==1){cursor='move';}else if(a==2){cursor='w-resize';}else if(a==3){cursor='e-resize';}this.C.bQ(cursor);this.fc=a;this.V();}};this.bB=function(e,button,layerX,layerY){if(this.C.isLocked()){return;}switch(e.type){case 'mouseover':this.fR(layerX);break;case 'mouseout':this.C.bQ('');this.fc=null;this.C.dp(false);this.bV=false;break;case 'mouseup':this.bV=false;this.fR(layerX);this.C.dp(false);break;case 'mousemove':if(!this.I.G|| !this.I.span){return;}if(!this.bV){this.fR(layerX);}else{var x=layerX-this.fu;var w=this.C.H[0]/(this.I.G.size-1);this.fr+=(x/w);var m=this.fr|0;this.fu=layerX;if(m!=0){this.fr-=m;var begin=this.I.span[0],end=this.I.span[1];if(this.bV==2){begin=bz(begin,m);}else if(this.bV==3){end=bz(end,m);}else{begin=bz(begin,m);end=bz(end,m);}this.C.gE(begin,end);}}break;case 'mousedown':if(!this.I.G|| !this.I.span){return;}this.fu=layerX;if(button==1){var a=this.gA(layerX);if(!a){this.bV=1;var i=(layerX/this.C.H[0])*(this.I.G.size-1);var w=this.I.span[1].index-this.I.span[0].index;var s=(i-w/2)|0;var e=(i+w/2)|0;var A=this.I.G.begin,begin=null,end=null;while(A){if(A.index==s||(!begin&&A.index>s)){begin=A;}if(A.index==e||(!end&& !A.next)){end=A;}A=A.next;}if(begin&&end){this.C.gE(begin,end);}}this.bV=a;this.C.dp(true);}break;}};this.gy=function(){};this.bi=function(){this.aK();if(this.aa<ESpans.DAY&&this.I.G.L>=ESpans.DAY){this.aa=ESpans.DAY;}return true;};this.aK=function(){var w=5;var span=((this.I.G.end.index-this.I.G.begin.index)+this.I.ai+this.I.ag)*this.I.G.L;var am=[ESpans.MONTH,ESpans.WEEK,ESpans.DAY,ESpans.HOUR,ESpans.THIRTY_MINUTES,ESpans.FIFTEEN_MINUTES,ESpans.FIVE_MINUTES,ESpans.MINUTE];var n=0;for(var i=am.length;i>=0;i--){n=span/am[i];if(this.C.H[0]/n>=w){this.aa=am[i];return;}}if(this.I.G.L>=86400){this.aa=86400;}else{this.aa=60;}};this.setSize=function(w,h){this.H=[w,h];};this.setPosition=function(x,y){this.aG=[x,y];}};
function hI(chart,offset,begin,end,i,j){var c=chart.bj;c.fillStyle=chart.C.B.bandColor[i<chart.C.B.bandColor.length?i:0];c.beginPath();var start=begin;var A=start;while(A&&A!=end.next){if(A.indicator[i]!==null){x=pc(chart.aj(A.index-offset.index));y=pc(chart.ae(A.indicator[i]));if(A==start){c.moveTo(x,y);}else{c.lineTo(x,y);}}else{start=A.next;}A=A.next;}if(!A){A=end;}while(A&&A!=begin.prev){x=pc(chart.aj(A.index-offset.index));y=pc(chart.ae(A.indicator[j]));c.lineTo(x,y);A=A.prev;}x=pc(chart.aj(start.index-offset.index));y=pc(chart.ae(start.indicator[i]));c.lineTo(x,y);c.fill();};function dO(chart,offset,begin,end,i){var c=chart.bj;c.strokeStyle=chart.C.B.indicatorColor[i<chart.C.B.indicatorColor.length?i:0];c.beginPath();var start=begin;var A=start;while(A&&A!=end.next){if(A.indicator[i]!==null){x=pc(chart.aj(A.index-offset.index));y=pc(chart.ae(A.indicator[i]));if(A==start){c.moveTo(x,y);}else{c.lineTo(x,y);}}else{start=A.next;}A=A.next;}c.stroke();};function ih(){this.values=1;this.style='line';this.register=function(){this.U=parseInt(this.U,10);if(isNaN(this.U)||this.U<=0){this.U=20;}};this.unregister=function(){};this.bL=function(value){if(value.index<this.U-1){value.indicator[this.id[0]]=null;return;}var bD=0;var A=value;for(var i=0;i<this.U;i++){bD+=A.close;A=A.prev;}value.indicator[this.id[0]]=bD/this.U;};this.ci=function(chart,offset,begin,end){dO(chart,offset,begin,end,this.id[0]);};};function hB(){this.values=1;this.style='line';this.gq=null;this.register=function(){this.U=parseInt(this.U,10);if(isNaN(this.U)||this.U<=0){this.U=12;}this.gq=2/(this.U+1);};this.unregister=function(){};this.bL=function(value){var cE=0;if(value.index==0){cE=value.close;}else{cE=value.prev.indicator[this.id]+this.gq*(value.close-value.prev.indicator[this.id]);}value.indicator[this.id[0]]=cE;};this.ci=function(chart,offset,begin,end){dO(chart,offset,begin,end,this.id[0]);};};function ig(){this.values=1;this.style='line';this.register=function(source){this.U=parseInt(this.U,10);if(isNaN(this.U)||this.U<=0){this.U=38;}this.m=Math.floor(this.U/2);this.n=this.m+(this.U%2);};this.unregister=function(){};this.bL=function(value){if(value.index<this.m+this.n){value.indicator[this.id[0]]=null;return;}var A=value,bI;var cj,dc;cj=0;for(var i=0;i<this.n;i++){bI=A;dc=0;for(var j=0;j<this.m;j++){dc+=bI.close;bI=bI.prev;}cj+=dc/this.m;A=A.prev;}cj=cj/this.n;value.indicator[this.id[0]]=cj;};this.ci=function(chart,offset,begin,end){dO(chart,offset,begin,end,this.id[0]);};};function ic(){this.values=1;this.style='line';this.register=function(){this.U=parseInt(this.U,10);if(isNaN(this.U)||this.U<=0){this.U=10;}};this.unregister=function(){};this.bL=function(value){if(value.index<this.U-1){value.indicator[this.id[0]]=null;return;}var cj=0,dc=0;var A=value;for(var i=0;i<this.U;i++){cj+=A.close*(this.U-i);dc+=(this.U-i);A=A.prev;}value.indicator[this.id[0]]=cj/dc;};this.ci=function(chart,offset,begin,end){dO(chart,offset,begin,end,this.id[0]);};};function hC(){this.values=2;this.style='band';this.bS=null;this.register=function(source){this.U=parseInt(this.U,10);if(isNaN(this.U)||this.U<=0){this.U=10;}this.aZ=parseInt(this.aZ,10);if(isNaN(this.aZ)||this.aZ<=0){this.aZ=2;}this.aV=parseInt(this.aV,10);if(isNaN(this.aV)||this.aV<=0){this.aV=2;}this.bS=source.addIndicator('bS',10);};this.unregister=function(source){source.removeIndicator(this.bS);};this.bL=function(value){if(value.index<this.U-1){value.indicator[this.id[0]]=null;value.indicator[this.id[1]]=null;return;}var bS=value.indicator[this.bS.id];var bD=0;var A=value;for(var j=0;j<this.U;j++){bD+=Math.pow(A.close-bS,this.aZ);A=A.prev;}bD=Math.pow(bD/this.U,1/this.aZ);value.indicator[this.id[0]]=bS-this.aV*bD;value.indicator[this.id[1]]=bS+this.aV*bD;};this.ci=function(chart,offset,begin,end){dO(chart,offset,begin,end,this.bS.id[0]);hI(chart,offset,begin,end,this.id[0],this.id[1]);};};
function dR(t,v){this.value=v;this.timestamp=t;};dR.prototype.value=0;dR.prototype.timestamp=0;dR.prototype.index=0;function fI(){};fI.prototype.aS=null;fI.prototype.ci=function(chart,offset,begin,end){};ToolLine=function(t,v){this.aS=[];var h=new dR(t,v);this.aS.push(h);h=new dR(t,v);this.aS.push(h);};ToolLine.prototype=fI.prototype;ToolLine.prototype.ci=function(chart,offset,begin,end){var c=chart.bj;c.strokeStyle='#000000';c.beginPath();c.moveTo(chart.aj(this.aS[0].index-offset.index),chart.ae(this.aS[0].value));c.lineTo(chart.aj(this.aS[1].index-offset.index),chart.ae(this.aS[1].value));c.stroke();};
function pc(v){return(v|0)+0.5;};function SparklineStyle(){this.type='line';this.margins=[2,5,2,5];this.positiveBarColor='rgba(51,153,0,1)';this.negativeBarColor='rgba(204,0,0,1)';this.lineColor='rgba(200,200,200,1)';this.pointSize=2;this.minBarWidth=2;this.maxBarWidth=4;this.useBarAutosize=true;this.showOpen=false;this.showClose=true;this.showHigh=true;this.showLow=true;this.delimiterColor='rgba(150,150,150,1)';this.hF='rgba(205,164,0,1)';this.upFlashColor='rgba(51,153,0,1)';this.downFlashColor='rgba(204,0,0,1)';this.neutralFlashColor='rgba(200,200,200,1)';};function Sparkline(id,instrumentId,exchangeId,quoteSource){if(ChartCache.get(id)!==null&&typeof console!='undefined'){console.dL('[Sparkline] sparkline with id \''+id+'\' already exists!');}ChartCache.set(id,this);this.aa=60;this.bn=false;this.ab=[null,null];this.en=null;this.ed=[0,0];this.I=null;this.H=[0,0];this.cv=0;this.av=[0,0];this.bw=[null,null];this.aU=null;this.bj=null;this.T=null;this.bd=null;this.at=[null,0];this.bW=null;this.bC=null;this.B=new SparklineStyle();var e=document.getElementById(id);if(!e){throw "[Chart] element with id '"+id+"' does not exist!";}e.innerHTML='';e.style.position='relative';if(typeof e=='undefined'||e===null){return null;}this.H[0]=e.offsetWidth;this.H[1]=e.offsetHeight;this.cv=this.H[0];var c=document.createElement('canvas');c.width=this.H[0];c.height=this.H[1];c.id=id+'aU';e.appendChild(c);c.style.verticalAlign='middle';if(typeof G_vmlCanvasManager!=='undefined'){G_vmlCanvasManager.fa(c);}this.bj=c.getContext("2d");this.aU=c;this.setOffsetValue=function(value){this.en=value;};this.setStyle=function(style){this.B=style;this.bl();};this.setType=function(type){if(type=='histogram'||type=='line'){this.B.type=type;this.bl();}};this.V=function(){this.bl();};this.getBegin=function(){if(!this.T||this.T.size==0){return 0;}var b=this.T.begin;return new ChartValue(b.timestamp,b.open,'begin');};this.getEnd=function(){if(!this.T||this.T.size==0){return 0;}var e=this.T.end;return new ChartValue(end.timestamp,end.close,'end');};this.getHigh=function(){if(!this.T||this.T.size==0){return 0;}var p=this.bw[0];return new ChartValue(p.timestamp,p.high,'high');};this.getLow=function(){if(!this.T||this.T.size==0){return 0;}var p=this.bw[1];return new ChartValue(p.timestamp,p.low,'low');};this.setInstrument=function(instrumentId,exchangeId,quoteSource){var source=ChartSourceCache.get(instrumentId,exchangeId,quoteSource);this.setSource(source);};this.setSource=function(source){if(typeof source!='object'){throw "invalid source specified!";}if(this.I!==null){this.I.release();}this.I=source;var R=this;var f=function(cP){R.dJ(cP);};source.acquire(f);if(this.T){this.setSpan(this.ab[0].timestamp,this.ab[1].timestamp);}};this.setSize=function(w,h){this.cv=w;this.dr(w,h);if(this.B.type=='histogram'&&this.B.useBarAutosize){this.H[0]=this.cv;this.dW();}};this.dr=function(w,h){var e=document.getElementById(id);e.style.width=w+'px';e.style.height=h+'px';this.aU.width=w;this.aU.height=h;this.H=[w,h];this.bl();if(this.ab&&this.ab[0]!=null){var aC=this.aK((this.ab[1].index-this.ab[0].index)*this.aa);var G=this.I.getBuffer(aC);if(G&&G.size>0){this.iC(aC);}}this.V();};this.setSpanSimple=function(span,L){var aA=((new Date()).getTime()/1000)|0;var start=aA-span;if(span<=86400){start=Math.floor(aA/span)*span;}var end=Math.ceil(aA/ESpans.DAY)*ESpans.DAY;this.setSpan(start,end,L);};this.setSpan=function(start,end,L){if(this.bn==true){return;}if(end<start){throw "invalid bO specified!";}var aC=L;if(typeof L=='undefined'||L===null){aC=this.aK(end-start);}this.aa=aC;this.bn=true;this.ed=[start,end];var R=this;this.I.requestData(start,end,aC,function(s,e,i){R.fm(s,e,i);});};this.fm=function(start,end,L){if(start===false||end===false||L===false){this.bn=false;if(L!==false&&this.aa<ESpans.DAY){var span=this.I.getAvailableSpan();if(span[1]-span[0]>0){var start=Math.floor(span[1]/ESpans.DAY)*ESpans.DAY;this.setSpan(start,start+ESpans.DAY);}else{var b=this.I.getBuffer(ESpans.DAY);if(!b||b.size==1){this.setSpanSimple(ESpans.WEEK);}}}return;}var G=this.I.getBuffer(L);var cH=G.findSpan(start,end);var aC=this.aK(((cH[1].index-cH[0].index)+1)*L);if(aC<ESpans.DAY&&L>=ESpans.DAY){var G=this.I.getBuffer(aC);if(G&&G.begin&&G.begin.timestamp<=cH[0].timestamp){L=aC;}}else{L=aC;}this.aa=L;var R=this;this.T=this.I.getBuffer(this.aa);this.ab=this.T.findSpan(start,end);this.bd=this.T.end.close;if(this.B.type=='histogram'&&this.B.useBarAutosize){this.H[0]=this.cv;}this.es(true);this.fQ();if(this.B.type!='histogram'|| !this.B.useBarAutosize|| !this.dW(true)){this.bl();}this.bn=false;};this.dJ=function(cP){if(!this.ab[0]){return;}if(cP&&this.ab[1].next==this.T.end){this.ab[1]=this.ab[1].next;}this.es();this.dZ();this.fQ();this.dW();this.bl();};this.bi=function(iI,hv){if(bR(this.ab[1],this.aa)==bR(iI,this.aa)){this.ab[1]=bR(hv,this.aa);}this.es();this.dZ();this.fQ();this.dW();this.bl();};this.fQ=function(){if(!this.T||this.T.size==0){this.aU.title='';}else{var c=this.T.end.close;var h=this.bw[1].high;var l=this.bw[0].low;this.aU.title='Close: '+c+' | '+'Low: '+l+' | '+'High: '+h;}};this.dZ=function(){var cK=this.T.end.close;if(cK>this.bd){this.at[0]=1;}else if(cK<this.bd){this.at[0]= -1;}else{this.at[0]=0;}if(this.bW!==null){clearTimeout(this.bW);}var R=this;if(this.bC===null){this.bC=setInterval(function(){R.at[1]=(R.at[1]+1)%2;R.bl();},200);}this.bW=setTimeout(function(){R.at[0]=null;clearInterval(R.bC);R.bC=null;R.bl();},1000);};this.es=function(complete){var start=0;if(this.T==null||this.T.size==0){this.av=[null,null];this.bw=[null,null];}else{this.av=[this.T.low,this.T.high];if(complete){var low,high,A;A=low=high=this.T.begin;while(A){if(A.low<low.low){low=A;}if(A.high>high.high){high=A;}A=A.next;}this.bw=[low,high];}else{if(this.T.end.low<this.bw[0].low){this.bw[0]=this.T.end;}if(this.T.end.high>this.bw[1].high){this.bw[1]=this.T.end;}}}};this.iC=function(L){if(L==this.aa){return;}this.aa=L;if(this.T&&this.ab&&this.ab[0]){var jp=this.T;this.T=this.I.getBuffer(this.aa);if(this.T&&this.T.size>0){this.ab=this.T.findSpan(this.ab[0].timestamp,this.ab[1].timestamp);this.bd=this.T.end.close;this.es(true);}else{this.T=null;}}};this.dW=function(){if(!this.T|| !this.ab[0]){return;}var ax=this.bX();var cQ=0;var n=((this.ab[1].index-this.ab[0].index)+1);if(ax<this.B.minBarWidth){cQ=this.B.minBarWidth-ax;}else if(ax>this.B.maxBarWidth){cQ=this.B.maxBarWidth-ax;}else{cQ=(Math.round(ax)-ax);if(this.H[0]+n*cQ>this.cv){cQ=(Math.floor(ax)-ax);}}if(cQ!=0){var w=this.H[0]+n*cQ;if(w>this.cv){this.dr(this.cv,this.H[1]);}else{this.dr(w,this.H[1]);this.dW();}return true;}return false;};this.aK=function(span){var w=2;var width=this.H[0]-(this.B.margins[0]+this.B.margins[2]);var am=[ESpans.MONTH,ESpans.WEEK,ESpans.DAY,ESpans.HOUR,ESpans.THIRTY_MINUTES,ESpans.FIFTEEN_MINUTES,ESpans.FIVE_MINUTES,ESpans.MINUTE];var n=0;for(var i=am.length;i>=0;i--){n=span/am[i];if(am[i]<span&&width/n>=w){return am[i];}}if(span>86400){return ESpans.MONTH;}else{return ESpans.HOUR;}};this.aj=function(value){var n=(this.ab[1].index-this.ab[0].index)+1;var step=((this.H[0]-this.B.margins[1]-this.B.margins[3]))/n;return this.B.margins[3]+((value*step)|0);};this.ae=function(value){var height=this.H[1]-this.B.margins[0]-this.B.margins[2];return(this.B.margins[0]+(1-((value-this.av[0].low)/(this.av[1].high-this.av[0].low)))*height);};this.bX=function(i){var n=(this.ab[1].index-this.ab[0].index)+1;var step=(this.H[0]-this.B.margins[1]-this.B.margins[3])/n;if(typeof i!="number"){return step;}return((step*(i+1))|0)-((step*(i))|0);};this.bl=function(){var c=this.bj;c.clearRect(0,0,this.H[0],this.H[1]);var da=this.av[1].high-this.av[0].low;if(!this.T||da<=0){return;}var end=this.T.end;var low=this.bw[0];var high=this.bw[1];var bp=this.aj(end);var gd=this.aj(low.index);var fo=this.aj(high.index);if(this.B.type=='line'){c.strokeStyle=this.B.lineColor;var s= -1;var A=this.T.begin;var A=this.ab[0];while(A&&A.prev!=this.ab[1]){x=pc(this.aj(A.index-this.ab[0].index));y=pc(this.ae(A.close));if(A==end){bp=x;}else if(A==low){y=pc(this.ae(A.low));gd=x;}else if(A==high){y=pc(this.ae(A.high));fo=x;}if(A==this.ab[0]){c.moveTo(x,y);}else{c.lineTo(x,y);}s=x;A=A.next;}c.stroke();c.fillStyle=this.B.delimiterColor;if(this.B.showOpen){c.beginPath();c.arc(this.aj(0),this.ae(this.T.begin.open),this.B.pointSize,0,6.28,false);c.fill();}if(this.B.showClose){if(this.at[0]===null){c.beginPath();c.arc(this.aj(end.index),this.ae(this.T.end.close),this.B.pointSize,0,6.28,false);c.fill();}}}else if(this.B.type=='histogram'){var offset=null;if(this.en){offset=this.en;}else{offset=this.I.getPreviousClose().close;}var offsetY=this.ae(offset)|0;var ax=this.bX();var v=0;var x,y,az,w,s= -1;var jg=0;var space=ax>=2;var A=this.ab[0];while(A&&A.prev!=this.ab[1]){v=A.close;x=this.aj(A.index-this.ab[0].index);y=this.ae(v)|0;w=this.bX(A.index-this.ab[0].index);if(w<=0){A=A.next;continue;}if((x|0)<=s+1){A=A.next;continue;}if(A==end){bp=x+(w/2);}else if(A==low){v=A.low;y=pc(this.ae(A.low));gd=x+(w/2);}else if(A==high){v=A.high;y=pc(this.ae(A.high));fo=x+(w/2);}if(v<=offset){c.fillStyle=this.B.negativeBarColor;c.strokeStyle=this.B.negativeBarColor;h=y-offsetY+1;az=offsetY;}else{c.fillStyle=this.B.positiveBarColor;c.strokeStyle=this.B.positiveBarColor;h=offsetY-y+1;az=y;}if(w>1&&space>0){w-=1;}c.beginPath();if(h>=1&&w>=1){c.rect(x|0,az,w|0,h);c.fill();}else{if(h==1){y+=1;}x=pc(x);c.moveTo(pc(x),pc(offsetY));c.lineTo(pc(x+(w-1)),pc(y));c.stroke();}s=x;A=A.next;}}if(this.B.type=='line'){c.fillStyle=this.B.hF;if(this.B.showLow){c.beginPath();c.arc(gd,this.ae(low.low),this.B.pointSize,0,6.28,false);c.fill();}if(this.B.showHigh){c.beginPath();c.arc(fo,this.ae(high.high),this.B.pointSize,0,6.28,false);c.fill();}}if(this.at[0]!==null){switch(this.at[0]){case 0:c.fillStyle=this.B.neutralFlashColor;break;case 1:c.fillStyle=this.B.upFlashColor;break;case-1:c.fillStyle=this.B.downFlashColor;break;}c.beginPath();c.arc(bp,this.ae(end.close),this.B.pointSize+this.at[1]*2,0,6.28,false);c.fill();}};this.setSource(new ChartSource(instrumentId,exchangeId,quoteSource));this.bl();};
var ESpans={MINUTE:60,FIVE_MINUTES:60*5,FIFTEEN_MINUTES:60*15,THIRTY_MINUTES:60*30,HOUR:60*60,DAY:60*60*24,WEEK:60*60*24*7,MONTH:60*60*24*7*4,YEAR:60*60*24*365};function bR(t,i){if(i==ESpans.WEEK){var d=new Date(t*1000);var w=d.getDay();return((new Date(d.getFullYear(),d.getMonth(),d.getDate())).getTime()/1000)-(w==0?7:w-1)*ESpans.DAY;}else if(i==ESpans.MONTH){var d=new Date(t*1000);return(new Date(d.getFullYear(),d.getMonth(),1)).getTime()/1000;}else if(i==ESpans.YEAR){var d=new Date(t*1000);return(new Date(d.getFullYear(),1,1)).getTime()/1000;}return Math.ceil(t/i)*i;};function hV(t){if(t>=ESpans.MONTH){var n=(t/ESpans.MONTH);return n+' Monat'+(n>1?'e':'');}else if(t>=ESpans.WEEK){var n=(t/ESpans.WEEK);return n+' Woche'+(n>1?'n':'');}else if(t>=ESpans.DAY){var n=(t/ESpans.DAY);return n+' Tag'+(n>1?'e':'');}else if(t>=ESpans.HOUR){var n=(t/ESpans.HOUR);return n+' Stunde'+(n>1?'n':'');}else{var n=(t/ESpans.MINUTE);return n+' Minute'+(n>1?'n':'');}return '';};function eT(bM,ar,i){var fZ=0,aA=0;if(!ar){var d=new Date();aA=Math.ceil(d.getTime()/(1000*ESpans.DAY))*ESpans.DAY+d.getTimezoneOffset()*60;fZ=strftime(aA,'%y');}if(i<ESpans.DAY){var de=((bM/3600)|0);var dg=((ar/3600)|0);if(!ar||de!=dg){return(aA-bM>ESpans.DAY?strftime(bM,'%d.%m '):'')+strftime(bM,'%H:%M');}return null;}if(i<ESpans.WEEK){var de=strftime(bM,'%u');var dg=strftime(ar,'%u');if(!ar||de<dg){var aO=strftime(bM,'%y');var az=strftime(ar,'%y');return strftime(bM,'%d.%m'+((ar&&aO!=az)||(!ar&&fZ!=aO)?' \'%y':''));}return null;}var de=strftime(bM,'%m');var dg=strftime(ar,'%m');if(!ar||de!=dg){return strftime(bM,'%B'+((ar&&de<dg)||(!ar&&strftime(bM,'%y')!=fZ)?' \'%y':''));}return null;};function ChartValue(d){this.next=null;this.prev=null;this.parent=null;this.begin=null;this.end=null;this.index=0;this.labelIndex=0;this.indicator=[];this.label=null;this.timestamp=0;this.open=0;this.high=0;this.low=0;this.close=0;this.volume=0;};function ga(bh,i){this.L=i;this.parent=null;this.bh=bh;this.bH=null;this.begin=null;this.end=null;this.size=0;this.cX=0;this.high=null;this.low=null;this.findTimestamp=function(timestamp){begin=this.begin;while(begin&&begin.next){if(begin.timestamp>=timestamp){break;}begin=begin.next;}return begin;};this.findSpan=function(hE,gj){var begin=null,end=null;begin=this.begin;while(begin){if(begin.timestamp>=hE){break;}begin=begin.next;}end=this.end;while(end){if(end.timestamp==gj||(end.prev&&end.prev.timestamp<gj)){break;}end=end.prev;}if(!begin|| !end){if(!begin&& !end){return null;}if(!begin)begin=end;if(!end)end=begin;}return[begin,end];};this.getFirstTimestamp=function(){if(this.begin){return this.begin.timestamp;}return null;};this.getLastTimestamp=function(){if(this.end){return this.end.timestamp;}return null;};this.getParent=function(){if(!this.parent){var am=[ESpans.MONTH,ESpans.WEEK,ESpans.DAY,ESpans.HOUR,ESpans.THIRTY_MINUTES,ESpans.FIFTEEN_MINUTES,ESpans.FIVE_MINUTES,ESpans.MINUTE];for(var i=0;i<am.length;i++){if(am[i]==this.L){if(i==0){break;}this.parent=new ga(this.bh,am[i-1]);this.parent.bH=this;}}}return this.bH;};this.getChild=function(){if(!this.bH){var am=[ESpans.MONTH,ESpans.WEEK,ESpans.DAY,ESpans.HOUR,ESpans.THIRTY_MINUTES,ESpans.FIFTEEN_MINUTES,ESpans.FIVE_MINUTES,ESpans.MINUTE];for(var i=0;i<am.length;i++){if(am[i]==this.L){if(i==am.length-1){break;}this.bH=new ga(this.bh,am[i+1]);this.bH.parent=this;}}}return this.bH;};this.fy=function(first,last){var A=null,next=null,begin=null;var t=0,ar=0;if(this.begin){var start=bR(first.timestamp,this.L);if(start<this.begin.timestamp){next=this.begin;}else{begin=this.end;t=bR(begin.timestamp,this.L);A=begin;}}var index=this.size;var p=first,q=null;do{if(this.L==ESpans.DAY){ar=Math.floor(p.timestamp/ESpans.DAY)*ESpans.DAY;}else{ar=bR(p.timestamp,this.L);}if(next&&ar>=next.timestamp){break;}if(ar<t){p=p.next;continue;}if(ar!=t){this.size++;if(this.L==ESpans.DAY){var i=2;}q=new ChartValue();q.timestamp=ar;q.index=index++;q.open=p.open;q.high=p.high;q.low=p.low;q.close=p.close;q.volume=p.volume;q.begin=q.end=p;if(A==null){if(begin){begin.next=q;q.prev=begin;}else{this.begin=q;}begin=A=q;}else{A.next=q;q.prev=A;A=q;}if(A.prev){A.label=eT(q.timestamp,A.prev.timestamp,this.L);if(A.label){A.labelIndex=this.cX++;}}t=ar;}else{A.end=p;A.close=p.close;A.volume+=p.volume;if(p.high>A.high){A.high=p.high;}if(p.low<A.low){A.low=p.low;}}if(this.high===null||A.high>this.high.high){this.high=A;}if(this.low===null||A.low<this.low.low){this.low=A;}p.parent=A;p=p.next;}while(p&&p.prev!=last);if(!A){return;}if(!next){this.end=A;}else{A.next=next;next.prev=A;}var aw;if(next){aw=this.begin;var index=0;this.cX=0;while(aw){aw.index=index++;if(aw.label){aw.labelIndex=this.cX++;}aw=aw.next;}}if(this.bh.ac.length>0){if(begin==A){for(i=0;i<this.bh.ac.length;i++){this.bh.ac[i].bL(A);}}else{aw=this.begin;while(aw){for(i=0;i<this.bh.ac.length;i++){this.bh.ac[i].bL(aw);}aw=aw.next;}}}this.getParent();if(this.parent){this.parent.fy(begin,A);}};this.hi=function(s,e,i,data){if(typeof data=='undefined'|| !data||data.length==0){return;}this.getChild();if(i<this.L){if(this.bH){this.bH.hi(s,e,i,data);}return;}var A=null,next=null,begin=null;if(this.begin){var start=data[2][0];if(start<this.begin.timestamp){next=this.begin;}else{begin=this.end;}}var q=null;var index=this.size;var t=0,ar=0;for(var p=2;p<data.length;p++){ar=bR(data[p][0],this.L);if(begin&&ar<=begin.timestamp){continue;}if(next&&ar>=next.timestamp){break;}if(ar!=t){this.size++;q=new ChartValue();q.index=index++;q.timestamp=ar;q.open=data[p][2];q.high=data[p][4];q.low=data[p][3];q.close=data[p][1];q.volume=data[p][5];if(A==null){if(begin){begin.next=q;q.prev=begin;}else{this.begin=q;}begin=A=q;}else{A.next=q;q.prev=A;A=q;}if(A.prev){A.label=eT(q.timestamp,A.prev.timestamp,this.L);if(A.label){A.labelIndex=this.cX++;}}t=ar;}else{A.close=data[p][1];A.volume+=data[p][5];if(data[p][4]>A.high){A.high=data[p][4];}if(data[p][3]<A.low){A.low=data[p][3];}}if(this.high===null||A.high>this.high.high){this.high=A;}if(this.low===null||A.low<this.low.low){this.low=A;}}if(!A){return;}if(!next){this.end=A;}else{A.next=next;next.prev=A;}var aw;if(next){aw=this.begin;var index=0;this.cX=0;while(aw){aw.index=index++;if(aw.label){aw.labelIndex=this.cX++;}aw=aw.next;}}if(this.bh.ac.length>0){if(begin==A){for(i=0;i<this.bh.ac.length;i++){this.bh.ac[i].bL(A);}}else{aw=this.begin;while(aw){for(i=0;i<this.bh.ac.length;i++){this.bh.ac[i].bL(aw);}aw=aw.next;}}}this.getParent();if(this.parent){this.parent.fy(begin,A);}};};function ChartSource(instrumentId,exchangeId,quoteSource){this.ep=0;this.cn={};this.cs={};this.ac=[];this.hA=0;this.bc=quoteSource;this.aE=instrumentId;this.aD=exchangeId;this.T=null;this.di=[];this.fs=null;this.fg=null;this.cw=null;this.co=null;this.dX=null;this.getFormatString=function(i){if(i<ESpans.DAY){return '%H:%M';}else if(i==ESpans.WEEK){return 'KW %V \'%y (%d.%m)';}else if(i==ESpans.MONTH){return '%b \'%y';}return '%d.%m.%Y';};this.acquire=function(c){if(typeof c!='undefined'){this.di.push(c);}this.ep++;if(this.ep==1){this.iX();}};this.release=function(c){if(typeof c!='undefined'){for(var j=0;j<this.di.length;j++){if(this.di[j]==c){this.di.splice(j,1);break;}}}this.ep--;if(this.ep==0){this.ij();}};this.getLastValue=function(){var b=this.getBuffer(60);if(b.end){return b.end.close;}return null;};this.getPreviousClose=function(i){var value=this.fs;var G=this.getBuffer(60);if(typeof i=='undefined'||i==60){if(typeof i=='undefined'&&value===null){if(G&&G.begin){value=G.begin;}else{value=this.T.begin;}}return value;}while(value&&G&&G.L<i){G=G.parent;if(value){value=value.parent;}else{value=G.begin;}}return value;};this.getAvailableSpan=function(){return this.cs[60];};this.getBuffer=function(i){if(this.T==null){return;}if(typeof i=='undefined'){var G=this.T;while(G.parent){G=G.parent;}return G;}var G=this.T;if(G.L>i){while(G.bH&&G.L>i){G=G.bH;}}else if(G.L<i){while(G.parent&&G.L<i){G=G.parent;}}if(G.L==i){return G;}return null;};this.requestData=function(s,e,i,c,f){return this.ho(s,e,i,c,f);};this.ij=function(){if(!this.fg){return;}BG_QuotePush.unsubscribe(this.aE,this.aD,this.cw|this.co|this.dX);BG_AjaxPushHub.unsubscribe(this.fg);};this.iX=function(){var that=this;if(!BG_QuotePush.isPushableExchange(this.aD)){return;}switch(this.bc){case 'bid':default:this.cw=EQuoteFields.BID_LAST;this.co=EQuoteFields.BID_TIME;this.dX=EQuoteFields.BID_CLOSE;break;case 'ask':this.cw=EQuoteFields.ASK_LAST;this.co=EQuoteFields.ASK_TIME;this.dX=EQuoteFields.ASK_CLOSE;break;case 'last':this.cw=EQuoteFields.LAST_LAST;this.co=EQuoteFields.LAST_TIME;this.dX=EQuoteFields.LAST_CLOSE;break;}var fields=this.cw|this.co|this.dX;var event=BG_QuotePush.subscribe(this.aE,this.aD,fields);var R=this;this.fg=BG_AjaxPushHub.subscribe(event,function(e,d){R.dJ(e,d);});};this.dJ=function(e,d){if(!(d.fields&this.cw)){return;}var value=parseFloat(d.values[this.cw]);var cG=null;if(d.fields&this.co){cG=parseInt(d.values[this.co]);}else{cG=BG_QuotePush.get(this.aE,this.aD,this.co);}if(cG===null){return;}var G=this.getBuffer(60);if(!G){G=this.getBuffer(ESpans.DAY);do{G=G.getChild();}while(G&&G.L!=60);if(!G){return;}}if(G.L==ESpans.DAY){cG=Math.floor(cG/ESpans.DAY)*ESpans.DAY;}var t=bR(cG,G.L);var lt=bR(G.size==0?0:G.end.timestamp,G.L);var q;if(t==lt){q=G.end;q.close=value;if(value>q.high){q.high=value;}if(value<q.low){q.low=value;}if(!G.high||value>G.high.high){G.high=q;}if(!G.low||value<G.low.low){G.low=q;}}else{q=new ChartValue();q.prev=G.end;if(!G.begin){G.begin=q;}if(G.end){G.end.next=q;}G.end=q;q.timestamp=cG;q.open=value;q.close=value;q.high=value;q.low=value;q.volume=0;q.index=G.size;if(q.prev){q.index=q.prev.index+1;}else{q.index=0;}if(!G.high||value>G.high.high){G.high=q;}if(!G.low||value<G.low.low){G.low=q;}G.size++;}if(G.parent){G.parent.fy(q,q);}while(q){for(i=0;i<this.ac.length;i++){this.ac[i].bL(q);}q=q.parent;}for(var i=0;i<this.di.length;i++){this.di[i](t!=lt);}};this.addIndicator=function(type,U,aZ,aV){if(typeof U=='undefined'){U=0;}if(typeof aZ=='undefined'){aZ=0;}if(typeof aV=='undefined'){aV=0;}var i;for(var j=0;j<this.ac.length;j++){i=this.ac[j];if(i.type==type&&i.U==U&&i.aZ==aZ&&i.aV==aV){i.gG++;return i;}}switch(type){case 'bS':i=new ih();break;case 'ema':i=new hB();break;case 'tma':i=new ig();break;case 'wma':i=new ic();break;case 'bb':i=new hC();break;default:return null;}var ids=[];for(var j=0;j<i.values;j++){ids.push(this.hA++);}i.id=ids;i.type=type;i.gG=1;i.U=U;i.aZ=aZ;i.aV=aV;i.register(this);this.ac.push(i);var b=this.getBuffer(60);if(!b){b=this.getBuffer(ESpans.DAY);}var A;while(b){A=b.begin;while(A){i.bL(A);A=A.next;}b=b.parent;}return i;};this.removeIndicator=function(indicator){for(var j=0;j<this.ac.length;j++){if(this.ac[j]==indicator){var i=this.ac[j];if(--i.gG<=0){this.ac.splice(j,1);i.unregister(this);}return;}}};this.ho=function(s,e,i,c,f){var af=0,ah=0,aQ=i<86400?60:86400;if(f!==true&&aQ==60&&typeof this.cs[60]!='undefined'){var fY=Math.floor(s/ESpans.DAY)*ESpans.DAY;var fH=Math.floor(this.cs[60][0]/ESpans.DAY)*ESpans.DAY;if(fY<fH){i=aQ=86400;}}if(aQ==60){af=((s/86400)|0)*86400;ah=(((e/86400)|0)+1)*86400;}else{af=s-ESpans.YEAR;ah=e+ESpans.YEAR;}if(typeof this.cn[aQ]=='undefined'){this.cn[aQ]=[af,ah];}else{if(this.cn[aQ][0]<=s&&this.cn[aQ][1]>=e){if(c){var b=this.getBuffer(aQ);if(b&&b.size>0){e=Math.min(b.getLastTimestamp(),e);s=Math.min(e,Math.max(s,b.getFirstTimestamp()));c(s,e,i,false);}else{c(false,false,false,false);}}return false;}else{this.cn[aQ][0]=af=Math.min(this.cn[aQ][1],af);this.cn[aQ][1]=ah=Math.max(this.cn[aQ][1],ah);}}var aA=((new Date()).getTime()/1000)|0;if(ah>aA){ah=aA;}var aN=null;if(typeof XMLHttpRequest!='undefined'){aN=new XMLHttpRequest();}else if(window.ActiveXObject){if(navigator.userAgent.toLowerCase().indexOf("msie 5")!= -1){aN=new ActiveXObject("Microsoft.XMLHTTP");}else{aN=new ActiveXObject("Msxml2.XMLHTTP");}}var R=this;aN.onreadystatechange=function(){if(aN.readyState==4){if(aN.status!=200){if(c){c(false,false,false,true);}return;}b=R.getBuffer();var data=eval(aN.responseText);b.hi(af,ah,aQ,data);if(!R.cs[60]){R.cs[60]=[0,0];}R.cs[60][0]=data[0];R.cs[60][1]=data[1];if(f!==true&&aQ==60){var fY=Math.floor(af/ESpans.DAY)*ESpans.DAY;var fH=Math.floor(R.cs[60][0]/ESpans.DAY)*ESpans.DAY;if(fY<fH){R.ho(s,e,ESpans.DAY,c);return;}}var eH=Math.floor(((new Date()).getTime()/1000)/ESpans.DAY)*ESpans.DAY;if(!R.fs&&aQ==60&&af<=eH&&ah>=eH){b=R.getBuffer(aQ);var value=b.begin;if(value){while(value.next&&value.next.timestamp<eH){value=value.next;}if(value.timestamp<eH){R.fs=value;}}}if(c){b=R.getBuffer(aQ);if(b){e=Math.min(b.getLastTimestamp(),e);s=Math.min(e,Math.max(s,b.getFirstTimestamp()));if(s==0)s=false;if(e==0)e=false;}else{s=e=i=false;}c(s,e,i,true);}}};var cFrom=Math.ceil(af/aQ);var cTo=Math.ceil(ah/aQ);var cacheTag=this.aE+"o"+this.aD+"o"+aQ+"o"+cFrom+"o"+cTo;aN.open("GET",this.cz+'history.php?ctag='+cacheTag,true);aN.setRequestHeader("Content-type","application/x-www-form-urlencoded");aN.send(null);return true;};this.T=new ga(this,86400);};ChartSource.prototype.cz='/js/core/chart/';var ChartSourceCache={fU:{},au:[],addName:function(id,name){ChartSourceCache.fU[id]=name;},preload:function(instrumentId,exchangeId,quoteSource,start,end){if(ChartCache._staticCharts){return;}var source=ChartSourceCache.get(instrumentId,exchangeId,quoteSource);var L=end-start>86400?86400:60;if(typeof end=='undefined'){var aA=((new Date()).getTime()/1000)|0;end=Math.ceil(aA/ESpans.DAY)*ESpans.DAY;start=Math.ceil((aA-start)/ESpans.DAY)*ESpans.DAY+1;}source.requestData(start,end,L);},get:function(instrumentId,exchangeId,quoteSource){var s=null;for(var i=0;i<ChartSourceCache.au.length;i++){s=ChartSourceCache.au[i];if(s.aE==instrumentId&&s.aD==exchangeId&&s.bc==quoteSource){return s;}}s=new ChartSource(instrumentId,exchangeId,quoteSource);s.acquire();if(typeof ChartSourceCache.fU[instrumentId]!='undefined'){s.cS=ChartSourceCache.fU[instrumentId];}ChartSourceCache.au.push(s);return s;},remove:function(instrumentId,exchangeId,quoteSource){var s=null;for(var i=0;i<ChartSourceCache.au.length;i++){s=ChartSourceCache.au[i];if(s.aE==instrumentId&&s.aD==exchangeId&&s.bc==quoteSource){s.release();ChartSourceCache.au.splice(i,1);return;}}}};var ChartCache={J:[],eD:null,_staticCharts:null,getUseStaticCharts:function(){if(ChartCache._staticCharts===null){}return ChartCache._staticCharts;},setUseStaticCharts:function(aq){ChartCache._staticCharts=aq;},ib:function(){if(ChartCache.eD===null){if(typeof window.G_vmlCanvasManager!='undefined'&& !Silverlight.isInstalled()){ChartCache.eD=false;}else{ChartCache.eD=true;}}return ChartCache.eD;},remove:function(id){var chart=ChartCache.J[id];if(chart){delete ChartCache.J[id];chart.iD();return true;}return false;},set:function(id,chart){ChartCache.J[id]=chart;},get:function(id){if(typeof ChartCache.J[id]!='undefined'){return ChartCache.J[id];}return null;}};function dj(url){if(navigator.appVersion.indexOf("MSIE")!= -1){document.write('<script type="text/javascript" src="'+url+'"></script>');}else{var script=document.createElement('script');script.src=url;document.body.appendChild(script);}};if(!window.Silverlight){var Silverlight={fL:null,isInstalled:function(d){if(typeof d=='undefined'){d='2.0';}if(Silverlight.fL!==null){return Silverlight.fL;}var c=false,a=null;try{var b=null;if(navigator.appVersion.indexOf("MSIE")!= -1){b=new ActiveXObject("AgControl.AgControl");}else{if(navigator.plugins["Silverlight Plug-In"]){a=document.createElement("div");document.body.appendChild(a);a.innerHTML='<embed type="application/x-silverlight" />';b=a.childNodes[0]}}if(b.IsVersionSupported(d)){c=true;}b=null;Silverlight.fL=true}catch(e){c=false}if(a){document.body.removeChild(a);}return c}}}function useStaticCharts(){fG=StaticCharts.fG;NavBar=StaticCharts.NavBar;Chart=StaticCharts.Chart;Sparkline=StaticCharts.Sparkline;};if(ChartCache.getUseStaticCharts()==1){useStaticCharts();}function initCharts(aF){if(ChartCache.getUseStaticCharts()==1){return;}var c=document.createElement('canvas');var ad;if(!c.getContext){if(!Silverlight.isInstalled()){useStaticCharts();dj(aF+'chart_fallback.js');}else{dj(aF+'excanvas.js');}}else{ad=c.getContext('2d');if(!ad.fillText){dj(aF+'canvas.text.js');}else if(navigator.appVersion.indexOf('iPhone')!= -1){dj(aF+'canvas.text.js?reimplement=true');}}ChartSource.prototype.cz=aF;};
function ChartStyle(){this.showHGrid=false;this.showVGrid=false;this.showMarkers=true;this.showCursor=true;this.showInformation=true;this.showXLabels=true;this.showYLabels=true;this.navBarAreaColor='#0000ff';this.navBarLineColor='#ff0000';this.navBarHandleColor='#ffff00';this.navBarBackgroundColor='#00ff00';this.inactiveColor='rgba(100,100,100,0.1)';this.offset=50;this.candleSpacing=4;this.pointSpacing=2;this.labelSpacing=50;this.xAxisOnTop=true;this.yAxisInside=true;this.hh='mountain';this.candleColor='rgba(101,80,7,1)';this.sliderColor='#ffffff';this.lineColor='rgba(202,165,14,1)';this.indicatorColor=['rgba(202,0,0,1)','rgba(0,202,0,1)','rgba(0,0,202,1)','rgba(202,0,202,1)'];this.benchmarkColor=['rgba(202,0,0,1)','rgba(0,202,0,1)','rgba(0,0,202,1)','rgba(202,0,202,1)'];this.bandColor=['rgba(0,0,202,0.15)'];this.mountainColor=['rgba(254,206,16,1)','rgba(254,206,16,0)'];this.lineWidth=1;this.axisColor='rgba(204,204,204,1)';this.backgroundImage=null;this.backgroundColor=null;this.spanLabelColor='rgba(200,200,200,1)';this.spanLabelFontSize=12;this.spanLabelFontFamily='arial';this.spanLabelFontStyle='';this.infoLabelColor='rgba(200,200,200,1)';this.infoLabelFontSize=32;this.infoLabelFontFamily='arial';this.infoLabelFontStyle='';this.legendLabelColor='rgba(200,200,200,1)';this.legendLabelFontSize=16;this.legendLabelFontFamily='arial';this.legendLabelFontStyle='';this.yLabelColor='rgb(0,0,0)';this.xLabelColor='rgb(0,0,0)';this.xLabelFontSize=12;this.xLabelFontFamily='arial';this.xLabelFontStyle='';this.yLabelFontSize=12;this.yLabelFontFamily='arial';this.yLabelFontStyle='';this.volumeColor='#dddddd';this.volumeUpColor='rgb(0,255,0)';this.volumeDownColor='rgb(255,0,0)';this.candleUpColor='rgb(0,255,0)';this.candleDownColor='rgb(255,0,0)';this.flashUpColor='rgba(0,255,0,0.25)';this.flashDownColor='rgba(255,0,0,0.25)';this.lineFlashUpColor='rgba(0,255,0,1)';this.lineFlashDownColor='rgba(255,0,0,1)';this.vGridColor='rgba(200,200,200,0.5)';this.hGridColor='rgb(200,200,200)';this.referenceLineColor='#aaaaaa';this.markerFontColorClose='rgb(0,0,0)';this.markerColorClose='rgb(150,150,150)';this.markerFontSizeClose=12;this.markerFontFamilyClose='arial';this.markerFontStyleClose='bolder';this.markerFontColorUp='rgb(0,0,0)';this.markerColorUp='rgb(0,255,0)';this.markerFontSizeUp=10;this.markerFontFamilyUp='arial';this.markerFontStyleUp='';this.markerFontColorDown='rgb(0,0,0)';this.markerColorDown='rgb(255,0,0)';this.markerFontSizeDown=10;this.markerFontFamilyDown='arial';this.markerFontStyleDown='';this.markerFontColor='rgb(0,0,0)';this.markerColor='rgb(255,255,0)';this.markerFontSize=12;this.markerFontFamily='arial';this.markerFontStyle='bolder';this.markerFontColorCursorY='rgb(255,255,255)';this.markerColorCursorY='rgb(255,0,0)';this.markerFontSizeCursorY=14;this.markerFontFamilyCursorY='arial';this.markerFontStyleCursorY='bolder';this.markerFontColorCursorX='rgb(255,255,255)';this.markerColorCursorX='rgb(255,0,0)';this.markerFontSizeCursorX=14;this.markerFontFamilyCursorX='arial';this.markerFontStyleCursorX='bolder';this.cursorColor='rgba(255,0,0,0.2)';this.xAxisMargins=[5,50];this.yAxisMargins=[20,20];};
var StaticCharts={NavBar:function(set){this.C=set;this.H=100;this.aG=0;},fG:function(set){this.C=set;this.aI='line';this.H=100;this.aG=0;this.dk=true;this.fe=set.B.showMarkers;this.fd=set.B.showInformation;this.eq=set.B.showXLabels;this.ee=set.B.showYLabels;this.dQ=set.B.showCursor;this.dk=true;this.ac=[];this.ao=[];this.setYAxisMargins=function(bottom,top){this.bP=[bottom,top];};this.setHeight=function(h){this.H=h;this.C.aJ();};this.setType=function(type){if(!(type=='candle'||type=='mountain'||type=='line'||type=='ohlc')){return;}if(type==this.aI){return;}this.aI=type;this.C.aJ();};this.showCursor=function(aq){this.dQ=aq;this.bo=null;};this.showMarkers=function(aq){this.fe=aq;};this.showInformation=function(aq){this.fd=aq;};this.showLabels=function(x,y){this.eq=x;this.ee=y;};this.showData=function(aq){if(aq===true){this._content=1;}else if(typeof aq=='number'){this._content=aq;}else{this._content=2;}};this.addBenchmark=function(instrumentId,exchangeId,quoteSource){this.ao.push({instrumentId:instrumentId,exchangeId:exchangeId,quoteSource:quoteSource});};this.removeBenchmark=function(index){if(index<0||index>=this.ao.length){return;}this.ao.splice(index,1);};this.getNumBenchmarks=function(){return this.ao.length;};this.addTool=function(cB){};this.removeTool=function(i){if(i<0||i>=this.aB.length){return;}this.aB.splice(i,1);this.V();};this.getNumTools=function(){return this.aB.length;};this.getTool=function(){if(i<0||i>=this.aB.length){return null;}return this.aB[i];};this.getNumIndicators=function(){return this.ac.length;};this.getIndicator=function(i){if(i<0||i>=this.ac.length){return null;}return this.ac[i];};this.getIndicatorColor=function(i){if(i<0){return '';}return this.C.B.indicatorColor[i<this.C.B.indicatorColor.length?i:0];};this.addIndicator=function(type,U,aZ,aV){this.ac.push({})};this.removeIndicator=function(index){if(index<0||index>=this.ac.length){return;}this.ac.splice(index,1);};this.isEndVisible=function(end){return false;};},Chart:function(id,instrumentId,exchangeId,quoteSource,allowScroll){if(ChartCache.get(id)!==null&&console&&console.dL){console.dL('[Chart] chart with id \''+id+'\' already exists!');}ChartCache.set(id,this);this.J=[];this.aE=instrumentId;this.aD=exchangeId;this.bc=quoteSource;this.H=[500,500];this.ab=[0,0];this.aa=0;this.B=new ChartStyle();this.cq=null;this.dU=null;this.bs=null;this.cc=false;this.be=id;this.hP=function(){if(ChartCache.getUseStaticCharts()){return true;}var gQ=document.cookie.split(';');var eL='',gP='',jC='';for(var i=0;i<gQ.length;i++){eL=gQ[i].split('=');gP=eL[0].replace(/^\s+|\s+$/g,'');if(gP=='chart_fallback_nag'){if(eL.length>1){return unescape(eL[1].replace(/^\s+|\s+$/g,''))=='1'?true:false;}break;}}return false;},this.ir=function(aq){var expires=new Date();expires.setTime((new Date()).getTime()+86400*3*1000*(aq?1: -1));aq=aq?'1':'0';document.cookie="chart_fallback_nag="+aq+";expires="+expires.toGMTString()+";aF=/;domain="+document.domain;};var e=document.getElementById(id);if(!e){throw "[Chart] element with id '"+id+"' does not exist!";}e.innerHTML='';e.style.position='relative';if(typeof e=='undefined'||e===null){return null;}this.H[0]=e.offsetWidth;this.H[1]=e.offsetHeight;var img=document.createElement('img');e.appendChild(img);var R=this;if(!this.hP()){var by=document.createElement('div');by.style.position='absolute';by.style.left='0px';by.style.top='0px';by.style.background='#ffffff url('+ChartSource.prototype.cz+'bg_silverlight.jpg) left bottom repeat-x';by.style.opacity='0.8';by.style.padding='10px';by.style.filter="alpha(opacity = 80)";by.style.width=(this.H[0]-20)+'px';bk=document.createElement('a');bk.href='#';bk.onclick=function(){R.iJ();return false;};bk.style.position='absolute';bk.style.right='5px';bk.style.top='5px';fX=document.createElement('img');fX.src=ChartSource.prototype.cz+'icon_x_silverlight.gif';fX.style.border='none';bk.appendChild(fX);by.appendChild(bk);var bk=document.createElement('a');bk.href='http://go2.microsoft.com/fwlink/?LinkID=114576';bk.style.textDecoration='none';var span=document.createElement('span');span.innerHTML='Installieren Sie Silverlight, um die interaktiven Realtime-Push-Charts auf dieser Seite nutzen zu k&ouml;nnen.';span.style.fontSize='14px';span.style.fontWeight='bold';span.style.color='#004c84';span.style.display='block';bk.appendChild(span);var span=document.createElement('span');span.innerHTML='4 MB Download - 20 Sek. Installationszeit - kostenlos!';span.style.fontSize='11px';span.style.fontWeight='bold';span.style.color='#FFF';span.style.display='block';bk.appendChild(span);by.appendChild(bk);e.appendChild(by);this.dU=by;}else{this.dU=null;}var f=function(e){R.bB(e);return false;};function ak(e,name,f){if(e.addEventListener){e.addEventListener(name,f,false);}else{e.attachEvent('on'+name,f);}};ak(img,'contextmenu',f);ak(img,'mousedown',f);ak(img,'mouseup',f);this.cq=img;this.aJ=function(){var type='line';var gZ='';if(this.J.length>0){type=this.J[0].aI;if(this.J[0].ao.length>0){gZ='&benchInstrumentId='+this.J[0].ao[0].instrumentId+'&benchExchangeId='+this.J[0].ao[0].exchangeId;}}this.cq.src='/content/charts/fallback.php?height='+this.H[1]+'&width='+this.H[0]+gZ+'&from='+this.ab[0]+'&to='+this.ab[1]+'&intv='+this.aa+'&type='+type+'&instrumentId='+this.aE+'&exchangeId='+this.aD;};this.iJ=function(){var e=document.getElementById(id);e.removeChild(this.dU);this.ir(true);};this.bQ=function(cursor){if(cursor==''){cursor='pointer';}this.cq.style.cursor=cursor;};this.bB=function(event){if(this.cc){var button=e.which?e.which:e.button;if(e.type=='mousedown'&&button==1&&this.bs){document.location=this.bs;}return;}e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}if(e.preventDefault){e.preventDefault();}e.returnValue=false;return false;};this.aK=function(span){if(typeof span=='undefined'){span=this.ab[1]-this.ab[0];}var am=[ESpans.MONTH,ESpans.WEEK,ESpans.DAY,ESpans.HOUR,ESpans.THIRTY_MINUTES,ESpans.FIFTEEN_MINUTES,ESpans.FIVE_MINUTES,ESpans.MINUTE];var w=this.B.pointSpacing+1;for(var c=0;c<this.J.length;c++){if(this.J[c].aI=='candle'||this.J[c].aI=='ohlc'){w=this.B.candleSpacing+6;break;}}var n=0;for(var i=am.length;i>=0;i--){n=span/am[i];if(am[i]<span&&this.H[0]/n>=w){return am[i];}}if(span<=86400){return ESpans.MINUTE;}else{return ESpans.MONTH;}};this.setSource=function(source){this.aE=source.aE;this.aD=source.aD;this.bc=source.bc;this.aJ();};this.setInstrument=function(instrumentId,exchangeId,quoteSource){this.aE=instrumentId;this.aD=exchangeId;this.bc=quoteSource;this.aJ();};this.getSource=function(){return{};};this.setLocked=function(aq){if(this.bs){this.bQ('pointer');}this.cc=aq;};this.setLink=function(link){if(this.cc){this.bQ('pointer');}this.bs=link;};this.setSize=function(x,y){this.H=[x,y];var e=document.getElementById(id);e.style.width=x+'px';e.style.height=y+'px';if(this.dU){this.dU.style.width=(this.H[0]-20)+'px';}this.aJ();};this.setStyle=function(style){this.B=style;this.aJ();};this.zoom=function(l,r,load){};this.scroll=function(s,load){};this.setReferenceSpan=function(span){};this.setSpanSimple=function(span,L,offset){var aA=((new Date()).getTime()/1000)|0;var end=Math.ceil(aA/ESpans.DAY)*ESpans.DAY;var start=Math.ceil((aA-span)/ESpans.DAY)*ESpans.DAY+1;this.setSpan(start,end,L,offset);};this.setInterval=function(i){this.aa=i;this.aJ();};this.setSpan=function(start,end,L,offset){if(typeof L!='number'){L=this.aK(end-start);}this.aa=L;this.ab=[start,end];this.aJ();};this.V=function(){};this.addNavBar=function(h){var y=0;for(var i=0;i<this.J.length;i++){y+=this.J[i].H;}var w=this.H[0];if(typeof h!='number'){if(this.J.length==0&&this.H[1]>0){h=this.H[1];}else{h=100;}}var chart=new NavBar(this);chart.H=h;chart.aG=y;this.J.push(chart);this.aJ();return chart;};this.addVolumeChart=function(h){var chart=this.addChart(h,false);chart.showData(3);chart.showLabels(false,true);chart.showMarkers(false);chart.showInformation(false);chart.showCursor(false);return chart;};this.addIndicatorChart=function(h){var chart=this.addChart(h);chart.showData(2);chart.showLabels(false,true);chart.showCurrentValue(false);chart.showInformation(false);chart.showCursor(false);return chart;};this.addChart=function(h,showBackgroundImage){var y=0;for(var i=0;i<this.J.length;i++){y+=this.J[i].H;}var w=this.H[0];if(typeof h!='number'){if(this.J.length==0&&this.H[1]>0){h=this.H[1];}else{h=100;}}var chart=new fG(this);chart.H=h;chart.aG=y;chart.dk=typeof showBackgroundImage=='undefined'||showBackgroundImage?true:false;chart.setType(this.B.hh);this.J.push(chart);this.aJ();return chart;};this.removeChart=function(index){if(index<0||index>=this.J.length){return;}this.J.splice(index,1);this.aJ();};this.moveChart=function(index,bm){if(index<0||bm<0||index>=this.J.length||bm>=this.J.length){return;}var dK=this.J[index];this.J[index]=this.J[bm];this.J[bm]=dK;this.aJ();};this.getNumCharts=function(){return this.J.length;};this.getChart=function(i){if(i<0||i>=this.J.length){return null;}return this.J[i];};this.saveImage=function(c){if(typeof c=='function'){c(this.cq.src);}};this.aJ();},Sparkline:function(id,instrumentId,exchangeId,quoteSource){if(ChartCache.get(id)!==null&&console&&console.dL){console.dL('[Sparkline] sparkline with id \''+id+'\' already exists!');}ChartCache.set(id,this);this.H=[0,0];this.ab=[0,0];this.B=new SparklineStyle();this.aE=instrumentId;this.aD=exchangeId;this.bc=quoteSource;var e=document.getElementById(id);if(!e){throw "[Sparkline] element with id '"+id+"' does not exist!";}e.innerHTML='';e.style.position='relative';if(typeof e=='undefined'||e===null){return null;}this.H[0]=e.offsetWidth;this.H[1]=e.offsetHeight;var img=document.createElement('img');e.appendChild(img);this.cq=img;var R=this;var f=function(e){R.bB(e);return false;};function ak(e,name,f){if(e.addEventListener){e.addEventListener(name,f,false);}else{e.attachEvent('on'+name,f);}};ak(img,'contextmenu',f);ak(img,'mousedown',f);ak(img,'mouseup',f);this.setOffsetValue=function(value){this.en=value;};this.setStyle=function(style){this.B=style;};this.setType=function(type){if(type=='histogram'||type=='line'){this.B.type=type;this.aJ();}};this.V=function(){};this.getBegin=function(){};this.getEnd=function(){};this.getHigh=function(){};this.getLow=function(){};this.setSource=function(source){this.aE=source.aE;this.bc=source.bc;this.aD=source.aD;this.aJ();};this.setInstrument=function(instrumentId,exchangeId,quoteSource){this.aE=instrumentId;this.aD=exchangeId;this.bc=quoteSource;this.aJ();};this.setSize=function(w,h){this.cq.style.width=w+'px';this.cq.style.height=h+'px';this.H=[w,h];this.aa=this.aK();this.aJ();};this.setSpanSimple=function(span,L,offset){var aA=((new Date()).getTime()/1000)|0;var end=Math.ceil(aA/ESpans.DAY)*ESpans.DAY;var start=Math.ceil((aA-span)/ESpans.DAY)*ESpans.DAY+1;this.setSpan(start,end,L,offset);};this.setSpan=function(start,end,L,offset){if(typeof L!='number'){L=this.aK(end-start);}this.aa=this.aK(end-start);this.ab=[start,end];this.aJ();};this.aJ=function(){this.cq.src='/content/charts/sparkline.php?height='+this.H[1]+'&width='+this.H[0]+'&from='+this.ab[0]+'&to='+this.ab[1]+'&intv='+this.aa+'&type='+this.B.type+'&instrumentId='+this.aE+'&exchangeId='+this.aD;};this.bB=function(event){if(this.cc){var button=e.which?e.which:e.button;if(e.type=='mousedown'&&button==1&&this.bs){document.location=this.bs;}return;}e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}if(e.preventDefault){e.preventDefault();}e.returnValue=false;return false;};this.aK=function(span){if(typeof span=='undefined'){span=this.ab[1]-this.ab[0];}var am=[ESpans.MONTH,ESpans.WEEK,ESpans.DAY,ESpans.HOUR,ESpans.THIRTY_MINUTES,ESpans.FIFTEEN_MINUTES,ESpans.FIVE_MINUTES,ESpans.MINUTE];var n=0;for(var i=am.length;i>=0;i--){n=span/am[i];if(am[i]<span&&this.H[0]/n>=1){return am[i];}}if(span<=86400){return ESpans.MINUTE;}else{return ESpans.MONTH;}}}};

