function zGridObject(){return{init:function(a,b){this.el=z(a);this.name=a;this.cfg=b;this.el.className="zGrid";var d="";this.cols=b.header.length;for(var e=0;e"+b.header[e][0]+"";this.el.innerHTML="
"+d+'
';this.data=this.el.lastChild.firstChild;this.datadiv=this.el.lastChild; this.data.style.width=b.width+"px";this.el.firstChild.style.height="22px";this.el.firstChild.style.width=b.width-1+"px";this.datadiv.style.height=b.height-23+"px";this.datadiv.style.width=b.width-1+"px";if("sxdGrid1"==this.name)this.oldtime="",this.add=this.addLog;else{var c=this;this.selected=null;this.add=function(a){if("object"==typeof a[0])for(var b in a)this.addRow(a[b]);else this.addRow(a)};this.datadiv.onclick=function(){c.selected.className="";c.selected=null}}},addLog:function(a,b,d){for(var e, c,f=0;f
0%
0%
";this.txt1=this.el.firstChild.firstChild;this.txt2=this.el.lastChild.firstChild;this.top=this.el.lastChild},set:function(a,b,d,e){a=0':(c=' style="background-position:-16px '+ -16*(e[2]-1)+'px;"',f+='
',f+=e[3]&1?'
"+e[1]+"
":'
",f+=e[3]&2?'
':'
',f+="
");this.el.innerHTML=f;30a[c][3]&&(o.size=2==a[c][3]?a[c][5]:0),a[c][3]&1&&(o.childs=[],o.open=a[c][5]||0),b[o.id]=o,0
';c.action= function(){};c.select=function(a,b){this.sel*=1;if(void 0==this.options)return!1;if("+"==a)this.sel+=this.sel';for(var f in b)e=document.createElement("DIV"),e.innerHTML=b[f].text,e.title=e.firstChild.nodeValue||"",f==a.sel&&(e.className="ovr",c.over=e),e.value=b[f].value,e.onmouseover=function(){c.over&&(c.over.className="");this.className="ovr";c.over=this},e.onmousedown=function(){d.runjob?sxd.runSavedJob(c.obj.com,this.value):2==d.btn?sxd.runServices(this.value):c.obj.select(this.value,0);c.style.display="none"},c.firstChild.appendChild(e); c.style.display="block";b=this.offset(a.el);c.style.width=(d.width?d.width:a.el.offsetWidth-4)+"px";e=260>c.firstChild.offsetHeight?c.firstChild.offsetHeight:260;c.style.height=e+"px";c.style.top=b.top-(d.btn?e+a.el.offsetHeight+2:0)+"px";c.style.left=b.left+"px";c.scrollTop=c.over?c.over.offsetTop:0;c.obj=a;c.onmousedown=function(a){a=a||window.event;a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0};document.body.onmousedown=function(){c.style.display="none";document.body.onclick=null}}, offset:function(a){for(var b=a.offsetTop+a.offsetHeight+1,d=a.offsetLeft+2;a=a.offsetParent;)b+=a.offsetTop-a.scrollTop,d+=a.offsetLeft-a.scrollLeft;return{top:b,left:d}},keyNatSort:function(a,b){var d,e;a=a.value;for(b=b.value;(d=/^(\D+|(\d+))(.*?)$/.exec(a))&&(e=/^(\D+|(\d+))(.*?)$/.exec(b));){if(d[2]&&e[2]&&d[2]!=e[2])return 1*d[2]>1*e[2]?1:-1;if(d[1]&&e[1]&&d[1]!=e[1])return d[1]>e[1]?1:-1;if(d[3]&&e[3]&&d[3]!=e[3])a=d[3],b=e[3];else return 0}},formatSize:function(a,b){b=b||0;if(0<=a){for(var d= 0;999[ "+a+" ]":"[ "+a+" ]"}return""},showLoading:function(a){this.loading.innerHTML=a;this.loading.style.visibility="visible"},hideLoading:function(){this.loading.style.visibility="hidden";sxd.job.stop=1;z("btn_stop").disabled=!0;z("btn_pause").disabled=!0;z("btn_again").disabled=!1},newJob:function(){for(var a="",b=0;8>b;b++)a+="qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890".charAt(Math.round(61* Math.random()));return a}};