/*
** by Sitsanlis Ilias
*/
function addBox(t){var e=new createjs.Container,a=thermometerContainer();a.set({x:0,y:20});var h=boxLineFrontShape(),r=boxLineBackShape(),d=top1Shape(t),s=top2Shape(t),i=bottomShape(t),t=waterShape(t);e.addChild(r),r.set({x:0,y:-90}),e.addChild(i),i.set({x:0,y:71}),e.addChild(s),s.set({x:0,y:0}),e.addChild(a),e.addChild(h),h.set({x:0,y:0}),e.addChild(t),e.addChild(d);d=boxLineFront2Shape();d.scale=-1,d.y=-77,e.addChild(d),d.visible=!1;d=new createjs.Text("fgdfgdfgdfg","12px Trebuchet MS");return d.set({x:70,textAlign:"left"}),e.addChild(d),e}function setMass(t,e,a,r){var d=t.getChildAt(5),s=t.getChildAt(2),i=t.getChildAt(6),t=t.getChildAt(8);h=40+100*(e-.2)/2,d.graphics.clear().f(a).s().dr(-58.5,74-h,117,h),d.alpha=.7,s.y=67.5-h,i.y=80-h-.5,t.text=e+" kg "+r,t.y=-15}function thermometerContainer(){var t=150,e=new createjs.Container,a=new createjs.Shape,h=new createjs.Shape,r=-70*Math.PI/180,d=-(Math.PI+r),s=20*Math.cos(r),i=20*Math.sin(r),n=-Math.acos((20*Math.cos(r)-3)/17),l=-(Math.PI+n),c=17*Math.cos(n),o=17*Math.sin(n);h.graphics.f("#fff").ss(1).s("#000").arc(0,0,20,r,d).mt(s,i).lt(s,i-160).arc(0,i-160,s,0,Math.PI,!0).lt(-s,i),h.graphics.s().f("#ff0000").arc(0,0,17,n,l).lt(-c,o-10).lt(c,o-10).lt(c,o),h.regY=-(9.94-o),e.addChild(h),e.addChild(a);var p=new createjs.Shape;p.graphics.ss(.8).s("#000");for(var f=0;f<=t;f+=15){p.graphics.mt(-16,-f).lt(-10,-f);var g=new createjs.Text(Math.round(0+100*f/t),"8px Trebuchet MS","#666666");g.set({textAlign:"right"}),g.x=-18,g.y=-f-3.25,e.addChild(g)}p.graphics.ss(.5).s("#666");for(f=0;f<=t;f+=1.5)f%15!=0&&p.graphics.mt(-12,-f).lt(-10,-f);for(f=7.5;f<=t;f+=7.5)p.graphics.mt(-14,-f).lt(-10,-f);return e.addChild(p),e}function setTemperature(t,e){var a=3.8404028665133754,e=150*+e/100;t.getChildAt(1).graphics.clear().s().f("#ff0000").dr(-a,-e-.5,2*a,1+e)}