function reWidth_mouseMove(win){if(user_purview-0!=3)return;var div=_gId('layer_reWidth',win)
if(win.event.button!=1){win.cur_reWidth=false;div.style.display='none'}else{if (win.layer_tuo.style.display=='');{win.document.body.style.cursor="";}if(win.cur_reWidth==true){div.style.left=win.event.x;}}}function reWidth_mouseDown(obj,win){if(user_purview-0!=3)return;win.start_reWidth_x=win.event.x
obj=_gPar("obj.parentElement.id=='tr0'",obj)
if (obj.parentElement.id=='tr0'){win.reWidth_obj=obj;var w=obj.offsetWidth;var h=obj.offsetHeight;var x=win.event.offsetX;if(obj.cellIndex>0) win.reWidth_obj=obj.parentElement.cells[obj.cellIndex];var y=win.event.offsetY;var td_top_y=win.event.y-y;var oDiv=_gId('layer_reWidth',win);oDiv.style.display='';oDiv.style.height=1888;oDiv.style.left=win.event.x;oDiv.style.top=td_top_y;win.cur_reWidth=true;}else{win.document.body.style.cursor="";win.cur_reWidth=false}}function reWidth_mouseUp(win){if(user_purview-0!=3)return;if(win.cur_reWidth==true){var moveWidth=win.event.x-win.start_reWidth_x
var width=win.reWidth_obj.offsetWidth+moveWidth
if (width<20) width=20;if (win.reWidth_obj.width!=width){win.reWidth_obj.width=width;var db_tb_col=win.reWidth_obj.col
var id=win.reWidth_obj.id
var tb=win.workFrame.form1.getElementsByTagName("TABLE");for(var i=0;i<tb.length;i++){if(tb[i].id.indexOf("tb")>-1){tb[i].rows[0].cells[win.reWidth_obj.cellIndex].style.width=width}}if(user_purview==3){win.frame_blank.location='../'+asp_php+'/execute.'+asp_php+'?fileName='+request("fileName",win)+'&id='+id+'&exe=reWidth_save&width='+width}}}main_scroll_link(win);win.cur_reWidth=false
win.document.body.style.cursor="";_gId('layer_reWidth',win).style.display='none'}function reWidth_from_num(win){if(user_purview-0==3){var id=win.tr0_curTd.id;var txt=win.tr0_curTd.innerText;var t1="调整列宽：";var alt="请输入一个大于20并且小于9999的数字";var box="<input id="+id+" maxlength=4 style='width:30px;height:20px;line-height:20px;padding:1px;' title='"+alt+"' value='"+win.tr0_curTd.width+"'  onKeyDown='if(event.keyCode==13){parent.reWidth_from_num_save(this,window)}'>";var but="<img src=../img/but_save.gif align=absmiddle height=16  onclick='parent.reWidth_from_num_save(this,window)'";var t=t1+box+but;zhiShiPai_show(win,win.tr0_curTd,t,'','pai_reWidth','lb-lt',166,50,0,0)}else{alert('错误！\r\r只有管理员才能“调整列宽”')}}function reWidth_from_num_save(obj,win){var td=_gPar("obj.tagName=='TD'",obj);var box=td.getElementsByTagName('INPUT')[0];var id=box.id;var w=box.value;if(isNaN(w))w=80;if(w-0<20)w=20;if(w-0>9999)w=9999;var tr0_curTd=_gId(id,win);tr0_curTd.width=w;var tb=win.workFrame.form1.getElementsByTagName("TABLE");for(var i=0;i<tb.length;i++){if(tb[i].id.indexOf("tb")>-1){tb[i].rows[0].cells[tr0_curTd.cellIndex].style.width=w}}win.frame_blank.location='../'+asp_php+'/execute.'+asp_php+'?fileName='+request("fileName",win)+'&id='+id+'&exe=reWidth_save&width='+w
var div=_gPar("obj.className=='zsp_box'",obj);div.removeNode(true);}