var $_={fn:function(){return function(){}},merge:function(){var E={};for(var D=0,A=arguments.length;D<A;D++){var B=arguments[D];if(typeof B!="object"){continue}for(var C in B){var G=B[C],F=E[C];E[C]=(F&&typeof G=="object"&&typeof F=="object")?this.merge(F,G):this.unlink(G)}}return E},unlink:function(C){var B=null;switch(typeof C){case"object":B={};for(var E in C){B[E]=this.unlink(C[E])}break;case"array":B=[];for(var D=0,A=C.length;D<A;D++){B[D]=this.unlink(C[D])}break;default:return C}return B}};var Config={orientation:"left",labelContainer:"label_container",levelsToShow:2,offsetBase:8,Label:{height:26,realHeight:20,width:95,realWidth:90,offsetHeight:30,offsetWidth:30},Node:{strokeStyle:"#ccb",fillStyle:"#ccb",strokeStyleInPath:"#eed",fillStyleInPath:"#ff7",mode:"fill",style:"squared"},animationTime:700,fps:25};var Canvas=function(A){if("function"==typeof(HTMLCanvasElement)||"object"==typeof(HTMLCanvasElement)){this.canvasId=A;if((this.canvas=document.getElementById(this.canvasId))&&this.canvas.getContext){this.ctx=this.canvas.getContext("2d");this.ctx.fillStyle=Config.Node.fillStyle||"black";this.ctx.strokeStyle=Config.Node.strokeStyle||"black";this.setPosition();this.translateToCenter()}else{throw"canvas object with id "+A+" not found"}}else{throw"your browser does not support canvas. Try viewing this page with firefox, safari or opera 9.5"}};Canvas.prototype={getContext:function(){return this.ctx},makeNodeStyleSelected:function(A,B){this.ctx[B+"Style"]=(A)?Config.Node[B+"StyleInPath"]:Config.Node[B+"Style"]},makeEdgeStyleSelected:function(A){this.ctx.strokeStyle=(A)?Config.Node.strokeStyleInPath:Config.Node.strokeStyle;this.ctx.lineWidth=(A)?2:1},makeRect:function(C,B,A){if(B=="fill"||B=="stroke"){this.makeNodeStyleSelected(A,B);this.ctx[B+"Rect"](C.x1,C.y1,C.x2,C.y2)}else{throw"parameter not recognized "+B}},setPosition:function(){var A=this.canvas;var B=curtop=0;if(A.offsetParent){B=A.offsetLeft;curtop=A.offsetTop;while(A=A.offsetParent){B+=A.offsetLeft;curtop+=A.offsetTop}}this.position={x:B,y:curtop}},getPosition:function(){return this.position},clear:function(){this.ctx.clearRect(-this.getSize().x/2,-this.getSize().x/2,this.getSize().x,this.getSize().x)},clearRectangle:function(D,B,A,C){this.ctx.clearRect(C,D-2,B-C+2,Math.abs(A-D)+5)},translateToCenter:function(){this.ctx.translate(this.getSize().x/2,this.getSize().y/2)},getSize:function(){return{x:this.canvas.width,y:this.canvas.height}},path:function(A,B){this.ctx.beginPath();B(this.ctx);this.ctx[A]();this.ctx.closePath()}};var Complex=function(){if(arguments.length>1){this.x=arguments[0];this.y=arguments[1]}else{this.x=null;this.y=null}};Complex.prototype={clone:function(){return new Complex(this.x,this.y)},norm:function(){return Math.sqrt(this.squaredNorm())},squaredNorm:function(){return this.x*this.x+this.y*this.y},add:function(A){return new Complex(this.x+A.x,this.y+A.y)},prod:function(A){return new Complex(this.x*A.x-this.y*A.y,this.y*A.x+this.x*A.y)},conjugate:function(){return new Complex(this.x,-this.y)},scale:function(A){return new Complex(this.x*A,this.y*A)},$add:function(A){this.x+=A.x;this.y+=A.y;return this},$prod:function(C){var A=this.x,B=this.y;this.x=A*C.x-B*C.y;this.y=B*C.x+A*C.y;return this},$conjugate:function(){this.y=-this.y;return this},$scale:function(A){this.x*=A;this.y*=A;return this},$div:function(D){var A=this.x,C=this.y;var B=D.squaredNorm();this.x=A*D.x+C*D.y;this.y=C*D.x-A*D.y;return this.$scale(1/B)}};var Tree=function(A){(function(C,D){Tree.Node(C,D);for(var B=0;B<C.children.length;B++){arguments.callee(C.children[B],C)}})(A,null)};Tree.Node=function(A,B){A.selected=false;A.drawn=false;A.exist=false;A._parent=B;A.pos=new Complex(0,0);A.startPos=new Complex(0,0);A.endPos=new Complex(0,0);A.startAlpha=1;A.endAlpha=1;A.alpha=1};Tree.Util={set:function(A,C,D){if(typeof C=="object"){for(var E in C){A[E]=C[E]}}else{if(typeof C=="array"){for(var B=0;B<C.length;B++){A[C[B]]=D}}else{A[C]=D}}},addSubtree:function(A,D,C){var B=this.getSubtree(A,D);Tree(C);if(D==C.id){B.children=B.children.concat(C.children);Tree.Children.each(B,function(E){E._parent=B})}else{B.children.push(C);C._parent=B}return C},removeSubtree:function(A,F,B){var C=this.getSubtree(A,F);var D=C._parent;if(!B){delete C.children;C.children=[]}else{var E=new Array();Tree.Children.each(D,function(G){if(F!=G.id){E.push(G)}});D.children=E}},each:function(A,B){this.eachLevel(A,0,Number.MAX_VALUE,B)},eachLevel:function(A,B,C,F){if(B<=C){F(A,B);var E=A.children;for(var D=0;D<E.length;D++){this.eachLevel(E[D],B+1,C,F)}}},atLevel:function(A,C,B){this.eachLevel(A,0,C,function(E,D){if(D==C){B(E)}})},getLevel:function(A){var B=function(C,D){if(C._parent==null){return D}else{return B(C._parent,D+1)}};return B(A,0)},getRoot:function(A){if(A._parent==null){return A}return this.getRoot(A._parent)},getLeaves:function(A){var B=new Array();this.eachLevel(A,0,Config.levelsToShow,function(D,C){if(D.drawn&&!Tree.Children.children(D,"exist")){B.push(D);D._level=Config.levelsToShow-C}});return B},getSubtree:function(A,C){var B=null;this.each(A,function(D){if(D.id==C){B=D}});return B}};Tree.Children={each:function(A,D){for(var B=0,C=A.children;B<C.length;B++){D(C[B])}},children:function(A,D){for(var B=0,C=A.children;B<C.length;B++){if(!D||C[B][D]){return true}}return false},getChildren:function(A,E){for(var C=0,B=new Array(),D=A.children;C<D.length;C++){if(!E||D[C][E]){B.push(D[C])}}return B},getLength:function(A,E){if(!E){return A.children.length}for(var C=0,B=0,D=A.children;C<D.length;C++){if(D[C][E]){B++}}return B}};Tree.Group={requestNodes:function(E,D){var C=0,A=E.length,G={};var B=function(){D.onComplete()};if(A==0){B()}for(var F=0;F<A;F++){G[E[F].id]=E[F];D.request(E[F].id,E[F]._level,{onComplete:function(K,J){if(J&&J.children){Tree(J);for(var H=0,I=J.children;H<I.length;H++){I[H]._parent=G[K]}G[K].children=J.children}if(++C==A){B()}}})}},hide:function(C,D,B){C=this.getNodesWithChildren(C);var A=D.getContext();for(var E=0;E<C.length;E++){Tree.Children.each(C[E],function(G){Tree.Plot.hideLabels(G,true)})}A.save();var F={compute:function(J){for(var G=0;G<C.length;G++){A.save();var H=C[G];var I=Tree.Geometry.getBoundingBox(H);D.clearRectangle(I.top,I.right,I.bottom,I.left);if(J==1){J=0.99}Tree.Plot.plot(H,D,B,1-J);A.restore()}},complete:function(){A.restore();for(var G=0;G<C.length;G++){if(!B||!B.request){if(Tree.Children.children(C[G],"exist")){Tree.Util.each(C[G],function(H){Tree.Util.set(H,{drawn:false,exist:false})});Tree.Util.set(C[G],{drawn:true,exist:true})}}else{delete C[G].children;C[G].children=[]}}B.onComplete()}};Animation.controller=F;Animation.start()},show:function(C,D,B){C=this.getNodesWithChildren(C),newNodes=new Array();var A=D.getContext();for(var E=0;E<C.length;E++){if(!Tree.Children.children(C[E],"drawn")){newNodes.push(C[E]);Tree.Util.eachLevel(C[E],0,Config.levelsToShow,function(G){if(G.exist){G.drawn=true}})}}C=newNodes;A.save();var F={compute:function(J){for(var G=0;G<C.length;G++){A.save();var H=C[G];var I=Tree.Geometry.getBoundingBox(H);D.clearRectangle(I.top,I.right,I.bottom,I.left);Tree.Plot.plot(H,D,B,J);A.restore()}},complete:function(){A.restore();for(var G=0;G<C.length;G++){var H=C[G];var I=Tree.Geometry.getBoundingBox(H);D.clearRectangle(I.top,I.right,I.bottom,I.left);Tree.Plot.plot(H,D,B)}B.onComplete()}};Animation.controller=F;Animation.start()},getNodesWithChildren:function(B){var A=new Array();for(var C=0;C<B.length;C++){if(Tree.Children.children(B[C],"exist")){A.push(B[C])}}return A}};Tree.Plot={plot:function(A,D,C,F){if(F>=0){A.drawn=false;var B=D.getContext();var E=Tree.Geometry.getScaledTreePosition(A,F);B.translate(E.x,E.y);B.scale(F,F)}this.plotTree(A,D,!F,C);if(F>=0){A.drawn=true}},plotTree:function(A,E,D,C){var G=this,B=E.getContext();var F=Tree.Geometry.getEdge(A.pos,"begin");Tree.Children.each(A,function(J){if(J.exist){var H=Tree.Geometry.getEdge(J.pos,"end");if(J.drawn){var I={nodeFrom:A,nodeTo:J};C.onBeforePlotLine(I);B.globalAlpha=Math.min(A.alpha,J.alpha);G.plotEdge(F,H,E,A.selected&&J.selected);C.onAfterPlotLine(I)}G.plotTree(J,E,D,C)}});if(A.drawn&&A.exist){B.globalAlpha=A.alpha;this.plotNode(A,E);if(D&&B.globalAlpha>=0.95){Tree.Label.plotOn(A,E)}else{Tree.Label.hide(A)}}},plotNode:function(B,A){if(Config.Node.style=="squared"){this.plotNodeSquared(B,A)}else{throw"parameter not recognized "+Config.Node.style}},plotNodeSquared:function(D,B){var F=D.pos,C=D.selected,A=Config.Label;var E={x1:F.x,y1:F.y-A.height+(A.height-A.realHeight)/2,x2:A.realWidth,y2:A.realHeight};B.makeRect(E,Config.Node.mode,C)},plotEdge:function(D,A,B,C){B.makeEdgeStyleSelected(C);B.path("stroke",function(E){E.moveTo(D.x,D.y);E.lineTo(A.x,A.y)})},hideLabels:function(C,B){var A=Tree.Label;Tree.Util.each(C,function(D){if(B){A.hide(D)}else{A.show(D)}})},animate:function(A,E,B){var G=this;var C=function(J,I,H){return(I.$add(J.scale(-1))).$scale(H).$add(J)};var D=function(H,K){var J=H.startPos.clone();var I=H.endPos.clone();H.pos=C(J,I,K)};var F={compute:function(H){E.clear();Tree.Util.each(A,function(I){D(I,H)});G.plot(A,E,B)},complete:function(){Tree.Util.each(A,function(H){H.startPos=H.pos});G.plot(A,E,B);B.onComplete()}};Animation.controller=F;Animation.start()},fade:function(A,E,B){var G=this;var C=function(J,I,H){return J+(I-J)*H};var D=function(H,K){var J=H.startAlpha;var I=H.endAlpha;H.alpha=C(J,I,K)};var F={compute:function(H){E.clear();Tree.Util.each(A,function(I){D(I,H)});G.plot(A,E,B)},complete:function(){Tree.Util.each(A,function(H){H.startAlpha=H.alpha});G.plot(A,E,B);B.onComplete()}};Animation.controller=F;Animation.start()}};Tree.Label={nodeHash:{},container:false,st:null,chk:function(A){if(!(A.id in this.nodeHash)){this.init(A)}return this.nodeHash[A.id]},init:function(C){var B=this.st;if(!(C.id in this.nodeHash)){if(!this.container){this.container=document.getElementById(Config.labelContainer)}var A=document.createElement("a");A.id=C.id;A.href="#";A.onclick=function(){B.onClick(C.id);return false};A.innerHTML=C.name;this.container.appendChild(A);B.controller.onCreateLabel(A,C);this.nodeHash[C.id]=A}this.setClass(C,"node hidden");this.setDimensions(C)},plotOn:function(B,A){var C=B.pos;if(this.fitsInCanvas(C,A)){this.setDivProperties(B,"node",A)}else{this.hide(B)}},fitsInCanvas:function(C,A){var B=A.getSize();return !(Math.abs(C.x+Config.Label.width/2)>=B.x/2||Math.abs(C.y)>=B.y/2)},setDivProperties:function(E,C,D){var B=D.getSize(),A=D.getPosition(),H=E.pos;var F={x:Math.round(H.x+A.x+B.x/2),y:Math.round(H.y+A.y+B.y/2-Config.Label.height)};var G=this.chk(E);G.style.top=F.y+"px";G.style.left=F.x+"px";this.removeClass(E,"hidden");this.setDimensions(E)},addClass:function(C,A){var B=this.chk(C);if(!this.hasClass(C,A)){var D=B.className.split(" ");D.push(A);B.className=D.join(" ")}},setDimensions:function(B){var A=this.chk(B);A.style.width=Config.Label.realWidth+"px";A.style.height=Config.Label.realHeight+"px";this.st.controller.onPlaceLabel(A,B)},removeClass:function(E,A){var D=this.chk(E);var F=D.className.split(" ");var B=false;for(var C=0;C<F.length&&!B;C++){if(F[C]==A){F.splice(C,1);B=true}}D.className=F.join(" ")},hasClass:function(C,A){var D=this.chk(C).className.split(" ");for(var B=0;B<D.length;B++){if(A==D[B]){return true}}return false},setClass:function(B,A){this.chk(B).className=A},hide:function(A){this.addClass(A,"hidden")},show:function(A){this.removeClass(A,"hidden")}};Tree.Geometry={left:function(){return Config.orientation=="left"},switchOrientation:function(){Config.orientation=this.left()?"top":"left"},getSize:function(C){var A=Config.Label.width,B=Config.Label.height;if(!C){return(this.left())?A:B}else{return(this.left())?B:A}},getOffsetSize:function(){return(!this.left())?Config.Label.offsetHeight:Config.Label.offsetWidth},translate:function(A,C,B){Tree.Util.each(A,function(D){D[B].$add(C)})},getBoundingBox:function(A){var C=Config.Label,D=A.pos;var B={top:D.y,bottom:D.y,right:D.x,left:D.x};this.calculateCorners(A,B);if(this.left()){return{left:B.left+C.realWidth,bottom:B.bottom,top:B.top-C.height,right:B.right+C.width}}else{return{left:B.left,bottom:B.bottom,top:B.top,right:B.right+C.width}}},calculateCorners:function(A,B){var E=A.pos;if(A.exist){if(B.top>E.y){B.top=E.y}if(B.bottom<E.y){B.bottom=E.y}if(B.right<E.x){B.right=E.x}if(B.left>E.x){B.left=E.x}for(var C=0,D=A.children;C<D.length;C++){this.calculateCorners(D[C],B)}}},getBaseSize:function(A,B,D){var C=this.getSize(true);if(B){return(D=="available")?C:Tree.Children.getLength(A,"exist")*C+Config.offsetBase}return this.getTreeBaseSize(A,"expanded")},getTreeBaseSize:function(A,G,H){var E=this.getSize(true),C=function(I,K,J){return K==0||(J=="expanded")?Tree.Children.getLength(I,"exist")==0:I.children.length==0};H=(arguments.length==3)?H:Number.MAX_VALUE;if(C(A,H,G)){return E}for(var D=0,F=A.children,B=0;D<F.length;D++){B+=this.getTreeBaseSize(F[D],G,H-1)}return B+Config.offsetBase},getEdge:function(D,A){var C=Config.Label,B=this.left();if(A=="begin"){return B?D.add(new Complex(C.realWidth,-C.height/2)):D.add(new Complex(C.realWidth/2,(C.realHeight-C.height)/2))}else{if(A=="end"){return B?D.add(new Complex(0,-C.height/2)):D.add(new Complex(C.realWidth/2,-C.realHeight))}}},getScaledTreePosition:function(B,D){var C=Config.Label.width,A=Config.Label.height;if(this.left()){return B.pos.add(new Complex(C,-A/2)).$scale(1-D)}return B.pos.add(new Complex(C/2,0)).$scale(1-D)},treeFitsInCanvas:function(A,B,E){var C=(this.left())?B.getSize().y:B.getSize().x;var D=this.getTreeBaseSize(A,"exist",E);return(D<C)},getFirstPos:function(D,A){var C=this.getSize()+this.getOffsetSize(),B=-A/2+Config.offsetBase/2;return this.left()?new Complex(D.x+C,D.y+B):new Complex(D.x+B,D.y+C)},nextPosition:function(B,A){return this.left()?new Complex(B.x,B.y+A):new Complex(B.x+A,B.y)},setRightLevelToShow:function(A,B){var C=this.getRightLevelToShow(A,B);Tree.Util.eachLevel(A,0,Config.levelsToShow,function(E,D){if(D>C){E.drawn=false;E.exist=false;Tree.Label.hide(E)}else{E.exist=true}});A.drawn=true},getRightLevelToShow:function(A,B){var C=Config.levelsToShow;while(!this.treeFitsInCanvas(A,B,C)&&C>1){C--}return C}};var ST=function(C,A){var B={onBeforeCompute:$_.fn(),onAfterCompute:$_.fn(),onCreateLabel:$_.fn(),onPlaceLabel:$_.fn(),onCreateElement:$_.fn(),onComplete:$_.fn(),onBeforePlotLine:$_.fn(),onAfterPlotLine:$_.fn(),request:false};this.controller=$_.merge(B,A);this.canvas=C;this.tree=null;this.clickedNode=null;Tree.Label.st=this;Animation.fps=Config.fps;Animation.duration=Config.animationTime};ST.prototype={loadFromJSON:function(A){this.tree=A;Tree(A)},compute:function(){Tree.Util.set(this.tree,{drawn:true,exist:true,selected:true});this.calculatePositions(this.tree,new Complex(0,0),"startPos")},calculatePositions:function(O,F,L,G){var C=Tree.Geometry,M=Tree.Children,G=(arguments.length==3)?true:G;if(this.clickedNode&&(O.id==this.clickedNode.id)&&G){G=false}O[L]=F;var A=Tree.Children.getChildren(O,"exist");if(A.length>0){var I=C.getBaseSize(O,G);var K=C.getBaseSize(A[0],G,"available");var D=(A.length==1)?Config.offsetBase:I-K;var B=A[0][L]=C.getFirstPos(F,D);this.calculatePositions(A[0],B,L,G);for(var H=1;H<A.length;H++){var J=!M.children(A[H],"exist")||!M.children(A[H-1],"exist");var N=C.getBaseSize(A[H],G,"available");var E=J?C.getSize(true):(K+N)/2;B=C.nextPosition(B,E);K=N;this.calculatePositions(A[H],B,L,G)}}},plot:function(){Tree.Plot.plot(this.tree,this.canvas,this.controller)},switchPosition:function(E){var B=Tree.Geometry,C=Tree.Plot,A=this.tree,D=this;if(!C.busy){C.busy=true;this.contract({onComplete:function(){B.switchOrientation();D.calculatePositions(A,new Complex(0,0),"endPos");C.busy=false;D.onClick(D.clickedNode.id,E)}},true)}},requestNodes:function(B,C){var A=$_.merge(this.controller,C);if(A.request){Tree.Group.requestNodes(Tree.Util.getLeaves(B),A)}else{A.onComplete()}},contract:function(F,H){var B=Tree.Geometry,G=Tree.Util,D=Tree.Group;var A=this.clickedNode;var E=function(I,K){var M=G.getLevel(I),J=G.getRoot(I),L=new Array();G.eachLevel(J,0,M,function(O,N){if(O.exist&&!O.selected){L.push(O)}});M=B.getRightLevelToShow(I,K);G.atLevel(I,M,function(O,N){if(O.exist){L.push(O)}});return L};if(H){B.switchOrientation()}var C=E(A,this.canvas);if(H){B.switchOrientation()}D.hide(C,this.canvas,$_.merge(this.controller,F))},move:function(A,B){this.calculatePositions(this.tree,new Complex(0,0),"endPos");Tree.Geometry.translate(this.tree,A.endPos.scale(-1),"endPos");Tree.Plot.animate(this.tree,this.canvas,$_.merge(this.controller,B))},expand:function(B,C){var A=new Array();Tree.Util.eachLevel(B,0,Config.levelsToShow,function(E,D){if(!Tree.Children.children(E,"drawn")){A.push(E)}});Tree.Group.show(A,this.canvas,$_.merge(this.controller,C))},selectPath:function(B,A){(function(C,D){if(C==null){return arguments.callee}C.selected=D;return arguments.callee(C._parent,D)})(A,false)(B,true)},addSubtree:function(G,C,F,D){var E=Tree.Util,B=this,A=E.addSubtree(this.tree,G,C);if(F=="replot"){this.onClick(this.clickedNode.id,$_.merge({onMoveComplete:function(){E.each(A,function(H){H.drawn=H.exist})},onExpandComplete:function(){B.canvas.clear();B.plot()}},D))}else{if(F=="animate"){this.onClick(this.clickedNode.id,{onMoveComplete:function(){E.each(A,function(H){H.drawn=H.exist})},onExpandComplete:function(){E.each(A,function(H){E.set(H,{drawn:H.exist,startAlpha:H.exist?0:1,endAlpha:1,alpha:H.exist?0:1,})});Tree.Plot.fade(B.tree,B.canvas,$_.merge(B.controller,D))}})}}},removeSubtree:function(G,B,F,D){var E=Tree.Util,C=this;if(F=="replot"){this.onClick(this.clickedNode.id,$_.merge({onContractComplete:function(){Tree.Plot.hideLabels(E.getSubtree(C.tree,G),true);E.removeSubtree(C.tree,G,B)}},D))}else{if(F=="animate"){var A=E.getSubtree(this.tree,G);E.each(A,function(H){E.set(H,{drawn:H.exist,startAlpha:1,endAlpha:0,alpha:1,})});if(!B){E.set(A,{drawn:elem.exist,startAlpha:1,endAlpha:1,alpha:1,})}Tree.Plot.fade(this.tree,this.canvas,$_.merge(C.controller,{onComplete:function(){E.removeSubtree(C.tree,G,B);C.onClick(C.clickedNode.id,D)}}))}}},onClick:function(C,F){var D=this.canvas,H=this,J=Tree.Plot,I=Tree.Util,A=Tree.Geometry;var G={onRequestNodesComplete:$_.fn(),onContractComplete:$_.fn(),onMoveComplete:$_.fn(),onExpandComplete:$_.fn()};var B=$_.merge(this.controller,G,F);if(!J.busy){J.busy=true;var E=I.getSubtree(this.tree,C);this.selectPath(E,this.clickedNode);this.clickedNode=E;B.onBeforeCompute(E);this.requestNodes(E,{onComplete:function(){B.onRequestNodesComplete();H.contract({onComplete:function(){A.setRightLevelToShow(E,D);B.onContractComplete();H.move(E,{onComplete:function(){B.onMoveComplete();H.expand(E,{onComplete:function(){B.onExpandComplete();B.onAfterCompute(C);B.onComplete();J.busy=false}})}})}})}})}}};var Trans={linear:function(A){return A},Quart:function(A){return Math.pow(A,4)},easeIn:function(A,B){return A(B)},easeOut:function(A,B){return 1-A(1-B)},easeInOut:function(A,B){return(B<=0.5)?A(2*B)/2:(2-A(2*(1-B)))/2}};var Animation={duration:Config.animationTime,fps:Config.fps,transition:function(A){return Trans.easeInOut(Trans.Quart,A)},controller:false,getTime:function(){var A=(Date.now)?Date.now():new Date().getTime();return A},step:function(){var A=this.getTime();if(A<this.time+this.duration){var B=this.transition((A-this.time)/this.duration);this.controller.compute(B)}else{this.timer=clearInterval(this.timer);this.controller.compute(1);this.controller.complete()}},start:function(){this.time=0;this.startTimer();return this},startTimer:function(){if(this.timer){return false}this.time=this.getTime()-this.time;this.timer=setInterval((function(){Animation.step()}),Math.round(1000/this.fps));return true}};
