function LTable(e,t,n){var r=this;base(r,LSprite,[]);r.type="LTable";r.row=e||0;r.col=t||0;if(!n)n={};if(!n.cellWidth)n.cellWidth=100;if(!n.cellHeight)n.cellHeight=30;if(!n.borderWidth)n.borderWidth=1;if(!n.borderColor)n.borderColor="black";if(!n.backgroundColor)n.backgroundColor="white";if(!n.selectColor)n.selectColor="#E0E0E0";if(!n.indentX)n.indentX=10;if(!n.indentY)n.indentY=10;r.style=n;r._tableSizeData=new Array;r._createTableData();r._isChange=true;r._createOriginalTable();r.addEventListener(LEvent.ENTER_FRAME,r._onDraw)}function LTreeWidget(e,t){var n=this;base(n,LSprite,[]);n.list=e;if(!t){t={}}if(!t.textColor){t.textColor="black"}if(!t.textSize){t.textSize=11}if(!t.textFont){t.textFont="Arial"}if(!t.textWeight){t.textWeight="normal"}if(!t.branchIndent){t.branchIndent=10}if(!t.branchButtonColor){t.branchButtonColor="black"}n.style=t;n._branchBtnSize=t.textSize-1;n._createBranch(n,n,0,n.list)}var LButtonSample1=function(){function e(e,t,n,r){var i=this;if(!t){t=16}if(!r){r="#FFFFFF"}if(!n){n="Arial"}i.backgroundColor="#000000";var s=new LSprite;s.shadow=new LSprite;s.back=new LSprite;s.addChild(s.shadow);s.addChild(s.back);labelText=new LTextField;labelText.color=r;labelText.font=n;labelText.size=t;labelText.x=t*.5;labelText.y=t*.5;labelText.text=e;i.labelText=labelText;s.back.addChild(labelText);var o=new LDropShadowFilter(4,45,"#000000",10);s.shadow.filters=[o];var u=new LSprite;u.x=u.y=1;labelText=labelText.clone();u.addChild(labelText);var a=u.clone();a.alpha=.5;LExtends(i,LButton,[s,u,null,a]);i.type="LButtonSample1";i.baseWidth=i.width=labelText.getWidth()+t;i.baseHeight=i.height=2.2*t;i.backgroundSet=null;i.widthSet=null;i.heightSet=null;i.xSet=null;i.ySet=null;i.addEventListener(LEvent.ENTER_FRAME,i._onDraw)}e.prototype.clone=function(){var t=this,n=t.labelText.text,r=t.labelText.size,i=t.labelText.font,s=t.labelText.color,o=new e(n,r,i,s);o.backgroundColor=t.backgroundColor;return o};e.prototype.setLabel=function(e){var t=this;t.bitmap_over.getChildAt(0).text=t.bitmap_up.back.getChildAt(0).text=e;t.baseWidth=t.width=t.bitmap_up.back.getChildAt(0).getWidth()+t.bitmap_up.back.getChildAt(0).size;t.backgroundSet=null};e.prototype._onDraw=function(e){var t=e.getRootCoordinate(),n;if(e.backgroundSet==e.backgroundColor&&e.widthSet==e.width&&e.heightSet==e.height&&e.xSet==t.x&&e.ySet==t.y){return}e.backgroundSet=e.backgroundColor;e.widthSet=e.width>e.baseWidth?e.width:e.baseWidth;e.heightSet=e.height>e.baseHeight?e.height:e.baseHeight;e.width=e.widthSet;e.height=e.heightSet;e.xSet=t.x;e.ySet=t.y;n=e.bitmap_up.back.getChildAt(0);n.x=(e.width-e.baseWidth+n.size)*.5;n.y=(e.height-e.baseHeight+n.size)*.5;n=e.bitmap_over.getChildAt(0);n.x=(e.width-e.baseWidth+n.size)*.5;n.y=(e.height-e.baseHeight+n.size)*.5;var r=LGlobal.canvas.createLinearGradient(0,-e.height*.5,0,e.height*2);r.addColorStop(0,"#FFFFFF");r.addColorStop(1,e.backgroundColor);var i=LGlobal.canvas.createLinearGradient(0,-e.height,0,e.height*2);i.addColorStop(0,"#FFFFFF");i.addColorStop(1,e.backgroundColor);e.bitmap_up.back.graphics.clear();e.bitmap_over.graphics.clear();e.bitmap_up.shadow.graphics.clear();e.bitmap_up.shadow.graphics.drawRoundRect(0,"#000000",[1,1,e.widthSet-2,e.heightSet-2,e.heightSet*.1],true,"#000000");e.bitmap_up.back.graphics.drawRect(1,e.backgroundColor,[0,0,e.widthSet,e.heightSet],true,r);e.bitmap_up.back.graphics.drawRect(0,e.backgroundColor,[1,e.heightSet*.5,e.widthSet-2,e.heightSet*.5-1],true,i);e.bitmap_over.graphics.drawRect(1,e.backgroundColor,[0,0,e.widthSet,e.heightSet],true,r);e.bitmap_over.graphics.drawRect(0,e.backgroundColor,[1,e.heightSet*.5,e.widthSet-2,e.heightSet*.5-1],true,i);e.disableState.graphics.drawRect(1,e.backgroundColor,[0,0,e.widthSet,e.heightSet],true,r);e.disableState.graphics.drawRect(0,e.backgroundColor,[1,e.heightSet*.5,e.widthSet-2,e.heightSet*.5-1],true,i)};return e}();var LButtonSample2=function(){function e(e,t,n,r){var i=this;LExtends(i,LButtonSample1,[e,t,n,r]);i.type="LButtonSample2"}e.prototype.clone=function(){var t=this,n=t.labelText.text,r=t.labelText.size,i=t.labelText.font,s=t.labelText.color,o=new e(n,r,i,s);o.backgroundColor=t.backgroundColor;return o};e.prototype._onDraw=function(e){var t=e.getRootCoordinate(),n;if(e.backgroundSet==e.backgroundColor&&e.widthSet==e.width&&e.heightSet==e.height&&e.xSet==t.x&&e.ySet==t.y){return}e.backgroundSet=e.backgroundColor;e.widthSet=e.width>e.baseWidth?e.width:e.baseWidth;e.heightSet=e.height>e.baseHeight?e.height:e.baseHeight;e.width=e.widthSet;e.height=e.heightSet;e.xSet=t.x;e.ySet=t.y;n=e.bitmap_up.back.getChildAt(0);n.x=(e.width-e.baseWidth+n.size)*.5;n.y=(e.height-e.baseHeight+n.size)*.5;n=e.bitmap_over.getChildAt(0);n.x=(e.width-e.baseWidth+n.size)*.5;n.y=(e.height-e.baseHeight+n.size)*.5;var r=LGlobal.canvas.createLinearGradient(0,-e.height*.5,0,e.height*2);r.addColorStop(0,"#FFFFFF");r.addColorStop(1,e.backgroundColor);var i=LGlobal.canvas.createLinearGradient(0,-e.height,0,e.height*2);i.addColorStop(0,"#FFFFFF");i.addColorStop(1,e.backgroundColor);e.bitmap_up.back.graphics.clear();e.bitmap_over.graphics.clear();e.bitmap_up.shadow.graphics.clear();e.bitmap_up.back.graphics.drawRoundRect(1,e.backgroundColor,[0,0,e.width,e.height,e.height*.1],true,r);e.bitmap_up.back.graphics.drawRoundRect(0,e.backgroundColor,[1,e.height*.5,e.width-2,e.height*.5-1,e.height*.1],true,i);e.bitmap_over.graphics.drawRoundRect(1,e.backgroundColor,[0,0,e.width,e.height,e.height*.1],true,r);e.bitmap_over.graphics.drawRoundRect(0,e.backgroundColor,[1,e.height*.5,e.width-2,e.height*.5-1,e.height*.1],true,i);e.disableState.graphics.drawRoundRect(1,e.backgroundColor,[0,0,e.width,e.height,e.height*.1],true,r);e.disableState.graphics.drawRoundRect(0,e.backgroundColor,[1,e.height*.5,e.width-2,e.height*.5-1,e.height*.1],true,i)};return e}();var LCheckBox=function(){function e(e,t){var n=this,r;LExtends(n,LSprite,[]);n.type="LCheckBox";if(!e){r=LGlobal.canvas.createLinearGradient(0,-20,0,40);r.addColorStop(0,"#FFFFFF");r.addColorStop(1,"#CCCCCC");e=new LSprite;e.graphics.drawRoundRect(1,"#CCCCCC",[0,0,20,20,4],true,r)}else{e=e.clone()}if(!t){r=LGlobal.canvas.createLinearGradient(0,-20,0,20);r.addColorStop(0,"#FFFFFF");r.addColorStop(1,"#008000");t=new LSprite;t.graphics.drawLine(5,r,[4,10,12,16]);t.graphics.drawLine(5,r,[10,16,16,4])}else{t=t.clone()}n.layer=e;n.layerSelect=t;n.addChild(n.layer);n.addChild(n.layerSelect);n.layerSelect.visible=n.checked=false;n.addEventListener(LMouseEvent.MOUSE_UP,n._onChange)}e.prototype._onChange=function(e){var t=e.clickTarget;t.checked=!t.checked;t.layerSelect.visible=t.checked};e.prototype.setChecked=function(e){var t=this;t.checked=e;t.layerSelect.visible=t.checked};e.prototype.clone=function(){var t=this,n=new e(t.layer.clone(),t.layerSelect.clone());n.setChecked(t.checked);return n};return e}();var LComboBox=function(){function e(e,t,n,r,i,s){var o=this;LExtends(o,LSprite,[]);o.type="LComboBox";o.list=[];o.selectIndex=-1;o.value=null;o.selectWidth=100;if(!e){e=16}if(!t){t="#000000"}if(!n){n="Arial"}o.size=e;o.color=t;o.font=n;o.maxIndex=5;if(!r){var u=new LSprite;u.graphics.drawRoundRect(1,"#999999",[0,0,12,12,4],true,"#f5f5f9");var a=new LBitmapData(null,0,0,12,12,LBitmapData.DATA_CANVAS);a.draw(u);r=new LPanel(a,200,30,4,8,4,8)}var f;if(!i||!s){var l,c,h;grd=LGlobal.canvas.createLinearGradient(0,-20,0,40);grd.addColorStop(0,"#FFFFFF");grd.addColorStop(1,"#CCCCCC");l=new LSprite;l.graphics.drawRoundRect(1,"#CCCCCC",[0,0,22,22,2],true,grd);l.graphics.drawVertices(1,"#CCCCCC",[[6,6],[16,6],[11,18]],true,"#008000");h=new LBitmapData(null,0,0,22,22,LBitmapData.DATA_CANVAS);h.draw(l);i=new LBitmap(h);c=new LSprite;c.graphics.drawRoundRect(1,"#CCCCCC",[0,0,22,22,2],true,grd);c.graphics.drawVertices(1,"#CCCCCC",[[6,6],[16,6],[11,18]],true,"#32CD32");h=new LBitmapData(null,0,0,22,22,LBitmapData.DATA_CANVAS);h.draw(c);s=new LBitmap(h)}o.minWidth=r.getWidth();o.minHeight=r.getHeight();var p=r.clone();i.x=p.getWidth()-i.getWidth()-4;i.y=4;p.arraw=i;p.addChild(i);var d=r.clone();s.x=d.getWidth()-s.getWidth()-4;s.y=4;d.arraw=s;d.addChild(s);f=new LButton(p,d);f.setCursorEnabled(false);f.staticMode=true;o.addChild(f);var v=new LTextField;v.x=4;v.y=4;v.text="";v.size=o.size;v.color=o.color;v.font=o.font;f.addChild(v);o.label=v;o.layer=f;o.addEventListener(LMouseEvent.MOUSE_UP,o._showChildList)}e.ON_CHANGE="onchange";e.prototype._ll_resize=function(){var e=this;if(e.list.length==0){return}var t=new LTextField;t.text=e.list[0].label;t.size=e.size;var n=t.getWidth();var r=t.getHeight();if(r+80){t.setValue(t.list[i>0?i-1:0])}else{t.selectIndex=-1;t.value=null}t._ll_resize()};e.prototype.setChild=function(e){var t=this,n,r;if(!e||typeof e.value==UNDEFINED||typeof e.label==UNDEFINED){throw"the child must be an object like:{label:a,value:b}"}for(n=0,r=t.list.length;n>>0;for(t=0,n=e.list.length;te.maxIndex){var f=new LScrollbar(s,i,s.childHeight*e.maxIndex,20,false);f.x=u.x;f.y=u.y+e.layer.getHeight();if(f.y+s.childHeight*e.maxIndex>LGlobal.height){f.y=LGlobal.height-s.childHeight*e.maxIndex}f.resizeHeight(f._maskH);f._key["down"]=true;f._key["up"]=false;f._tager={x:0,y:40};f._speed=Math.abs(f._tager.y-f._showObject.y);f.setSpeed();f.setScrollY(s.childHeight*e.selectIndex);LGlobal.stage.addChild(f)}else{s.x=u.x;s.y=u.y+e.layer.getHeight();if(s.y+s.getHeight()>LGlobal.height){s.y=LGlobal.height-s.getHeight()}LGlobal.stage.addChild(s)}s.addEventListener(LMouseEvent.MOUSE_MOVE,e._childSelecting);s.addEventListener(LMouseEvent.MOUSE_UP,e._childSelected)};e.prototype._childSelecting=function(e){var t=e.currentTarget,n;n=e.selfY/t.childHeight>>>0;if(n>=t.comboBox.list.length){return}t.selectLayer.y=t.childHeight*n};e.prototype._childSelected=function(e){var t=e.currentTarget,n,r;n=e.selfY/t.childHeight>>>0;t.comboBox.setValue(t.comboBox.list[n].value);var i=LGlobal.stage.numChildren;LGlobal.stage.removeChildAt(i-1);LGlobal.stage.removeChildAt(i-2)};e.prototype.setValue=function(t,n){var r=this,i,s,o;if(r.value==t){return}i=r.list;for(s=0,o=i.length;st.depth){if(n.select.upper.menuList&&n.select.upper.menuList.length){for(var u=0;uh.getWidth()+s.style.horizontalIndent*4?o:h.getWidth()+s.style.horizontalIndent*4;u+=h.getHeight()+s.style.verticalIndent*2;if(e.childWidth0){if(s.objectIndex==e.objectIndex){s.setList(c,l.list,n+1,c.x,c.y+c.getHeight())}else{var p=new LSprite;c.arrow=p;c.addChild(p);p.x=h.getWidth()+s.style.horizontalIndent*2;p.y=h.y;p.graphics.drawVertices(0,s.style.textColor,[[0,0],[0,h.getHeight()],[s.style.horizontalIndent,h.getHeight()*.5]],true,s.style.textColor);s.setList(c,l.list,n+1,c.x+c.getWidth()+s.style.horizontalIndent*2,c.y)}}if(s.objectIndex!=e.objectIndex){c.visible=false}}e.menuList=a};return e}();var LMessageBox=function(){function e(){}e.show=function(e){if(!e.width){e.width=500}if(!e.height){e.height=300}if(!e.title){e.title=""}if(!e.size){e.size=16}if(!e.textHeight){e.textHeight=35}if(e.displayObject){e.width=e.displayObject.getWidth();e.height=e.displayObject.getHeight()}var t=new LSprite;t.graphics.drawRect(0,"#000000",[0,0,LGlobal.width,LGlobal.height],true,"#000000");t.alpha=.5;LGlobal.stage.addChild(t);t.addEventListener(LMouseEvent.MOUSE_UP,function(e){});t.addEventListener(LMouseEvent.MOUSE_DOWN,function(e){});t.addEventListener(LMouseEvent.MOUSE_MOVE,function(e){});t.addEventListener(LMouseEvent.MOUSE_OVER,function(e){});t.addEventListener(LMouseEvent.MOUSE_OUT,function(e){});var n=new LWindow(e.width,e.height,e.title);n.x=(LGlobal.width-n.getWidth())*.5;n.y=(LGlobal.height-n.getHeight())*.5;LGlobal.stage.addChild(n);n.addEventListener(LWindow.CLOSE,function(e){t.die();t.remove()});if(e.displayObject){n.layer.addChild(e.displayObject);return}var r=new LTextField;r.width=e.width-100;r.setWordWrap(true,e.textHeight);r.text=e.message;r.x=(e.width-r.width)*.5;r.y=(e.height-n.bar.getHeight()-r.getHeight())*.5;n.layer.addChild(r)};return e}();var LPanel=function(){function e(e,t,n,r,i,s,o){var u=this;LExtends(u,LSprite,[]);u.type="LPanel";if(typeof e=="string"){var a=new LShape;a.graphics.drawRoundRect(1,"#000000",[0,0,20,20,5],true,e);e=new LBitmapData(null,0,0,20,20);e.draw(a)}u.x1=r?r:e.width*.4;u.x2=i?i:e.width*.6;u.y1=s?s:e.height*.4;u.y2=o?o:e.height*.6;u.bitmapData=e;var f=new LBitmapData(e.image,e.x,e.y,u.x1,u.y1);var l=new LBitmapData(e.image,e.x+u.x1,e.y,u.x2-u.x1,u.y1);var c=new LBitmapData(e.image,e.x+u.x2,e.y,e.width-u.x2,u.y1);var h=new LBitmapData(e.image,e.x,e.y+u.y1,u.x1,u.y2-u.y1);var p=new LBitmapData(e.image,e.x+u.x1,e.y+u.y1,u.x2-u.x1,u.y2-u.y1);var d=new LBitmapData(e.image,e.x+u.x2,e.y+u.y1,e.width-u.x2,u.y2-u.y1);var v=new LBitmapData(e.image,e.x,e.y+u.y2,u.x1,e.height-u.y2);var m=new LBitmapData(e.image,e.x+u.x1,e.y+u.y2,u.x2-u.x1,e.height-u.y2);var g=new LBitmapData(e.image,e.x+u.x2,e.y+u.y2,e.width-u.x2,e.height-u.y2);u.ltBitmap=new LBitmap(f);u.addChild(u.ltBitmap);u.mtBitmap=new LBitmap(l);u.mtBitmap.x=u.x1-1;u.addChild(u.mtBitmap);u.rtBitmap=new LBitmap(c);u.addChild(u.rtBitmap);u.lmBitmap=new LBitmap(h);u.lmBitmap.y=u.y1-1;u.addChild(u.lmBitmap);u.mmBitmap=new LBitmap(p);u.mmBitmap.x=u.x1-1;u.mmBitmap.y=u.y1-1;u.addChild(u.mmBitmap);u.rmBitmap=new LBitmap(d);u.rmBitmap.y=u.y1-1;u.addChild(u.rmBitmap);u.lbBitmap=new LBitmap(v);u.addChild(u.lbBitmap);u.mbBitmap=new LBitmap(m);u.mbBitmap.x=u.x1-1;u.addChild(u.mbBitmap);u.rbBitmap=new LBitmap(g);u.addChild(u.rbBitmap);u.resize(t,n)}e.prototype.resize=function(e,t){var n=this;n._ll_w=e;n._ll_h=t;n.rtBitmap.x=n.rmBitmap.x=n.rbBitmap.x=e-(n.bitmapData.width-n.x2);n.lbBitmap.y=n.mbBitmap.y=n.rbBitmap.y=t-(n.bitmapData.height-n.y2);n.lmBitmap.scaleY=n.mmBitmap.scaleY=n.rmBitmap.scaleY=(t-n.y1-(n.bitmapData.height-n.y2)+2)/(n.y2-n.y1);n.mtBitmap.scaleX=n.mmBitmap.scaleX=n.mbBitmap.scaleX=(e-n.x1-(n.bitmapData.width-n.x2)+2)/(n.x2-n.x1)};e.prototype.clone=function(){var t=this;return new e(t.bitmapData.clone(),t._ll_w,t._ll_h,t.x1,t.x2,t.y1,t.y2)};return e}();var LRadioChild=function(){function e(e,t,n){var r=this,i;LExtends(r,LSprite,[]);r.type="LRadioChild";r.value=e;if(!t){i=LGlobal.canvas.createLinearGradient(0,-20,0,40);i.addColorStop(0,"#FFFFFF");i.addColorStop(1,"#CCCCCC");t=new LSprite;t.graphics.drawArc(1,"#CCCCCC",[0,0,10,0,2*Math.PI],true,i)}else{t=t.clone()}if(!n){i=LGlobal.canvas.createLinearGradient(0,-20,0,20);i.addColorStop(0,"#FFFFFF");i.addColorStop(1,"#008000");n=new LSprite;n.graphics.drawArc(1,i,[0,0,5,0,2*Math.PI],true,i)}else{n=n.clone()}r.layer=t;r.layerSelect=n;r.addChild(r.layer);r.addChild(r.layerSelect);r.layerSelect.visible=false;r.checked=false;r.addEventListener(LMouseEvent.MOUSE_UP,r._onChange)}e.prototype.clone=function(){var t=this,n=new e(t.value,t.layer,t.layerSelect);n.copyProperty(t);return n};e.prototype._onChange=function(e){var t=e.clickTarget;t.parent.setValue(t.value)};e.prototype.setChecked=function(e){this.layerSelect.visible=this.checked=e};return e}();var LRadio=function(){function e(){var e=this;LExtends(e,LSprite,[]);e.type="LRadio";e.value=null}e.prototype.setChildRadio=function(e,t,n,r,i){var s=this;var o=new LRadioChild(e,r,i);o.x=t;o.y=n;s.addChild(o);return o};e.prototype.push=function(e){this.addChild(e)};e.prototype.setValue=function(e){var t=this,n,r;for(r in t.childList){n=t.childList[r];if(n.setChecked){n.setChecked(false)}if(n.value==e){t.value=e;n.setChecked(true)}}};e.prototype.clone=function(){var t=this,n=new e,r,i;for(i in t.childList){r=t.childList[i].clone();n.push(r)}n.setValue(t.value);return n};return e}();var LRange=function(){function e(){var e=this,t,n,r;LExtends(e,LSprite,[]);e.type="LRange";e.value=0;if(arguments.length==0){r={width:200}}else if(arguments.length==1&&typeof arguments[0]=="number"){r={width:arguments[0]}}else if(arguments.length==2){r={backLayer:arguments[0],selectLayer:arguments[1]}}else{throw"LRange's param is wrong"}if(r["backLayer"]&&r["selectLayer"]){var i=r["backLayer"];e.sign=r["selectLayer"];n=i.getHeight()>e.sign.getHeight()?i.getHeight():e.sign.getHeight();i.y=(n-i.getHeight())*.5;e.w=i.getWidth();e.graphics.drawRect(0,"#FFFFFF",[-50,0,e.w+100,n]);e.addChild(i)}else{e.w=r["width"];e.graphics.drawRect(0,"#FFFFFF",[-50,0,e.w+100,e.w*.13]);var s=LGlobal.canvas.createLinearGradient(0,0,0,e.w*.13);s.addColorStop(0,"#FFFFFF");s.addColorStop(1,"#CCCCCC");e.color=s;e.graphics.drawRect(1,"#CCCCCC",[0,e.w*.04,e.w,e.w*.03],true,e.color);e.sign=new LSprite;e.sign.graphics.drawVertices(1,"#CCCCCC",[[0,0],[e.w*.05,0],[e.w*.05,e.w*.1],[e.w*.025,e.w*.13],[0,e.w*.1]],true,e.color)}e.addChild(e.sign);e.sign.x=-e.sign.getWidth()*.5;e.addEventListener(LMouseEvent.MOUSE_DOWN,e._onDown)}e.prototype.clone=function(){var t=this,n=new e(t.w);n.copyProperty(t);return n};e.prototype._onDown=function(e){var t=e.clickTarget;if(e.selfX<-t.sign.getWidth()*.5||e.selfX>t.w+t.sign.getWidth()*.5){return}if(t.down){return}t.down=true;t.sign.x=e.selfX-t.sign.getWidth()*.5;if(t.sign.x<-t.sign.getWidth()*.5){t.sign.x=-t.sign.getWidth()*.5}if(t.sign.x>t.w-t.sign.getWidth()*.5){t.sign.x=t.w-t.sign.getWidth()*.5}t._DownX=t.sign.x;t._OffsetX=e.selfX;t._getValue();t.addEventListener(LMouseEvent.MOUSE_MOVE,t._onMove);LGlobal.stage._ll_range=t;LGlobal.stage.addEventListener(LMouseEvent.MOUSE_UP,t._onUp)};e.prototype._getValue=function(){var e=this;e.value=Math.floor((e.sign.x+e.sign.getWidth()*.5)*100/e.w)};e.prototype._onMove=function(e){var t=e.clickTarget;t.sign.x=t._DownX+e.selfX-t._OffsetX;if(t.sign.x<-t.sign.getWidth()*.5){t.sign.x=-t.sign.getWidth()*.5}if(t.sign.x>t.w-t.sign.getWidth()*.5){t.sign.x=t.w-t.sign.getWidth()*.5}t._getValue()};e.prototype._onUp=function(e){var t=LGlobal.stage._ll_range;t.down=false;t.removeEventListener(LMouseEvent.MOUSE_MOVE,t._onMove);LGlobal.stage.removeEventListener(LMouseEvent.MOUSE_UP,t._onUp)};return e}();var LScrollbar=function(){function e(e,t,n,r,i,s){var o=this;LExtends(o,LSprite,[]);o.type="LScrollbar";o._showLayer=new LSprite;o._mask=new LGraphics;o._mask.drawRect(0,"#ffffff",[0,0,t,n],false,"#ffffff");o._showLayer.graphics.drawRect(0,"#ffffff",[0,0,t,n],false,"#ffffff");o._wVisible=typeof i==UNDEFINED?true:i;o._hVisible=typeof s==UNDEFINED?true:i;o.addChild(o._showLayer);o._width=0;o._height=0;o._showObject=e;o._showLayer.addChild(e);o._showObject.mask=o._mask;if(!r){o._scrollWidth=20;o._selectHeight=o._scrollWidth*1.5}else if(typeof r=="number"){o._scrollWidth=r;o._selectHeight=o._scrollWidth*1.5}else if(typeof r=="object"){o._ll_bar_back=r["back"];o._ll_bar_select=r["select"];o._ll_bar_arraw=r["arraw"];o._scrollWidth=o._ll_bar_back.getWidth();o._selectHeight=o._ll_bar_select.getHeight()}o._target={x:0,y:0};o._maskW=t;o._maskH=n;o.excluding=false;o.addEventListener(LEvent.ENTER_FRAME,o.onFrame);o.dispatchEvent(LEvent.ENTER_FRAME)}e.prototype.clone=function(){var t=this,n=new e(t._showObject.clone(),t._maskW,t._maskH,t._scrollWidth,t._wVisible,t._hVisible);n.copyProperty(t);return n};e.prototype.onFrame=function(e){var t=e.currentTarget,n,r,i,s,o;n=t._showObject.getWidth();r=t._showObject.getHeight();if(t._wVisible&&t._width!=n){t._width=n;if(t._width>t._maskW){t.resizeWidth(true);t.moveLeft()}else{t.resizeWidth(false)}}if(t._hVisible&&t._height!=r){t._height=r;if(t._height>t._maskH){t.resizeHeight(true);t.moveUp()}else{t.resizeHeight(false)}}if(t.excluding){for(i=0,s=t._showObject.numChildren;it._maskW||o.x+o.getWidth()+t._showObject.x<0||o.y+t._showObject.y>t._maskH||o.y+o.getHeight()+t._showObject.y<0){o.visible=false}else{o.visible=true}}}if(t._key==null){return}if(t._key["up"]){t.moveUp()}if(t._key["down"]){t.moveDown()}if(t._key["left"]){t.moveLeft()}if(t._key["right"]){t.moveRight()}};e.prototype.resizeWidth=function(e){var t=this,n,r;if(!e){if(t._scroll_w!=null){t._scroll_w.parent.removeChild(t._scroll_w);t._scroll_w_bar.parent.removeChild(t._scroll_w_bar);t._scroll_w=null;t._scroll_w_bar=null}return}var i;if(t._scroll_w_bar==null){if(t._key==null){t._key=[]}t._scroll_w=new LSprite;t._scroll_w_bar=new LSprite;t.addChild(t._scroll_w);t.addChild(t._scroll_w_bar);var s=t._scrollWidth*1.5;t._scroll_w.x=0;t._scroll_w.y=t._maskH;t._scroll_w_bar.x=t._scrollWidth;t._scroll_w_bar.y=t._maskH;n=LGlobal.canvas.createLinearGradient(0,0,0,t._scrollWidth*2);n.addColorStop(0,"#FFFFFF");n.addColorStop(1,"#008000");r=LGlobal.canvas.createLinearGradient(0,0,0,t._scrollWidth);r.addColorStop(0,"#FFFFFF");r.addColorStop(1,"#CCCCCC");if(t._ll_bar_select){t._ll_bar_select_w=t._ll_bar_select.clone();t._ll_bar_select_w.rotateCenter=false;t._ll_bar_select_w.x=t._selectHeight;t._ll_bar_select_w.rotate=90;t._scroll_w_bar.addChild(t._ll_bar_select_w)}else{t._scroll_w_bar.graphics.drawRoundRect(1,"#CCCCCC",[0,0,t._scrollWidth*1.5,t._scrollWidth,t._scrollWidth*.5],true,n)}if(t._ll_bar_back){t._ll_bar_back_w=t._ll_bar_back.clone();t._ll_bar_back_w.rotateCenter=false;t._ll_bar_back_w.x=t._maskW-t._scrollWidth;t._ll_bar_back_w.rotate=90;t._scroll_w.addChild(t._ll_bar_back_w)}else{t._scroll_w.graphics.drawRoundRect(1,"#CCCCCC",[t._scrollWidth,0,t._mask.getWidth()-t._scrollWidth*2,t._scrollWidth,t._scrollWidth*.5],true,r)}if(t._ll_bar_back){t._ll_bar_arraw_left=t._ll_bar_arraw.clone();t._ll_bar_arraw_left.rotateCenter=false;t._ll_bar_arraw_left.y=t._scrollWidth;t._ll_bar_arraw_left.rotate=-90;t._scroll_w.addChild(t._ll_bar_arraw_left)}else{t._scroll_w.graphics.drawRect(0,"#000000",[0,0,t._scrollWidth,t._scrollWidth]);t._scroll_w.graphics.drawVertices(1,"#CCCCCC",[[t._scrollWidth*.75,t._scrollWidth*.25],[t._scrollWidth*.75,t._scrollWidth*.75],[t._scrollWidth*.25,t._scrollWidth*.5]],true,n)}if(t._ll_bar_back){t._ll_bar_arraw_left=t._ll_bar_arraw.clone();t._ll_bar_arraw_left.rotateCenter=false;t._ll_bar_arraw_left.x=t._maskW;t._ll_bar_arraw_left.rotate=90;t._scroll_w.addChild(t._ll_bar_arraw_left)}else{t._scroll_w.graphics.drawRect(0,"#000000",[t._mask.getWidth()-t._scrollWidth,0,t._scrollWidth,t._scrollWidth]);t._scroll_w.graphics.drawVertices(1,"#CCCCCC",[[t._mask.getWidth()-t._scrollWidth*.75,t._scrollWidth*.25],[t._mask.getWidth()-t._scrollWidth*.75,t._scrollWidth*.75],[t._mask.getWidth()-t._scrollWidth*.25,t._scrollWidth*.5]],true,n)}if(!t.hasEventListener(LMouseEvent.MOUSE_DOWN)){t.addEventListener(LMouseEvent.MOUSE_DOWN,t.mouseDown)}}};e.prototype.resizeHeight=function(e){var t=this,n,r;if(!e){if(t._scroll_h!=null){t._scroll_h.parent.removeChild(t._scroll_h);t._scroll_h_bar.parent.removeChild(t._scroll_h_bar);t._scroll_h=null;t._scroll_h_bar=null}return}var i;if(t._scroll_h_bar==null){if(t._key==null){t._key=[]}t._scroll_h=new LSprite;t._scroll_h_bar=new LSprite;t.addChild(t._scroll_h);t.addChild(t._scroll_h_bar);var s=t._scrollWidth*1.5;t._scroll_h.x=t._maskW;t._scroll_h.y=0;t._scroll_h_bar.x=t._maskW;t._scroll_h_bar.y=t._scrollWidth;n=LGlobal.canvas.createLinearGradient(0,0,t._scrollWidth*2,0);n.addColorStop(0,"#FFFFFF");n.addColorStop(1,"#008000");r=LGlobal.canvas.createLinearGradient(0,0,t._scrollWidth,0);r.addColorStop(0,"#FFFFFF");r.addColorStop(1,"#CCCCCC");if(t._ll_bar_select){t._scroll_h_bar.addChild(t._ll_bar_select)}else{t._scroll_h_bar.graphics.drawRoundRect(1,"#CCCCCC",[0,0,t._scrollWidth,t._scrollWidth*1.5,t._scrollWidth*.5],true,n)}if(t._ll_bar_back){t._ll_bar_back_h=t._ll_bar_back.clone();t._ll_bar_back_h.y=(t._mask.getHeight()-t._ll_bar_back_h.getHeight())*.5;t._scroll_h.addChild(t._ll_bar_back_h)}else{t._scroll_h.graphics.drawRoundRect(1,"#CCCCCC",[0,t._scrollWidth,t._scrollWidth,t._mask.getHeight()-t._scrollWidth*2,t._scrollWidth*.5],true,r)}if(t._ll_bar_back){t._ll_bar_arraw_up=t._ll_bar_arraw.clone();t._scroll_h.addChild(t._ll_bar_arraw_up)}else{t._scroll_h.graphics.drawRect(0,"#000000",[0,0,t._scrollWidth,t._scrollWidth]);t._scroll_h.graphics.drawVertices(1,"#CCCCCC",[[t._scrollWidth/4,t._scrollWidth*.75],[t._scrollWidth/2,t._scrollWidth/4],[t._scrollWidth*.75,t._scrollWidth*.75]],true,n)}if(t._ll_bar_back){t._ll_bar_arraw_down=t._ll_bar_arraw.clone();t._ll_bar_arraw_down.scaleY=-1;t._ll_bar_arraw_down.y=t._mask.getHeight();t._scroll_h.addChild(t._ll_bar_arraw_down)}else{t._scroll_h.graphics.drawRect(0,"#000000",[0,t._mask.getHeight()-t._scrollWidth,t._scrollWidth,t._scrollWidth]);t._scroll_h.graphics.drawVertices(1,"#CCCCCC",[[t._scrollWidth/4,t._mask.getHeight()-t._scrollWidth*.75],[t._scrollWidth/2,t._mask.getHeight()-t._scrollWidth*.25],[t._scrollWidth*.75,t._mask.getHeight()-t._scrollWidth*.75]],true,n)}if(!t.hasEventListener(LMouseEvent.MOUSE_DOWN)){t.addEventListener(LMouseEvent.MOUSE_DOWN,t.mouseDown)}}};e.prototype.moveLeft=function(){var e=this;if(!e._key["Dkey"]&&e._showObject.x>=e._target.x){e._key["left"]=false;e.setScroll_w();return}else if(e._showObject.x>=0){e._showObject.x=0;e._key["left"]=false;e.setScroll_w();return}if(e._key["Dkey"]){e._speed=5}e._showObject.x+=e._speed;e.setScroll_w();e.setSpeed()};e.prototype.setScroll_h=function(){var e=this;var t=(e._mask.getHeight()-e._scrollWidth*2-e._selectHeight)*e._showObject.y/(e._mask.getHeight()-e._showObject.getHeight());if(e._scroll_h_bar){e._scroll_h_bar.x=e._mask.getWidth();e._scroll_h_bar.y=e._scrollWidth+t}};e.prototype.setScroll_w=function(){var e=this;var t=(e._mask.getWidth()-e._scrollWidth*2-e._selectHeight)*e._showObject.x/(e._mask.getWidth()-e._showObject.getWidth());if(e._scroll_w_bar){e._scroll_w_bar.x=e._scrollWidth+t;e._scroll_w_bar.y=e._mask.getHeight()}};e.prototype.moveUp=function(){var e=this;if(!e._key["Dkey"]&&e._showObject.y>=e._target.y){e._key["up"]=false;e.setScroll_h();return}else if(e._showObject.y>=0){e._showObject.y=0;e._key["up"]=false;e.setScroll_h();return}if(e._key["Dkey"]){e._speed=5}e._showObject.y+=e._speed;e.setScroll_h();e.setSpeed()};e.prototype.moveDown=function(){var e=this;if(!e._key["Dkey"]&&e._showObject.y<=e._target.y){e._key["down"]=false;e.setScroll_h();return}else if(e._showObject.y<=e._mask.getHeight()-e._showObject.getHeight()){e._showObject.y=e._mask.getHeight()-e._showObject.getHeight();e._key["down"]=false;e.setScroll_h();return}if(e._key["Dkey"]){e._speed=5}e._showObject.y-=e._speed;e.setScroll_h();e.setSpeed()};e.prototype.getScrollY=function(){return this._showObject.y};e.prototype.setScrollY=function(e){var t=this;t._showObject.y=t._mask.getHeight()-t._showObject.getHeight();if(t._showObject.y<-e){t._showObject.y=-e}else if(e<0){t._showObject.y=0}this.setScroll_h()};e.prototype.getScrollX=function(){return this._showObject.x};e.prototype.setScrollX=function(e){this._showObject.x=e;this.setScroll_w()};e.prototype.scrollToTop=function(){this._showObject.y=0;this.setScroll_h()};e.prototype.scrollToBottom=function(){var e=this,t=e._showObject.getHeight(),n=e._mask.getHeight();e._showObject.y=t>n?n-t:0;e.setScroll_h()};e.prototype.scrollToLeft=function(){this._showObject.x=0;this.setScroll_w()};e.prototype.scrollToRight=function(){var e=this,t=e._showObject.getWidth(),n=e._mask.getWidth();e._showObject.x=t>n?n-t:0;e.setScroll_w()};e.prototype.moveRight=function(){var e=this;if(!e._key["Dkey"]&&e._showObject.x<=e._target.x){e._key["right"]=false;e.setScroll_w();return}else if(e._showObject.x<=e._mask.getWidth()-e._showObject.getWidth()){e._showObject.x=e._mask.getWidth()-e._showObject.getWidth();e._key["right"]=false;e.setScroll_w();return}if(e._key["Dkey"]){e._speed=5}e._showObject.x-=e._speed;e.setScroll_w();e.setSpeed()};e.prototype.mouseDown=function(e){var t=e.clickTarget;if(t._scroll_h!=null&&e.selfX>=t._scroll_h.x&&e.selfX<=t._scroll_h.x+t._scrollWidth){t.mouseDownH(e,t)}if(t._scroll_w!=null&&e.selfY>=t._scroll_w.y&&e.selfY<=t._scroll_w.y+t._scrollWidth){t.mouseDownW(e,t)}};e.prototype.mouseMoveH=function(e){var t=e.clickTarget;if(e.selfYt._mask.getHeight()){return}var n=e.selfY-t._key["scroll_y"];t._key["up"]=false;t._key["down"]=false;t._target.y=(t._mask.getHeight()-t._showObject.getHeight())*(n-t._scrollWidth)/(t._mask.getHeight()-t._scrollWidth*3.5);if(t._target.y>t._showObject.y){t._key["up"]=true}else{t._key["down"]=true}t._speed=Math.abs(t._target.y-t._showObject.y);t.setSpeed()};e.prototype.mouseUpH=function(e){var t=LGlobal.stage._ll_scrollbar;delete LGlobal.stage._ll_scrollbar;LGlobal.stage.removeEventListener(LMouseEvent.MOUSE_UP,t.mouseUpH);if(t._key["Dkey"]){t._key["Dkey"]=false}else{t.removeEventListener(LMouseEvent.MOUSE_MOVE,t.mouseMoveH);if(t._key["scroll_h"]){t._key["scroll_h"]=false}}};e.prototype.mouseUpW=function(e){var t=LGlobal.stage._ll_scrollbar;delete LGlobal.stage._ll_scrollbar;LGlobal.stage.removeEventListener(LMouseEvent.MOUSE_UP,t.mouseUpW);if(t._key["Dkey"]){t._key["Dkey"]=false}else{t.removeEventListener(LMouseEvent.MOUSE_MOVE,t.mouseMoveW);if(t._key["scroll_w"]){t._key["scroll_w"]=false}}};e.prototype.mouseMoveW=function(e){var t=e.clickTarget;if(e.selfXt._mask.getWidth()){return}var n=e.selfX-t._key["scroll_x"];t._key["left"]=false;t._key["right"]=false;t._target.x=(t._mask.getWidth()-t._showObject.getWidth())*(n-t._scrollWidth)/(t._mask.getWidth()-t._scrollWidth*3.5);if(t._target.x>t._showObject.x){t._key["left"]=true}else{t._key["right"]=true}t._speed=Math.abs(t._target.x-t._showObject.x);t.setSpeed()};e.prototype.setSpeed=function(){var e=this;e._speed=Math.floor(e._speed/2);if(e._speed==0){e._speed=1}};e.prototype.mouseDownW=function(e){var t=e.clickTarget;if(e.selfX>=0&&e.selfX<=t._scrollWidth){if(t._showObject.x>=0||t._key["left"]){return}t._distance=10;if(t._showObject.x+t._distance>0){t._distance=t._showObject.x}t._target.x=t._showObject.x+t._distance;t._key["left"]=true;t._key["right"]=false;t._key["Dkey"]=true;t._speed=t._distance;t.setSpeed();if(!LGlobal.stage.hasEventListener(LMouseEvent.MOUSE_UP,t.mouseUpW)){LGlobal.stage._ll_scrollbar=t;LGlobal.stage.addEventListener(LMouseEvent.MOUSE_UP,t.mouseUpW)}}else if(e.selfX>=t._mask.getWidth()-t._scrollWidth&&e.selfX<=t._mask.getWidth()){if(t._showObject.x<=t._mask.getWidth()-t._showObject.getWidth()||t._key["left"]){return}t._distance=10;if(t._showObject.x-t._distance=t._scroll_w_bar.x&&e.selfX<=t._scroll_w_bar.x+t._scroll_w_bar.getWidth()&&!t._key["scroll_w"]){t._key["scroll_w"]=true;t._key["scroll_x"]=e.selfX-t._scroll_w_bar.x;t._key["mouseX"]=e.selfX;t.addEventListener(LMouseEvent.MOUSE_MOVE,t.mouseMoveW);if(!LGlobal.stage.hasEventListener(LMouseEvent.MOUSE_UP,t.mouseUpW)){LGlobal.stage._ll_scrollbar=t;LGlobal.stage.addEventListener(LMouseEvent.MOUSE_UP,t.mouseUpW)}}else if(e.selfX>0&&e.selfXt._showObject.x){t._key["left"]=true}else{t._key["right"]=true}t._speed=Math.abs(t._target.x-t._showObject.x);t.setSpeed()}};e.prototype.mouseDownH=function(e){var t=e.clickTarget;if(e.selfY>=0&&e.selfY<=t._scrollWidth){if(t._showObject.y>=0){return}t._distance=10;if(t._showObject.y+t._distance>0){t._distance=t._showObject.y}t._target.y=t._showObject.y+t._distance;t._key["up"]=true;t._key["down"]=false;t._key["Dkey"]=true;t._speed=t._distance;t.setSpeed();if(!LGlobal.stage.hasEventListener(LMouseEvent.MOUSE_UP,t.mouseUpH)){LGlobal.stage._ll_scrollbar=t;LGlobal.stage.addEventListener(LMouseEvent.MOUSE_UP,t.mouseUpH)}}else if(e.selfY>=t._mask.getHeight()-t._scrollWidth&&e.selfY<=t._mask.getHeight()){if(t._showObject.y<=t._mask.getHeight()-t._showObject.getHeight()){return}t._distance=10;if(t._showObject.y-t._distance=t._scroll_h_bar.y&&e.selfY<=t._scroll_h_bar.y+t._scroll_h_bar.getHeight()&&!t._key["scroll_h"]){t._key["scroll_h"]=true;t._key["scroll_y"]=e.selfY-t._scroll_h_bar.y;t._key["mouseY"]=e.selfY;t.addEventListener(LMouseEvent.MOUSE_MOVE,t.mouseMoveH);if(!LGlobal.stage.hasEventListener(LMouseEvent.MOUSE_UP,t.mouseUpH)){LGlobal.stage._ll_scrollbar=t;LGlobal.stage.addEventListener(LMouseEvent.MOUSE_UP,t.mouseUpH)}}else if(e.selfY>0&&e.selfYt._showObject.y){t._key["up"]=true}else{t._key["down"]=true}t._speed=Math.abs(t._target.y-t._showObject.y);t.setSpeed()}};return e}();var LWindow=function(){function e(e,t,n){var r=this;LExtends(r,LSprite,[]);r.type="LWindow";r.w=e;r.h=t;r.bar=new LSprite;r.bar.alpha=.7;r.barColor="#0000FF";r.bar.w=r.w;r.bar.h=30;r.addChild(r.bar);r.bar.addEventListener(LMouseEvent.MOUSE_DOWN,r._onBarDown);r.title=new LTextField;r.title.x=r.title.y=3;r.title.size=16;r.title.text=n?n:"";r.bar.addChild(r.title);r.close=new LSprite;r.closeColor="#800000";r.close.w=50;r.close.h=25;r.addChild(r.close);r.close.addEventListener(LMouseEvent.MOUSE_UP,r._onClose);r.sign=new LSprite;r.signColor="#FFFFFF";r.addChild(r.sign);r.layer=new LSprite;r.addChild(r.layer);r.layerColor="#FFFFFF";r.layer.y=r.bar.h;r.layer.h=r.h-r.bar.h;var i=new LGraphics;i.rect(0,0,r.w,r.layer.h);r.layer.mask=i;r.graphics.drawRect(1,r.barColor,[0,r.bar.h,r.w,r.layer.h],true,r.layerColor);r.addEventListener(LMouseEvent.MOUSE_UP,function(e){});r.addEventListener(LMouseEvent.MOUSE_DOWN,function(e){});r.addEventListener(LMouseEvent.MOUSE_MOVE,function(e){});r.addEventListener(LMouseEvent.MOUSE_OVER,function(e){});r.addEventListener(LMouseEvent.MOUSE_OUT,function(e){});r.addEventListener(LEvent.ENTER_FRAME,r._onDraw)}e.CLOSE="close";e.prototype.clone=function(){var t=this,n=new e(t.w,t.h);n.copyProperty(t);n.removeChild(n.bar);n.bar=t.bar.clone();n.addChild(n.bar);n.removeChild(n.close);n.close=t.close.clone();n.addChild(n.close);n.removeChild(n.sign);n.sign=t.sign.clone();n.addChild(n.sign);n.removeChild(n.layer);n.layer=t.layer.clone();n.addChild(n.layer);n.bar.addEventListener(LMouseEvent.MOUSE_DOWN,n._onBarDown);n.close.addEventListener(LMouseEvent.MOUSE_UP,n._onClose);return n};e.prototype._onClose=function(t){var n=t.clickTarget.parent;n.dispatchEvent(e.CLOSE);n.parent.removeChild(n)};e.prototype._onDraw=function(e){var t=e.target;var n=t.getRootCoordinate();if(t.barColorSet==t.barColor){return}t.barColorSet=t.barColor;t.xSet=n.x;t.ySet=n.y;var r=LGlobal.canvas.createLinearGradient(0,-t.bar.h*.5,0,t.bar.h*2);r.addColorStop(0,"#FFFFFF");r.addColorStop(1,t.barColor);var i=LGlobal.canvas.createLinearGradient(0,-t.close.h*.5,0,t.close.h*2);i.addColorStop(0,"#FFFFFF");i.addColorStop(1,t.closeColor);t.bar.graphics.clear();t.bar.graphics.drawRoundRect(1,t.barColor,[0,0,t.bar.w,t.bar.h,t.bar.h*.1],true,r);t.close.graphics.clear();t.close.graphics.drawRoundRect(1,t.closeColor,[t.w-t.close.w,0,t.close.w,t.close.h,t.close.h*.1],true,i);t.sign.graphics.clear();t.sign.graphics.drawLine(4,t.signColor,[t.w-t.close.w+15,5,t.w-15,t.close.h-5]);t.sign.graphics.drawLine(4,t.signColor,[t.w-t.close.w+15,t.close.h-5,t.w-15,5])};e.prototype._onBarDown=function(e){var t=e.clickTarget.parent;t.bar.addEventListener(LMouseEvent.MOUSE_UP,t._onBarUp);t.startDrag()};e.prototype._onBarUp=function(e){var t=e.clickTarget.parent;t.stopDrag();t.bar.removeEventListener(LMouseEvent.MOUSE_UP,t._onBarUp)};return e}();LTable.prototype.addRow=function(){var e=this;var t=e._tableSizeData;var n=e.style;var r=new Array;var i=new LSprite;i.y=e.getHeight();e.addChild(i);var s=0;var o=0,u=0;for(var a=0;a=i[t][n].width){for(var s=0,o=i.length;s=i[t][n].height){for(var s=0,o=i[t].length;s0)return;var n=t.style;var r=t._tableSizeData;var i=0;for(var s=0;s0){var f=0;for(var l=0;l=o){for(var p=0,d=r.length;p=u){for(var p=0,d=r[row].length;p0){f.branch=new LSprite;f.branch.x=30;f.branch.y=f.getHeight()+i.style.branchIndent;f.branch.visible=false;f.addChild(f.branch);var h=new LSprite;h.root=i;h.status=LTreeWidget.BRANCH_CLOSE;h.y=(l.getHeight()-i._branchBtnSize)/2;h.graphics.drawRect(0,"",[0,0,i._branchBtnSize,i._branchBtnSize]);h.graphics.drawVertices(0,"",[[0,0],[i._branchBtnSize,i._branchBtnSize/2],[0,i._branchBtnSize]],true,i.style.branchButtonColor);f.addChild(h);h.addEventListener(LMouseEvent.MOUSE_UP,i._openOrCloseBranch);i._createBranch(f.branch,f,n+1,a.branch)}s+=f.getHeight()+i.style.branchIndent}};LTreeWidget.prototype._openOrCloseBranch=function(e){var t=e.currentTarget;var n=t.root;var r=t.parent;var i=r.parent;var s=i.getChildIndex(r);if(t.status==LTreeWidget.BRANCH_CLOSE){r.branch.visible=true;t.graphics.clear();t.graphics.drawRect(0,"",[0,0,n._branchBtnSize,n._branchBtnSize]);t.graphics.drawVertices(0,"",[[0,0],[n._branchBtnSize,0],[n._branchBtnSize/2,n._branchBtnSize]],true,n.style.branchButtonColor);t.status=LTreeWidget.BRANCH_OPEN}else{r.branch.visible=false;t.graphics.clear();t.graphics.drawRect(0,"",[0,0,n._branchBtnSize,n._branchBtnSize]);t.graphics.drawVertices(0,"",[[0,0],[n._branchBtnSize,n._branchBtnSize/2],[0,n._branchBtnSize]],true,n.style.branchButtonColor);t.status=LTreeWidget.BRANCH_CLOSE}while(i.objectIndex!=n.parent.objectIndex){var o=r.y;for(var u=s;u