function main_auto_open_first(id,win)
{
if(win.open_first!=1)return;
win.open_first=0;
var div=win.tf.div_window_box;
if(!div)return;
if(div.style.display=='none'){return}
else
{
main_tr_edit(id,win)
}
}
function main_tr_edit(curID,win)
{
var fileName=request("fileName",win);
var b=gid('but_click',win);
if(!b)return;
if(b.className=='view_selected')return; 
var b2=gid('but_click_bottom',win);
if(!b2)return;
if(b2.className=='view_selected')return;
divWin_open(fileName,curID,"edit",win.workFrame);
main_show_cur_tr(curID,win)
}
function main_scroll_link(win)
{
var tr0_div_div=gid('tr0_div_div',win)
var td0_div_div=gid('td0_div_div',win)
if (win.from_to=="L-R")
{
win.workFrame.document.body.scrollTop=win.td0_div_div.scrollTop;
win.td0_div_div.scrollTop=win.workFrame.document.body.scrollTop;
}
else if(win.from_to=="T-R")
{
win.workFrame.document.body.scrollLeft=win.tr0_div_div.scrollLeft;
}
else
{
td0_div_div.scrollTop=win.workFrame.document.body.scrollTop;
tr0_div_div.scrollLeft=win.workFrame.document.body.scrollLeft;
}
}
function main_on_load(win)
{
if(win.record_more_show_type=='click_bottom'){tf.gid('but_click_bottom',win).className='view_selected'}
else if(win.record_more_show_type=='click_right'){tf.gid('but_click',win).className='view_selected'}
if(gid("but_bar",win.parent))
{
var tixin=(win.tixin&&win.tixin.length>0)?(win.tixin):('');
var fileName=(tixin.length>0)?(win.fileName+"_"+tixin):(win.fileName);
var toolbutStr=win.cur_mk_button_str;
show_cur_mk_button(toolbutStr,fileName,tixin,win);
}
main_get_shai_str(win);
}	
function show_title(win)
{
var pf=request("parent_fileName",win);
if (pf!="")
{
var f=request("fileName",win);
url="../asp/execute.asp?exe=show_sub_title&fileName="+f+"&parent_fileName="+pf;
var s=ajax(url);
var o=gid("sub_mk_title",win.parent)
if(o)
{
o.innerHTML=s;
}
}
}	
function main_add_left(s,s2,win)
{
var arr=s.split(",");
var arr2=s2.split("<tr>")
var arr1,No;
var div=_gId('td0_div_div',win);
var max_No=0;
if(div.innerHTML.length>0)
{
var ids=win.document.getElementsByName("id")
var last_id=ids[ids.length-1]
var max_No=last_id.parentElement.innerText-0;
}
var tb_str="<table id=td0_div_div_tb cellpadding=0  cellspacing=0>";
for(var i=1;i<arr.length;i++)
{
var title="";
arr1=arr[i].split('|')
if (arr1[1]==1)
{
title=''+lang4("_Read_only_shared")+'';
}
else if(arr1[1]==2)
{
title=''+lang4("_Complete_sharing")+'';
}
class_name="td0_share_"+arr1[1];
var value=arr1[0];
var on_click="";
on_click+="tf.main_set_a_tr_bg(this,window)"
tb_str+="<tr><td width=28 class="+class_name+" title='"+title+"' onMouseOut=tf.c_h(this)  onMouseOver=tf.c_s(this)><input id='id_"+value+"' onclick='"+on_click+"' type=Checkbox name=id value="+value+"><div>"+(i+max_No)+"</div></td>"+arr2[i]+"</tr>";
}
tb_str+="</table>";
var tb2_str="<table id=td0_div_div_tb2 cellpadding=0  cellspacing=0 style='height:126px;'>";
tb2_str+="<tr><td height=20 width=28><td colspan=100 bgcolor=f7f5ee></tr>";
tb2_str+="<tr><td height=20><td colspan=100 bgcolor=f7f5ee></tr></table>";
if(div.innerHTML.length<10)
{
div.innerHTML=tb_str+tb2_str;
}else
{
var tb2=_gId('td0_div_div_tb2',win)
tb2.insertAdjacentHTML("beforeBegin",tb_str);
win.workFrame.document.body.scrollTop=1000;
}
}
function get_main_html(win)
{
if(main_html.length<10)
{
main_html=ajax(main_url);
}
win.document.write(main_html);
}
function main_delRow(id,win)
{
var chk=_gName('id',win);
for (var i=0;i<chk.length;i++)
{
if(chk[i].value==id)
{
var oTr=chk[i].parentElement.parentElement
oTr.style.display='none'
break;
}
}
var tr=win.workFrame.document.getElementsByTagName('TR');
for (var i=0;i<tr.length;i++)
{
if(tr[i].id=="tr_"+id)
{
var oTb=tr[i].parentElement
oTb.deleteRow(tr[i].rowIndex)
break;
}
}
}
function main_re_tr0_div_div(win)
{
var div1=gid('tr0_div',win);
var div2=_gId('tr0_div_div',win);
if(!div1)return;
var w=div1.parentElement.offsetWidth;
try{
div1.style.width=w;
div2.style.width=w;
}
catch(err){}
}
function main_re_td0_div_div(win)
{
var tb=gid('panel_tb',win);
var left_div=gid('left_div',win);
if(!tb || !left_div)return;
tb.style.height=tb.parentElement.offsetHeight;
left_div.style.height=win.panel_td3.offsetHeight;
var td0_div=gid('td0_div',win);
var td0_div_div=gid ('td0_div_div',win);
if(td0_div)
{
td0_div.style.display='none';
var h=td0_div.parentElement.offsetHeight;
td0_div.style.height=h;
td0_div_div.style.height=h;
td0_div.style.display='';
}
}
function main_tr0_reName(win,obj)
{
if(user_purview-0!=3)
{
alert(lang4("_Column_privileges"))
return;
}
if(!obj)var obj=win.tr0_curTd;
if(obj.id!='tr0_col_cnName')
{obj=_gSub("subs[i].id=='tr0_col_cnName'",obj,'TD')}
var o=obj.getElementsByTagName('INPUT')[0];
if(o){o.select();return;}
obj.innerHTML="<input value='"+obj.innerText.replace(/'/g,'&#39;')+"' onblur=tf.main_column_reName_save(this,window)  onkeydown='if(event.keyCode==13){this.blur()}'/>"
var o=obj.getElementsByTagName('INPUT')[0];
o.style.width=obj.offsetWidth;
o.focus();
}
function main_column_reName_save(obj,win)
{
var tr0_curTd=_gPar("obj.parentElement.id=='tr0'",obj)
var url='../'+asp_php+'/execute.'+asp_php+'?fileName='+request('fileName',win)+'&id='+tr0_curTd.id+'&exe=col_reName_save&col_text='+escape(obj.value);
win.frame_blank.location.href=url;
obj.parentElement.innerText=obj.value;
}
function main_tr0_menu_show(win)
{
var obj = win.event.srcElement;
par=_gPar("obj.wanneng_menu==0",obj);
var o=(par.wanneng_menu==0)?par:obj;
var str=""
try{str=win.get_selected_menu_id()}catch(e){str=",1,2,3,4,5,6,7,"}
menu(o,win,set_menu_content('main_tr0_menu',str,win,0,'tf.','menu',-3,3,'xy-lt'),0,0,'xy-lt');
}
function main_tr0_write(win,main_tr0_str)
{
var s="";
main_tr0_str=ytd_htmlDeCode(main_tr0_str);
var arr0=(main_tr0_str+"[tb]").split("[tb]");
if(arr0[1].length>0)gid('listAdd_bar',win).innerHTML=arr0[1];
var arr=arr0[0].split("[tr]");
var tr0_menu_str=""
try{tr0_menu_str=win.get_selected_menu_id();}catch(e){tr0_menu_str=",1,2,3,4,5,6,7,"}
for (var i=0;i<arr.length;i++)
{
if (arr[i].length>2)
{
var arr1=arr[i].split('[td]');
var i7=null,input_type=arr1[7]
var xml=arr1[9];
if(input_type&&input_type.indexOf("but:")>-1)
{
i7=arr1[7].split("<!>");
if(i7=="but:tongYong")
{
input_type=get_xml(xml,'but_click');
win.main_but_fun_content+="<script>"+get_xml(xml,'fun_content')+"</s"+"cript>"
}
else if(i7[0]=="but:shenHe")
{
}
}
var w=arr1[6]
s+="<td class=tr0_td id='"+arr1[0]+"' coltyp='"+arr1[7]+"' cellName='"+arr1[1]+"' img='' show='0' width='"+w+"' input_type='"+input_type+"' select_str='' read_write='"+arr1[5]+"' beizhu_yn='' check_weiYi_str='"+arr1[8]+"' buttons_xg='"+arr1[10]+"'>";
s+="<table border=0 width='100%' height='21' cellpadding=0 cellspacing=0>";
s+="<tr>";
s+="<td wanneng_menu=0 id=L2 onClick=\"tf.main_get_tr0_curTd(this,window);tf.menu(this,window,tf.set_menu_content('main_tr0_menu','"+tr0_menu_str+"',window,0,'tf.','menu',-3,3,'rt-lt'),0,0,'')\"></td>";
s+="<td id=tr0_col_cnName title='"+arr1[2]+"' onMouseDown=tf.main_tr0_tuo_down(window); "
s+="onDblClick=tf.main_tr0_reName(window,this)>"+arr1[2]+"</td>";
s+="<td  class=tr0_tb_td_R onMouseDown='tf.reWidth_mouseDown(this,window);'></td>";
s+="</tr>";
s+=" </table>";
s+="</td>";
if(i==arr.length-2)
{
s+="<td width=22 ></td>" 
}
}
}
if(s==""){s=""+lang4("_Right_click")+"";return;}
s="<table cellpadding=0 cellspacing=0  id=head_tb onMouseMove='tf.main_tr0_tuo_move(window);'><tr id=tr0 >"+s+"</tr></table>"
gid('tr0_div_div',win).innerHTML=s;
}
function main_tr0_sort(Sort,win)
{
var s=win.tr0_curTd.cellName+":"+Sort;
win.shai_form.input_sort.value=s;
win.shai_form.input_cur_page.value=1;
_gId('div_body',win.workFrame).innerHTML=''
win.shai_form.submit()
var tr=_gId('tr0',win).getElementsByTagName("TD")
for (var i=0;i<tr.length;i++)
{
if(tr[i].id=='L2'){tr[i].className='sort_none'}
}
var td=_gSub("subs[i].id=='L2'",win.tr0_curTd,'TD')
td.className='sort_'+Sort;
gid('td0_div_div',win).innerHTML='';
}
function main_set_a_tr_bg(obj,win)
{
if(obj && request("exe",win)=="select_record_a")
{
mw_go_select_record_a(obj.value,win.workFrame);
return;
}	
var tr=win.workFrame.document.getElementById('tr_'+obj.value);
main_set_sel_tr(obj,tr);
main_chkall_state(win);
}
function main_check_all(form,win,typ)
{
var s="";
var checks=win.document.getElementsByName("id")
for (var i=0;i<checks.length;i++)
{
var e =checks[i];
if (typ=='fan')
{
e.checked=!e.checked
}
else
{
e.checked =_gId('chkall',win).checked;
}
main_show_cur_tr_2(e,win);
}
if(s!="")outWin.addRow(s);
main_chkall_state(win);
}
function main_show_cur_tr_2(check,win)
{
var td=check.parentElement;
var div=td.getElementsByTagName("DIV")[0];
var tr=gid("tr_"+check.value,win.workFrame);
if(check.checked==true)
{
check.style.display='block';
div.style.display='none';
}
else
{
check.style.display='none';
div.style.display='';
}
main_set_sel_tr(check,tr);
}
function main_set_sel_tr(check,tr)
{
if(!tr)return;
var arr=(tr.className+"  ").split(" ");
var cN=arr[0];
if(check.checked==true)
{
if(cN.indexOf('tr1')>-1)cN='tr1_cur';
if(cN.indexOf('tr2')>-1)cN='tr2_cur';
}
else
{
if(cN.indexOf('tr1_cur')>-1)cN='tr1';
if(cN.indexOf('tr2_cur')>-1)cN='tr2';
}
if(arr[1].length>0)
{
tr.className=cN+" "+arr[1];
}else
{
tr.className=cN;
}
}
function main_chkall_state(win,obj)
{
var checks=win.document.getElementsByName("id")
var c1,chkall=win.document.getElementsByName('chkall')[0];
if(checks.length<1){return;}
for (var i=0;i<checks.length;i++)
{
if(i==0)
{
c1=checks[i]
}
else
{
if (c1.checked==!checks[i].checked)	
{
chkall.indeterminate="-1"
return;
}
}
}
chkall.checked=c1.checked;
chkall.indeterminate=""
}
function main_reSet(win)
{
var d=gid('del',win).value;
var sort_v=giv("input_sort",win);
win.shai_form.reset();
gid('input_sort',win).value=sort_v;
change_sou_type(1,win);
var chk=gid('but_and_shai',win)
chk.checked=false;
and_shai(chk,win);
gid('del',win).value=d;
}
function main_reSize(win)
{
main_reSize_mainDiv(win);
main_re_tr0_div_div(win);
main_re_td0_div_div(win);
sx_resize_auto(win);
main_reSize_tr1_main(win);
}
function main_reSize_tr1_main(win)
{
var h0=gih('main_main',win);
var h1=gih('tr0_parent_tr',win)
var	h2=gih('tr_page',win)
var tr1=gid('tr1_main',win);
var h=h0-h1-h2
if(tr1 && h>0){tr1.style.height=h+'px'}
}
function main_reSize_mainDiv(win)
{
var w0=win.document.body.offsetWidth
var w1=giw('main_left',win);
var w2=giw('dhl_tuo',win);
var w3=giw('main_right',win);
var w4=giw('dhl_tuo2',win);
var w=w0-w1-w2-w3-w4-2;
var h0=win.document.body.offsetHeight
var h1=gih('sou_bar_tr',win);
var h2=gih('tb_fx',win);
var h3=gih('main_top_line',win);
var h4=gih('main_bottom_line',win);
var h=h0-h1-h2-h3-h4-1;
var c1=gid('but_click',win).className;
var c2=gid('but_click_bottom',win).className;
if( c1=='view_selected' )
{	
r_w=w3;
var h2=h;
}
else if(c2=='view_selected')
{
w=w+w3;
r_w=w0;
var h2=h/2;
}
else
{
r_w=w3;
var h2=h;
}
if(win.top.document.location.href.indexOf('select_record_a.htm')>-1)w-=5;
setw('main_main',w,win);
setw('main_right',r_w,win);
seth('main_left',h2,win);
seth('dhl_tuo',h2,win);
seth('dhl_tuo2',h2,win);
seth('main_main',h2,win);
seth('main_right',h2,win);
}
function main_show_cur_tr(id,win)
{
var ids=win.document.getElementsByName("id");
for(var i=0;i<ids.length;i++)
{
ids[i].checked=(ids[i].value+''==id)?true:false;
tf.main_show_cur_tr_2(ids[i],win);
}
tf.main_chkall_state(win);
}
function main_submit_page_and_shai(win,e_button,action)
{
var kObj=gid("keyword",win);
if(!kObj){alert(lang4("_The_module"));return}
var fhObj=gid("fuhao",win);
if(kObj.value==""&&e_button=="sou"&&(fhObj.value=="begin"||fhObj.value=="end"))
{
var content=""+lang4("_Please_input")+"";
zhiShiPai_show(win,kObj,""+lang4("_system_prompts")+"",content,"main_mk_sou_zspai",'lt-lb',222,50,0,0);	
alert('请输入搜索内容');
return;
}
else if(win.main_mk_sou_zspai)
{
win.main_mk_sou_zspai.removeNode(true);
}
if(e_button=='sou')
{
gid('but_and_shai',win).value='';
gid('sou_type',win).value=(gid('but_gao_bg',win).style.visibility=='visible')?("sou_gaoJi"):("sou");
}
if(action=="top"&&gid("module_shai_frame").style.display!="none")
{
var colName=win.shai_form.col_name.value;
var fuhao="like";
var keyword=_gId("top_keyWord").value;
show_sou_fanwei(_gId("sou_but_show_mk"),"yes");
module_shai_frame.sou_ok(colName,fuhao,keyword);
}
else
{
var cp=_gId('page_form',win).input_cur_page;
var cip=_gId('page_form',win).input_count_in_page;
win.shai_form.input_cur_page.value=(cp)?(cp.value):(1);
if(cip)win.shai_form.input_count_in_page.value=cip.value;
if(gid("top_keyWord")&&action=='top')
{
win.shai_form.keyword.value=giv("top_keyWord");
}
var c=_gId('chkall',win);
if(c){c.checked=false;c.indeterminate=''}
var pai=_gId('main_work_pai',win.workFrame);
if(pai)pai.removeNode(true);
main_shai_submit(win)
}
}
function main_shai_submit(win)
{
var ss=gid('sou_shai_type',win);
var as=gid('but_and_shai',win);
var so=gid('sou_type',win);
if(as.checked==true)
{
if(so.value=="sou")
{
ss.value="sou_shai";
}
else
{
ss.value="sou_gaoJi_shai";
}
}
else
{
if(as.value=='shai')
{
ss.value='shai';
}
else
{
ss.value=so.value;
}
}
if(ss.value.indexOf('sou')>-1)
{
if(giv('keyword',win).length>0)
{
if(giv('col_name',win)=='9999')
{
alert("请选择要搜索的字段");
gid('col_name',win).focus();
return;
}
}
}
main_shai_submit_sub(win)
}
function main_shai_submit_sub(win)
{
tf.gid('td0_div_div',win).innerHTML='';
tf.gid('div_body',win.workFrame).innerHTML=tf.loading(1);
tf.mw_clear_sum(win.workFrame);
if(gid('left_div',win).innerHTML=='&nbsp;')
{
tf.gid('run_first',win).value='yes';
}
win.shai_form.submit();
}
function main_get_shai_str(win)
{
var url="../"+asp_php+"/get_shai_."+asp_php+"?exe=get_shai_time&fileName="+request("fileName",win)
var s=ajax(url);
if(s=="")return;
var htm="",dateArr,strArr,dateStr,str="";
if(s!=""&&s.indexOf("|/tr|")>-1)
{
dateArr=s.split("|/tr|");
var arr;
for(var i=0;i<dateArr.length;i++)
{
if(dateArr[i].indexOf("|/td|")>-1)
{
arr=dateArr[i].split("|/td|");
htm+="<span style='margin-left:10px;'>"+arr[1]+":";
htm+="<b><input onclick=\"tf.show_search_box('日初,周初,月初,季初,年初,日初-1日,周初-1周,月初-1月,季初-1季,年初-1年,日初+2日-1秒,现在-1小时','ttt_from_"+arr[0]+"','select',window)\" onblur=\"tf.hid_search_box(this,window)\" size=10 name='ttt_from_"+arr[0]+"' id='ttt_from_"+arr[0]+"'>";
htm+="<button onclick=\"tf.get_date_time('ttt_from_"+arr[0]+"',0,'',window)\"  class=sel_box_but_bg>";
htm+="</button></b>";
htm+="&#8211;";
htm+="<b><input onclick=\"tf.show_search_box('日末,周末,月末,季末,年末,日末-1日,周末-1周,月末-1月,季末-1季,年末-1年,日末+3日+1秒,现在+120分钟','ttt_to_"+arr[0]+"','select',window)\" onblur=\"tf.hid_search_box(this,window)\" size=10 name='ttt_to_"+arr[0]+"' id='ttt_to_"+arr[0]+"'>";
htm+="<button onclick=\"tf.get_date_time('ttt_to_"+arr[0]+"',0,'',window)\" class=sel_box_but_bg>";
htm+="</button></b>";
htm+="</span>";
}
}
}
gid('shai_changYong_span',win).innerHTML=htm; 
sx_resize_auto(win);
}
function main_get_tr0_curTd(obj,win)
{
if (obj==null) var obj=win.event.srcElement;
obj=_gPar('obj.parentElement.id=="tr0"',obj)
if (obj.tagName=='TD')
{
win.tr0_curTd=obj
return obj;
}
else
{
win.tr0_curTd=null;
}
}
function main_left_write_content(win,s)
{
gid('left_div',win).innerHTML=s;
if(tf.request("main_left",win)=='no')
{
tf.hid('main_left',win);
tf.hid('dhl_tuo',win);
}
else if(tf.request("main_left",win)=='h')
{
control_sh('left_td1,left_td3_td1',"none",win.document);
return;
}
else
{
if(s &&　s.length>10)main_left_menu_expend(win);
}
var divs=win.document.getElementById('left_div').getElementsByTagName('DIV');
for(var i=0;i<divs.length;i++)
{
if(divs[i].id=='kuaijie_div' || divs[i].id=='kuaijie_div' || divs[i].getElementsByTagName('DL').length>0)
{
_gId('left_td1',win).style.display='';
_gId('left_td3_td1',win).style.display='';
_gId("main_left",win).style.width="160px";
_gId("dhl_t_close",win).className="dhl_t_close";
divs[i].style.overflow='visible';
return;
}
}
}
function main_left_show_all(win)
{
var divs=win.document.getElementById('left_div').getElementsByTagName('DIV');
for(var i=0;i<divs.length;i++)
{
if(divs[i].getElementsByTagName('DL').length>0)
{
divs[i].style.overflow='hidden';
}
}
var Is=win.document.getElementById('left_div').getElementsByTagName('I');
for(var i=0;i<Is.length;i++)
{
Is[i].style.backgroundColor='#ffffff';
}
}
function main_look(obj,exe,win)
{
var td=_gPar("obj.tagName=='TD'",obj);
var tr=_gPar("obj.tagName=='TR'",obj);
var id=tr.id.replace('tr_','');
var tr0=gid('tr0',win);
var cur_td=tr0.cells[td.cellIndex];
var col=cur_td.cellName;
var f=request("fileName",win);
win.workFrame.showModalDialog("dialog.htm?go=../"+asp_php+"/look."+asp_php+"?fileName="+f+"&id="+id+"&col="+col+"&title="+encodeURIComponent(cur_td.innerText)+"&exe="+exe,win.workFrame,'help:no;resizable:yes;status:no;dialogWidth:720px;dialogHeight:600px');
}
function look_img(img,win)
{
win.workFrame.showModelessDialog('look_img.htm?img='+img,win.workFrame,'resizable:yes;help:no;dialogWidth:450px;dialogHeight:300px')
}
function main_tr_new(win)
{
var div=_gId('listAdd_bar',win);
var is=div.getElementsByTagName('INPUT');
var s1="",s2="";
if(is.length>0)
{
for(var i=0;i<is.length;i++)
{
if(is[i].value.length<1 && is[i].getAttribute('type')!='hidden')
{
alert(lang4("_relevant_data"));
is[i].focus();
return false;
}
else
{
var v=is[i].value;
if(v.length>0)
{
s1+="&$"+is[i].name+"="+encodeURIComponent(v);
}
}
}	
}
var url="../"+asp_php+"/execute."+asp_php+"?exe=main_tr_new&fileName="+request("fileName",win)+"&parent_fileName="+request("parent_fileName",win)+"&parent_id="+request("parent_id",win)+s1;
win.workFrame.frame_asp.document.location.href=url;
ks_add_reSet(win);
}
function main_tr_news(fileName)
{
var go_str="adds.htm?fileName="+fileName;
open_dialog(go_str,1360,600,1);
}
function main_editBox_to_td(win,obj)
{
var td_o=mw_select(win.workFrame);
if(td_o)td_o.value=obj.value;
}
function main_set_view(win,tag,save_yn)
{
var v="new_window";
var but=gid('but_click_bottom',win);
var but2=gid('but_click',win);
if(tag=='click_bottom')
{
if(but.className=='view_selected')
{
but.className='';
}
else
{
if(win.document.body.offsetHeight<300 && save_yn=='not_save')return;
but.className='view_selected'
v=tag;
but2.className='';
}
}
if(tag=='click_right')
{
if(but2.className=='view_selected')
{
but2.className='';
}
else
{
if(win.document.body.offsetWidth<900 && save_yn=='not_save')return;
but2.className='view_selected'
v=tag;
but.className='';
}
}
main_sh_right(win);
if (save_yn!='not_save')
{
var url='execute.htm?s=record_more_show_type&v='+v;
gid('frame_blank',win).src=url;
}
}
function main_sh_right(win)
{
var c1=gid('but_click',win).className;
var c2=gid('but_click_bottom',win).className;
if( c1=='view_selected' )
{	
hid_('main_right',win);
hid_('dhl_tuo2',win);
hid('main_bottom_line',win);
gid('dhl_tuo2',win).style.float='left';
gid('main_bottom_line',win).style.float='left';
gid('main_right',win).style.float='left';
gid('main_right',win).style.display='';
gid('main_right',win).style.width='500px';
}
else if(c2=='view_selected')
{
hid_('main_right',win);
hid('dhl_tuo2',win);
hid_('main_bottom_line',win);
gid('dhl_tuo2',win).style.float='none';
gid('main_bottom_line',win).style.float='none';
gid('main_right',win).style.float='none';
gid('main_right',win).style.display='';
}
else
{
hid('main_right',win);
hid('dhl_tuo2',win);
hid('main_bottom_line',win);
}
main_reSize(win);
}
function main_select_win(cmn,cn,bn,from_fileName,sh,where,guanLian_yn,win)
{
var p=win.event.srcElement;
var d=p.parentNode;
while(d.tagName!="DIV")
{
d=d.parentNode;
}
var dl=d.getElementsByTagName("DL")[0];
if(p&&p.tagName=="P")
{
var col=dl.col;
var arr,arr1;
var bind_col="";
if(cn.indexOf(".")&&bn.indexOf(".")>-1)
{
arr=cn.split(".");
arr1=bn.split(".");
var k=0;
for(var i=0;i<arr.length;i++)
{
if(col==arr[i])
{
k=i;
}
}
bind_col=arr1[k];
}
else
{
bind_col=bn;
}
var url="../"+asp_php+"/work_tr_exe."+asp_php+"?exe=read_bind_firstCol&fileName="+from_fileName+"&id="+bind_col+"&guanLian_yn="+guanLian_yn;
if(where && where.length>0){url+="&"+where;}
if(event.altKey==true)
{
window.open(url)
return;
}
var s=ajax(url);
if(s!="")
{
var arr=s.split("|/td|"),htm="";
var n='shai_'+dl.n;
for(var i=0;i<arr.length;i++)
{
if(arr[i]+""!="")
{
var cn=arr[i];
var v=cn.replace(/'/g,"&#39;")
htm+="<div id=c><label><input type=radio name='"+n+"' value='"+v+"'>"+cn+"</label></div>"
}
}
dl.innerHTML=htm;
}
}
else if(p&&p.tagName=="I")
{
tf.i_selected(dl,p);
var zd=dl.n; 
var word=p.innerText; 
main_reSet(win);
win.shai_form.col_name.value=zd;
win.shai_form.keyword.value=word;
win.shai_form.fuhao.value="like";
main_submit_page_and_shai(win); 
}
}
function main_shenHe(obj,win)
{
var td=_gPar("obj.tagName=='TD'",obj);
var tr=_gPar("obj.tagName=='TR'",obj);
var id=tr.id.replace('tr_','');
var f=request("fileName",win);
if(win.document.location.href.indexOf('work_tr_box.htm')>-1)
{
var tr0=gid('tr0',win);
if(tr0)
{
var sub_f_div=_gPar("obj.id.indexOf('sub_')>-1",obj);
var f=sub_f_div.id.replace('sub_','');
}
}
else
{
var tr0=gid('tr0',win.parent);
}
var cur_td=tr0.cells[td.cellIndex];
col=cur_td.cellName;
win.showModalDialog("../main/shenHe_win.htm?info=shenHe&fileName="+f+"&id="+id+"&col="+col,win,'help:no;resizable:yes;status:no;dialogWidth:620px;dialogHeight:380px');
}
function s_h_jt(win)
{
var but_bar=_gId('but_bar_td');
var jt=_gId('tool_bar_jt_span',win);
if(but_bar && but_bar.style.display!='none')
{
jt.style.backgroundPosition="0px -20px";
jt.title=""+lang4("_Hide_toolbar")+"";	
}
else
{
jt.style.backgroundPosition="0px -40px";
jt.title=""+lang4("_Show_toolbar")+"";	
}
var sou_bar=_gId('sou_bar_tr',win);
var jt=_gId('sou_bar_jt_span',win);
if(sou_bar && sou_bar.style.display!='none')
{
jt.style.backgroundPosition="0px -20px";
jt.title=""+lang4("_Hide_toolbar")+"";	
}
else
{
jt.style.backgroundPosition="0px -40px";
jt.title=""+lang4("_Show_toolbar")+"";	
}
var cur_bar=_gId('tb_fx',win);
var jt=_gId('curContent_bar_jt_span',win);
if(cur_bar && cur_bar.style.display!='none')
{
jt.style.backgroundPosition="0px -20px";
jt.title=""+lang4("_Hide_current")+"";	
}
else
{
jt.style.backgroundPosition="0px -40px";
jt.title=""+lang4("_Display_current")+"";	
}
}
function  sx_resize_auto(win)
{
var spanObj=_gId('shai_changYong_span',win);
var tdObj=spanObj.parentNode;
var w=0;
var htm="";
var htm1="";
var s1="";
var s2="";
var divObj=_gId("menu_shai_more_td3",win);
htm1=divObj.innerHTML;
divObj.innerHTML="";
spanObj.insertAdjacentHTML("beforeEnd",htm1);
var nodes=spanObj.getElementsByTagName("SPAN");
var max_c=320;
for(var i=0;i<nodes.length;i++)
{
var w1=nodes[i].offsetWidth;
if(w1>max_c){max_c=w1};
w+=w1;
if(w>tdObj.offsetWidth) 
{
s2+=nodes[i].outerHTML+"<br>";
}
else
{
s1+=nodes[i].outerHTML;
}
}
spanObj.innerHTML=s1;
var tb=gid('menu_shai_more',win);
if(s2.length>10)
{tb.style.width=max_c+30;
}else
{tb.style.visibility='hidden';}
divObj.innerHTML=s2;
gid('but_s_h_shai',win).style.visibility=(s2.length>10)?('visible'):('hidden');
}
function hid_and_show_more(obj,id,win)
{
var mObj=_gId(id,win);
var span=obj.getElementsByTagName("SPAN")[0];
if(mObj.style.visibility!="hidden")
{
mObj.style.visibility="hidden";	
if(span)span.className="show_more";
obj.style.marginTop='0px';
obj.getElementsByTagName('SPAN')[0].className='show_more';
}
else
{
mObj.style.visibility="visible";
if(span)span.className="hid_more";
var x_y=get_xy_jiao(obj,"rb");
var x=parseInt(x_y.split(",")[0]);
var y=parseInt(x_y.split(",")[1]);
mObj.style.top=y;
mObj.style.left=x-mObj.offsetWidth;
obj.style.marginTop='4px';
obj.getElementsByTagName('SPAN')[0].className='hid_more_cur';
}
}
function show_sou_type(obj,win)
{
var sou_type=_gId("shai_form",win).sou_type.value;
var pic_1="",pic_2="",pic_3="";
if(sou_type=="sou"){pic_1="../img/16x16_y.gif?0,-640";}
if(sou_type=="so_gaoJi"){pic_3="../img/16x16_y.gif?0,-640";}
var s="1|"+lang4("_Search_only")+"|tf.change_sou_type(1,window)|"+pic_1+"|0";
s+="[&]2|"+lang4("_Advanced_search")+"|tf.change_sou_type(3,window)|"+pic_3+"|0[&]";
menu(obj,win,set_menu_content('main_sou_or_shai',s,win,0,'tf.','menu',-3,3,'','[&]','|',1),0,0,'lt-lb')
}
function change_sou_type(typ,win)
{
var sou_typ=gid("sou_type",win);
var obj=_gId("sou_sel",win);
var but=gid('but_and_shai',win);
if(typ==1)
{
_gId("menu_shai_more",win).style.visibility="hidden";	
_gId("but_gao_bg",win).style.visibility="hidden";
_gId("div_gaoJi_shai",win).style.display="none";
obj.style.backgroundPosition="0px -50px";
sou_typ.value="sou";
}
else
{
_gId("menu_shai_more",win).style.visibility="hidden";	
_gId("but_gao_bg",win).style.visibility="visible";	
sou_typ.value="";
sou_typ.value="sou_gaoJi";
obj.style.backgroundPosition="0px -150px";
show_gaoJi_shai(win)
}
if(typ==3)
{
_gId("and_or",win).disabled=true;
_gId("and_or",win).style.visibility="hidden";	
var col_sel=_gId("col_name",win);
if(col_sel.options[0].value=="_notMemo_"&&col_sel.options[1].value=="_all_")
{
col_sel.options[0].removeNode(true);
col_sel.options[0].removeNode(true);
}
}
else
{
_gId("and_or",win).disabled=false;
_gId("and_or",win).style.visibility="visible";
}
}
function show_gaoJi_shai(win)
{
var tdObj=_gId("sou_place_td",win);
var divObj=_gId("div_gaoJi_shai",win); 
_gId("gaoJi_content",win).style.height="100%";
divObj.style.left=get_left(tdObj);
divObj.style.top=get_top(tdObj)+tdObj.offsetHeight;
divObj.style.width=tdObj.offsetWidth-13;
s_h_obj(divObj);
var span=_gId("but_gao",win);
if(divObj.style.display!="none"){span.className="hid_more";}
else{span.className="show_more";}
if(_gId("tb_gaoJi_shai",win).rows.length==1)
{
copy_content_gaoji(win);
}
}
function and_shai(obj,win)
{
gid('shai_tiaojian_td_tb',win).style.display=(obj.checked==true)?(""):("none");
sx_resize_auto(win);
var is=gid('left_div',win).getElementsByTagName('INPUT');
for(var i=0;i<is.length;i++)
{
var div=is[i].parentElement.parentElement;
if(is[i].checked==true)
{
div.style.backgroundColor="#ffffff";
}
else
{
div.style.backgroundColor="";
}
if(obj.checked==true)
{
var s=is[i].outerHTML.replace('radio','checkbox')
is[i].outerHTML=s;
}
else
{
is[i].checked=false;
is[i].parentElement.parentElement.style.backgroundColor="";
is[i].outerHTML=is[i].outerHTML.replace('checkbox','radio');
}
}
}
function set_gaoJi_shai_scroll(win)
{
var shai_div=_gId("gaoJi_content",win);
if(shai_div.style.overflowY!="auto")
{
var shai_top=parseInt(get_top(shai_div));
var shai_height=parseInt(shai_div.offsetHeight);
var total=shai_top+shai_height;
var diff=win.document.body.offsetHeight-total;
if(diff<100)
{
shai_div.style.height=total;
shai_div.style.overflowY="auto";	
}
}
}
function copy_content_gaoji(win)
{
var tbObj=_gId("sou_tb1",win);
var nodes1=tbObj.rows[0].cells[1];
var nodes2=tbObj.rows[0].cells[2];
var trHtm="";
var tbObj=_gId("tb_gaoJi_shai",win);
var rowObj=tbObj.insertRow(tbObj.rows.length);
rowObj.style.height="30px";
var td1=rowObj.insertCell(rowObj.cells.length);
var td2=rowObj.insertCell(rowObj.cells.length);
var td3=rowObj.insertCell(rowObj.cells.length);
var td4=rowObj.insertCell(rowObj.cells.length);
var td5=rowObj.insertCell(rowObj.cells.length);
var s="<select name='gao_and_or[]'>";
s=s+"<option value='and'>"+lang4("_Add")+"</option>";
s=s+"<option value='or'>"+lang4("_Or")+"</option>";
s=s+"</select>";
td1.innerHTML=s;
s=nodes1.innerHTML.replace(/col_name/g,"gao_col_name[]");
s=s.replace(/onChange[^ ]+/gi,"");
td2.innerHTML=s;
var col_sel=td2.getElementsByTagName("SELECT")[0];
if(col_sel.options[0].value=="_notMemo_"&&col_sel.options[1].value=="_all_")
{
col_sel.removeChild(col_sel.options[0]); 
col_sel.removeChild(col_sel.options[0]);
}
s=nodes2.innerHTML.replace(/fuhao/g,"gao_fuhao[]");
s=s.replace(/onChange[^ ]+/gi,"onChange=tf.change_gao_fuhao(this,window)");
td3.innerHTML=s;
var fh=nodes2.childNodes[0];
s="<input name='gao_keyword[]' class=gao_keyword  />";
td4.innerHTML=s;
td4.id="gao_keyword_td";
s="<button  class=but_bg onclick=tf._gPar(\"obj.tagName=='TR'\",this).removeNode(true)><div class='but_del'></div></button>";
td5.innerHTML=s;
set_gaoJi_shai_scroll(win);
}
function get_cur_cols(fn,win)
{
var url="../"+asp_php+"/get_shai_."+asp_php+"?exe=get_cur_cols&fileName="+fn;
var s=ajax(url);
set_cur_cols(s,win)
}
function set_cur_cols(s,win)
{
var arr=s.split('|/tr|'),arr1;
var selObj=gid("col_name",win);
var s="";
s+="<option value='_notMemo_'>"+lang4("_A_memo_field")+"</option>";
s+="<option value='_all_'>"+lang4("_All_fields")+"</option>";
var record9999=false;
for (var i=0;i<arr.length;i++)
{
if(arr[i].indexOf('|/td|')>-1)
{
arr1=arr[i].split('|/td|');
var cnName=arr1[0]; 
var colName=arr1[1];
s+="<option value='"+colName+"'>"+cnName+"</option>";
if (colName=='9999'){record9999=true}
}
}
var s1=selObj.outerHTML;
selObj.outerHTML=s1.replace("<\/SELECT>")+s+"</select>"
var selObj=gid("col_name",win);
if(record9999)
{
selObj.value='9999';
gid('fuhao',win).value='=';
}
}
function back_state(obj,dis)
{
var s="inline";
var d=false;
if(dis==1){s="none",d=true;}
obj.style.display=s;
obj.disabled=d;
}
function c_s(obj)
{	
var o=obj.getElementsByTagName('INPUT')[0];
var div=obj.getElementsByTagName('DIV')[0];
if (o)
{
o.style.display='block';
div.style.display='none';
}
}
function c_h(obj)
{
var o=obj.getElementsByTagName('INPUT')[0];
var div=obj.getElementsByTagName('DIV')[0];
if(o.checked==true)
{
o.style.display='block';
div.style.display='none';
}
else
{
o.style.display='none';
div.style.display='block';
}
}
function show_sou_fanwei(curObj,_submit)
{
var obj=_gId("module_shai_frame");
var o=_gId("top_sou_td");
if(_submit=="yes")
{
obj.style.width=o.offsetWidth+100;
}
else
{
obj.style.width=o.offsetWidth;	
}
var x_y=get_objPosition(window,o,obj,"lb",0,0);
obj.style.top=x_y.split(",")[1];
obj.style.left=x_y.split(",")[0];
if(obj.style.display!="none"&&_submit=="no")
{
obj.style.display="none";
}
else
{
if(obj.src==''){obj.src=obj.src2}
obj.style.display="block";
}
}
function col_name_sel_change(obj,win)
{
if(obj.value=="_all_"||obj.value=="_notMemo_")
{
_gId("and_or",win).style.visibility="visible";
_gId("and_or",win).disabled=false;
}
else
{
_gId("and_or",win).style.visibility="hidden";
_gId("and_or",win).disabled=true;
}
}
function change_fuhao_sel(selValue,win)
{
if(selValue.indexOf("null")>-1)
{
_gId("keyword",win).value="";
}
}
function change_gao_fuhao(selObj,win)
{
if(selObj.value.indexOf("null")>-1)
{
var trObj=_gPar("obj.tagName=='TR'",selObj);
var kwObj=trObj.cells[3].getElementsByTagName("INPUT")[0];
kwObj.value="";
}
}
function column_manage_a(win)
{
var obj=win.tr0_curTd;
var url="column_manage_a.htm?id="+obj.id+"&fileName="+request("fileName",win);
open_dialog(url,800,600,1,win);
}
function open_show_more_col(list_or_win,win)
{
win.showModalDialog("show_more_list_col.htm?list_or_win="+list_or_win+"&fileName="+giv("fileName"),win,"resizable:yes;status:no;help:no;dialogHeight:400px;dialogWidth:500px");	
}
function get_main_tr0_curTd(win)
{
var tdObj=win.tr0_curTd;
if(!tdObj)
{
var main_frame=get_win("main_frame_"+fileName.value);
if(!main_frame)
{
main_frame=gid("frame_subMk");
}
tdObj=main_frame.tr0_curTd;
}
return tdObj;
}
function hidden_column(win)
{
if(user_purview-0!=3)
{
alert(lang4("_administrator"));
return
}
var tr0_curTd=get_main_tr0_curTd(win);
if (!tr0_curTd) return false;
var cur_cellIndex=tr0_curTd.cellIndex
var id=tr0_curTd.id
var oTb=tr0_curTd.parentElement.parentElement.parentElement
oTb.rows[0].deleteCell(cur_cellIndex);
var wf=win.workFrame;
var tb=wf.document.body.getElementsByTagName("TABLE")
for(var i=0;i<tb.length;i++)
{
if(tb[i].id.indexOf("tb")>-1)
{
for(var j=0;j<tb[i].rows.length;j++)
{
tb[i].rows[j].deleteCell(cur_cellIndex);
}
}
}
_gId("frame_blank",win).src='../'+asp_php+'/execute.'+asp_php+'?id='+id+'&exe=hid_col_save&fileName='+fileName.value;
}
function kj_save_get_value(win)
{
var s1="",s2="",s3="";
var sel=gid('but_and_shai',win);
if(sel.checked==true)
{
s1=kj_save_get_value_1(win);
s2=kj_save_get_value_2(win);
s3=kj_save_get_value_3(win);
}else
{
s1=kj_save_get_value_1(win);
s2=kj_save_get_value_2(win);
}
var chk=gid('but_and_shai',win);
var yn=(chk.checked==true)?('true'):('false');
return s1+s2+s3+"<but_and_shai>"+yn+"</but_and_shai>";
}
function kj_save_get_value_1(win)
{
var s="",s1='',s2='',s3='';
var tb=gid('sou_bar',win);
var sels=tb.getElementsByTagName("SELECT");
for(var i=0;i<sels.length;i++)
{
if(sels[i].name)
{
s+=","+sels[i].name+"="+encodeURIComponent(sels[i].value);
}
}
var is=tb.getElementsByTagName("INPUT");
for(var i=0;i<is.length;i++)
{
if(is[i].name)
{
s+=","+is[i].name+"="+encodeURIComponent(is[i].value);
}
}
return "<so>"+s+"</so>";
}
function kj_save_get_value_2(win)
{
var s1="",s2='',s3='',s4='';
var tb=gid('tb_gaoJi_shai',win);
var arr1=gname("gao_and_or[]",win);
var arr2=gname("gao_col_name[]",win);
var arr3=gname("gao_fuhao[]",win);
var arr4=gname("gao_keyword[]",win);
var dh="";
for(var i=0;i<arr1.length;i++)
{
if(s1!=""){dh=","}
s1=s1+dh+encodeURIComponent(arr1[i].value);
s2=s2+dh+encodeURIComponent(arr2[i].value);
s3=s3+dh+encodeURIComponent(arr3[i].value);
s4=s4+dh+encodeURIComponent(arr4[i].value);
}
s1="<gao1>"+s1+"</gao1>";
s2="<gao2>"+s2+"</gao2>";
s3="<gao3>"+s3+"</gao3>";
s4="<gao4>"+s4+"</gao4>";
return "<gao_str>"+s1+s2+s3+s4+"</gao_str>"
}
function kj_save_get_value_3(win)
{
var s="",is;
var div=gid('left_div',win);
var is=div.getElementsByTagName("INPUT");
var dh="";
for(var i=0;i<is.length;i++)
{
if(is[i].name && is[i].checked==true)
{
if(s!=""){dh=","}
s+=","+is[i].name+"="+encodeURIComponent(is[i].value);
}
}
return "<shai>"+s+"</shai>"
}
function ss_save(win)
{
win.showModalDialog('save_sou_kj.htm?fileName='+fileName.value,window,'status:no;help:no;dialogWidth:330px;dialogHeight:220px');
}
function kj_show(obj,win)
{
var e=win.event.srcElement;
if(!e||e.tagName!="A")return;
var id=e.c;
sou_type=e.st;
if(id=='all')
{
main_reSet(win);
main_submit_page_and_shai(win);
return;
}
main_reSet(win);
if(sou_type=="virtual")
{
var o=gid('virtual_bh',win)
if(o)o.value=id;
}
else
{
var url="../"+asp_php+"/main_leftMenu_str_to_js."+asp_php+"?exe=get_main_kj_a&id="+id;
var s=ajax(url);
kj_show_so(s,win)
kj_show_gao(s,win)
kj_show_shai(s,win)
var chk=gid('but_and_shai',win);
var but_and_shai_yn=get_xml(s,"but_and_shai");
chk.checked=(but_and_shai_yn=='true')?true:false;
and_shai(chk,win);
}
gid('sou_sel',win).style.backgroundPosition=(gid('sou_type',win).value.indexOf('gaoJi')>-1)?("0px -150px"):("0px -50px");
main_submit_page_and_shai(win);
}
function kj_show_so(s,win)
{
var str=get_xml(s,"so");
var arr=str.split(",");
for(var i=0;i<arr.length;i++)
{
if(arr[i].length>1)
{
var arr1=arr[i].split('=');
var o=gname(arr1[0],win)[0];
if(o)o.value=decodeURIComponent(arr1[1]);
}
}
}
function kj_show_gao(s,win)
{
del_tbRows(gid('tb_gaoJi_shai',win))
var gao1=get_xml(s,"gao1");
var gao2=get_xml(s,"gao2");
var gao3=get_xml(s,"gao3");
var gao4=get_xml(s,"gao4");
var v1=gao1.split(",");
var v2=gao2.split(",");
var v3=gao3.split(",");
var v4=gao4.split(",");
for(var i=0;i<v1.length;i++)
{
copy_content_gaoji(win);
}
var o1=gname('gao_and_or[]',win);
var o2=gname('gao_col_name[]',win);
var o3=gname('gao_fuhao[]',win);
var o4=gname('gao_keyword[]',win);
for(var i=0;i<v1.length;i++)
{
if(o1[i] && v1[i]){o1[i].value=decodeURIComponent(v1[i]);}
if(o2[i] && v2[i]){o2[i].value=decodeURIComponent(v2[i]);}
if(o3[i] && v3[i]){o3[i].value=decodeURIComponent(v3[i]);}
if(o4[i] && v4[i]){o4[i].value=decodeURIComponent(v4[i]);}
}
}
function kj_show_shai(s,win)
{
var div=gid('left_div',win)
var is=div.getElementsByTagName("INPUT");
var shai=get_xml(s,"shai");
if(shai.length>1)
{
var arr=shai.split(",");
for(var i=0;i<arr.length;i++)
{
if(arr[i].length>1)
{
var arr1=arr[i].split('=');
var is=gname(arr1[0],win);
for(var j=0;j<is.length;j++)
{
if(is[j].value==decodeURIComponent(arr1[1]))
{
is[j].checked=true;
}
}
}
}
}
}
function ks_add_select_win(obj,win)
{
if (obj.value.length==0)return;
if(win.event.keyCode!=13)return;
var url='../'+asp_php+'/execute.'+asp_php+"?exe=ks_add_get_other_tdValue&fileName="+request("fileName",win)+"&tdName="+obj.name+"&tdValue="+obj.value;
gid('frame_blank',win).src=url;
}
function ks_add_select_win_ok(s,win)
{
var arr=s.split(","),arr1,n,v,o;
var listAdd_bar=gid('listAdd_bar',win);
for(var i=0;i<arr.length;i++)
{
if(arr[i].indexOf('=')>-1)
{
arr1=arr[i].split('=');
n="ks_"+arr1[0];
v=arr1[1]?decodeURIComponent(arr1[1]):"";
if(v==undefined || v=='undefined')v='';
var o=tf.gid(n,win);
if(!o)
{
var s="<input type=hidden id='"+n+"' name='"+n+"'>"
listAdd_bar.insertAdjacentHTML('beforeEnd',s);
var o=tf.gid(n,win);
}
o.value=v;
}
}
main_tr_new(win)
}
function ks_add_reSet(win)
{
var div=_gId('listAdd_bar',win);
var is=div.getElementsByTagName('INPUT');
var s1="",s2="";
var main_box=null;
for(var i=0;i<is.length;i++)
{
is[i].value=is[i].value_default;
if(is[i].outerHTML.indexOf('tf.ks_add_select_win')>-1)
{
main_box=is[i];
}
}
if(main_box)
{
main_box.focus();
}
}
function set_shai_form(s,win)
{
var	list=s.split("[&]"),obj_name="",obj_value="";
for(var i=0;i<list.length;i++)
{
obj_name=list[i].split("[:]")[0];
obj_value=list[i].split("[:]")[1];
if(eval("_gId('shai_form',win)."+obj_name))
{
eval("_gId('shai_form',win)."+obj_name+".value='"+obj_value+"'");
}
}	
}
function ss_manage(win)
{
win.showModalDialog('manage_sou_kj.htm?fileName='+fileName.value,window,'status:no;help:no;dialogWidth:400px;dialogHeight:360px');	
}
function main_htm_leftMenu_tuo_mouseDown(win)
{
var divObj=_gId("main_leftMenu_tuo_div",win);
var tdObj=_gId("dhl_tuo",win);
var divFugai=_gId("main_leftMenu_tuo_div_fugai",win);
divFugai.style.width=win.document.body.offsetWidth;
divFugai.style.height=win.document.body.offsetHeight;
divFugai.style.display="block";
divObj.style.width=tdObj.offsetWidth;
divObj.style.height=tdObj.offsetHeight;
divObj.style.top=get_top(tdObj);
divObj.style.left=get_left(tdObj);
divObj.style.display='block';
win.main_htm_leftMenu_divObj=divObj;
win.main_htm_leftMenu_tdObj=tdObj;
win.main_htm_leftMenu_isTuo=true;
}
function main_htm_leftMenu_tuo_mouseMove(win)
{
if(win.main_htm_leftMenu_isTuo&&win.main_htm_leftMenu_divObj)
{
win.main_htm_leftMenu_divObj.style.left=win.event.x;
}
}
function main_htm_leftMenu_tuo_mouseUp(win)
{
if(win.main_htm_leftMenu_tdObj&&win.main_htm_leftMenu_divObj)
{
var divX=get_left(win.main_htm_leftMenu_divObj);
var changeObj1=_gId("main_left",win);
var changeObj2=_gId("left_div",win);
changeObj1.style.width=divX+"px";
changeObj2.style.width=divX+"px";
var margin_x=get_left(win.main_htm_leftMenu_divObj);
if(parseInt(margin_x)<50){_gId("left_td2",win).onclick()}
if(parseInt(margin_x)>100&&_gId("left_td3_td2",win).style.display!="none")
{
var td2=gid("left_td3_td2")
if(td2)td2.click();
}
win.main_htm_leftMenu_divObj.style.display="none";
_gId("main_leftMenu_tuo_div_fugai",win).style.display="none";
win.main_htm_leftMenu_tdObj=null;
win.main_htm_leftMenu_divObj=null;
win.main_htm_leftMenu_isTuo=false;
}
}