function Rectangle(n,i,e,r){function o(t){t=parseFloat(t);return isNaN(t)||t<0?0:t}this.X=function(t){if(void 0===t)return n;n=o(t)},this.Y=function(t){if(void 0===t)return i;i=o(t)},this.W=function(t){if(void 0===t)return e;e=o(t)},this.H=function(t){if(void 0===t)return r;r=o(t)},this.RectParam=function(t,n,i,e){this.X(t),this.Y(n),this.W(i),this.H(e)},this.Rect=function(t){if(void 0===t)return this;this.RectParam(t.X(),t.Y(),t.W(),t.H())},void 0===n?n=0:this.X(n),void 0===i?i=0:this.Y(i),void 0===e?e=0:this.W(e),void 0===r?r=0:this.H(r)}function PercentColumn(t,n,i,e){var r=new Rectangle(t,n,i,e),o=new Rectangle,s=!1,a=0,l="#000";this.X=function(t){if(void 0===t)return r.X();r.X(t)},this.Y=function(t){if(void 0===t)return r.Y();r.Y(t)},this.W=function(t){if(void 0===t)return r.W();r.W(t)},this.H=function(t){if(void 0===t)return r.H();r.H(t)},this.Percent=function(t){if(void 0===t)return a;t=parseFloat(t),t=isNaN(t)||t<0?0:100=l.length;)l.push(1);l[i]=isNaN(n)||n<=0?1:n}}function c(){for(var t=0,n=0;n=a.length?a.length-1:t},this.RectParam=function(t,n,i,e){s.RectParam(t,n,i,e)},this.Rect=function(t){if(void 0===t)return s;s.Rect(t)},this.Rotate=function(t){if(void 0===t)return f;f="boolean"==typeof t&&t;for(var n=0;na.length?(a.push(new PercentColumn),t=a.length-1):a.splice(t,0,new PercentColumn),a[t].Color(i),u(t,n)},this.ChangeRStat=function(t,n,i){t=parseInt(t);!isNaN(t)&&0<=t&&t=o.length?o.length-1:t},this.StatCount=function(){return o.length},this.RectParam=function(t,n,i,e){r.RectParam(t,n,i,e)},this.Rect=function(t){if(void 0===t)return r;r.Rect(t)},this.Rotate=function(t){if(void 0===t)return a;a="boolean"==typeof t&&t},this.AddStatus=function(t,n){void 0===n&&(n="#000");n=null===(n=n.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i))?"#000000":n[0],t=parseInt(t);isNaN(t)||t<0||t>o.length-1?o.push(n):o.splice(t,0,n)},this.ChangeStatus=function(t,n){void 0===n&&(n="#000");n=null===(n=n.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i))?"#000000":n[0],t=parseInt(t);!isNaN(t)&&0<=t&&t=P.length?-1:r,t=new Date;-1==r?(P.push(n),W.push(i),N.push(e),s.push(t),a.push(t)):(P.splice(r,0,n),W.splice(r,0,i),N.splice(r,0,e),s.splice(r,0,t),a.splice(r,0,t))},this.ChangeProc=function(t,n,i,e){var r=parseInt(t),r=isNaN(r)||r<0||r>=P.length?-1:r,t=new Date;-1!=r&&(P.splice(r,1,n),W.splice(r,1,i),N.splice(r,1,e),s.splice(r,1,t),a.splice(r,1,t))},this.DelStove=function(t){0!=P.length&&(t=parseInt(t),-1==(t=isNaN(t)||t<0||t>=P.length?-1:t)?(P.pop(),W.pop(),N.pop(),s.pop(),a.pop()):(P.splice(t,1),W.splice(t,1),N.splice(t,1),s.splice(t,1),a.splice(t,1)))},this.StartDate=function(t,n){t=parseInt(t);-1!=(t=isNaN(t)||t<0||t>=s.length?-1:t)&&(s[t]=n)},this.EndDate=function(t,n){t=parseInt(t);-1!=(t=isNaN(t)||t<0||t>=s.length?-1:t)&&(a[t]=n)},this.ChangeStatProc=function(t,n,i){t=parseInt(t);!isNaN(t)&&0<=t&&ta[n]&&(t=s[n],s[n]=a[n],a[n]=t)}}