function index_onload()
{
change_resize();
index_reSize();
load_df_page();
if(gbl("close_tisu_yn")!="") 
{
if(gbl('tixin_yn')=="yes")
{
setTimeout("_gId('msg_frame').src='msg_top10.htm'",3000)
}else
{
gid('open_jst').style.display='none';
} 
if(gbl('show_daiBan_yn')=="yes")
{
setTimeout("gid('daiBan_frame').src='tixing_daiBan.htm'",4000)
}else
{
gid('daiBan_a').style.display='none';
}         			   
setTimeout("change_resize()",3000)
if(gbl("tel_yn")=="yes") 
{
setTimeout("check_xiaoxi()",2000);
}
}else
{
gid('open_jst').style.display='none';
gid('daiBan_a').style.display='none';
document.onmouseover=function(){try{send_my_online();}catch(e){}};
}
if(get_cook("onloadyemian")!="f5") 
{
show_tx()
}
};
function login_out()
{
document.cookie="onloadyemian=onload"; 
document.location.href='../main/login.htm?exe=out'
}
function show_tx()
{
var login_tx=gbl("tixin_wenzi")
if(login_tx!="")
{
gid('Layer_bg').style.display='block';
gid("login_tixin").innerHTML=login_tx+"<br><br><a style='color:548DED;cursor:pointer;' onclick='hide_tx()'>我知道了!</a>";
gid("login_tixin").style.display=""
}	
document.cookie="onloadyemian=f5"; 
}
function hide_tx()
{
gid('Layer_bg').style.display='none';
gid("login_tixin").style.display="none";
}
function get_cook(title)
{	
var strCookie=document.cookie; 
var arrCookie=strCookie.split("; "); 
var value; 
for(var i=0;i<arrCookie.length;i++)
{ 
var arr=arrCookie[i].split("="); 
if(title==arr[0])
{ 
value=arr[1]; 
break; 
} 
} 
return value; 
}
function tiXin_win(s)
{
if(s=="jst") 
{
show_module("f000000jst","即时通",0,"self[@]ytd_JiShiTong.htm[@]window[@]c","86");
}else if(s=="div_email")
{
show_module("f000000yjgl","邮件管理",0,"self[@]../asp/send_Email_list.asp[@]window[@]c","86");
}else if(s=="div_sms")
{
show_module("f000000dxgl","短信管理",0,"self[@]../asp/send_dx_list.asp[@]window[@]c","86");
}
}
function write_into_input(Ajaxhttp)
{
if (Ajaxhttp.readyState == 4) 
{
if(Ajaxhttp.status == 200) 
{
var response =Ajaxhttp.responseText
if(response!="") 
{
if(response.indexOf("<tel>")!=-1) 
{
gid("check_tel_in").value=response.substring(response.indexOf("<tel>")+5,response.lastIndexOf("<tel>"))
}
if(response.indexOf("<xiaoxi>")!=-1) 
{
gid("check_tixing_xiaoxi").value=response.substring(response.indexOf("<xiaoxi>")+8,response.lastIndexOf("<xiaoxi>")) 
}
}
}
setTimeout("check_xiaoxi()",5000)
}
}
function check_xiaoxi()
{
var Ajaxhttp=new Ajaxrequest();
var url='../'+asp_php+'/public_check.'+asp_php; 
Ajaxhttp.open("post",url,true);
Ajaxhttp.onreadystatechange=function(){write_into_input(Ajaxhttp);};
Ajaxhttp.send(null);
}
function Ajaxrequest()
{
var Ajaxhttp = false; 
try 
{
Ajaxhttp = new XMLHttpRequest();
} catch (trymicrosoft)
{
try
{
Ajaxhttp = new ActiveXObject("Msxml2.XMLHTTP");
}catch (othermicrosoft)
{
try
{
Ajaxhttp = new ActiveXObject("Microsoft.XMLHTTP");
}catch (failed)
{
Ajaxhttp = false;
}
}
}
if (!Ajaxhttp){return false;}
return Ajaxhttp;
}
function send_my_online()
{
var now_dt=new Date();
var o=gid("last_up_date")
if(!o) return;
var last_dt=new Date(o.innerHTML);
if ((now_dt-last_dt)/1000>20)
{
gid("frame_auto_refresh").src="../"+asp_php+"/set_online_state."+asp_php; 
gid("last_up_date").innerHTML=get_str_datetime(new Date());
}
}
function get_str_datetime(dt) 
{
var date=dt;
var year=date.getFullYear();
var month=date.getMonth()+1;
var day=date.getDate();
var hh=date.getHours() 
var mm=date.getMinutes() 
var ss=date.getSeconds() 
var str=year+"/"+month+"/"+day+" "+hh+":"+mm+":"+ss
return str
}
function change_resize()
{
change_resize_but("but_bar_div1","but_bar_td2",'but_bar_td3');
change_resize_but("mk_2_div","mk_2",'mk_3');
change_resize_but("div_top_menu_scroll","index_top_menu_center",'td_menu_0_scroll');
}
function change_resize_but(div_id,td_id,pre_next_parent) 
{
var div=gid(div_id);
if(!div)return;
var td=gid(td_id);
var w=td.offsetWidth;
if(w>0)div.style.width=w;
if(div.scrollWidth>td.offsetWidth)
{
_gId(pre_next_parent).style.display='block';
}
else
{
_gId(pre_next_parent).style.display='none';
}
}
function close_all()
{
var div=_gId('task_bar_center_div');
var arr=div.getElementsByTagName("TABLE");
var i=arr.length-1;
while(i>=0)
{
arr[i].rows[0].cells[2].childNodes[0].onclick();	
i--;
}
}
function close_other()
{
var div=_gId('task_bar_center_div');
var arr=div.getElementsByTagName("TABLE");
var i=arr.length-1;
id="task_a_"+_gId("fileName").value;
while(i>=0)
{
if(arr[i].id!=id)
{
arr[i].rows[0].cells[2].childNodes[0].onclick();	
}
i--;
}	
}
function close_module(filename)
{
var task_a=gid("task_a_"+filename);
if(!task_a)return;
if(task_a.previousSibling)
{
var b=_gId("task_a_"+filename).previousSibling;
b.onclick()
}
else
{
if(_gId("task_a_"+filename).nextSibling)
{
var b=_gId("task_a_"+filename).nextSibling;
b.onclick();
}
else
{
_gId("fileName").value="";
}
}
_gId("task_a_"+filename).removeNode(true);
_gId("tb_"+filename).removeNode(true);
var as=_gId('task_bar_center_div').getElementsByTagName('TABLE');
if(as.length==1)
{
_gId("but_mk_show_type").style.display="none";	
}
if(as.length==0)
{
_gId("td_deskTop").style.display="block";
gid("td_main").style.display="none";
_gId("fileName").value="";
_gId("but_bar").style.display="none";
}
task_a_reSize();
index_reSize();
}
function close_module_min(obj) 
{
var mk=_gPar("obj.tagName=='TABLE'&&obj.id.indexOf('tb_')>-1");
var fileName=mk.id.replace("tb_","");
mk.removeNode(true);
_gId("task_a_"+fileName).removeNode(true);
var as=_gId('task_bar_center_div').getElementsByTagName('TABLE');
if(as.length==1)
{
_gId("but_mk_show_type").style.display="none";	
}
if(as.length==0)
{
_gId("td_deskTop").style.display="block";
gid("td_main").style.display="none";
_gId("fileName").value="";
}
}
function class_over(obj)
{
obj.cells[0].style.backgroundPosition='left bottom';
obj.cells[1].style.backgroundPosition='0px bottom';
obj.cells[2].style.backgroundPosition='right bottom';
}
function class_out(obj)
{
obj.cells[0].style.backgroundPosition='left top';
obj.cells[1].style.backgroundPosition='0px top';
obj.cells[2].style.backgroundPosition='right top';
}
function desktop_set_content(s)
{
s=ytd_htmlDeCode(s);
var htm="",tr="",arr=s.split("|/tr|"),arr1,className;
for(var i=0;i<arr.length-1;i++)
{
arr1=arr[i].split("|/td|");
if(arr1[3].length<4)
{
var img="<img src='../img/logo.gif' width=48 style='margin-bottom:10px;'>"
}else
{
var url=arr1[3];
if (get_ie()=='ie6')
{
var img="<SPAN style=\"HEIGHT:48px;WIDTH:48px;FILTER:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"'); DISPLAY: inline-block\"></SPAN>"
}else
{
var img="<img src='"+url+"' width=48 style='margin-bottom:10px;'>";
}
}
tr="<tr><td>"+img;
tr+="<table border=0 cellspacing=0><tr><td id=desktop_ico_t1></td><td  id=desktop_ico_t2><div>"+arr1[1]+"</div></td><td id=desktop_ico_t3></td></tr></table>";
tr+="</td></tr>";
var className=(get_ie()=='ie6')?("desktop_but_bg_gif"):("desktop_but_bg_png");
var fileName=arr1[4].replace(/"/g,'\\"')
var win_type=arr1[5];
var m_classID=arr1[6];
var exe="show_module('"+fileName+"','"+arr1[1]+"',1,'"+win_type+"','"+m_classID+"');\"";
htm+="<table border=0 box_id='"+arr1[0]+"' onmouseover=\"this.style.backgroundPosition='center center'\" onMouseOut=\"this.style.backgroundPosition='500px 500px'\" class='"+className+"' cellpadding=0 cellspacing=0  onclick=\""+exe+"\">";
htm+=tr;
htm+="</table>";
}
var o=_gId("desktop_content_div");
if(o)o.innerHTML=htm;
}
function f5_main_work()
{
var f=gid('fileName');
var mf;
if(f && f.value.length>0)
{
eval("mf=main_frame_"+f.value);
gid('workFrame',mf).src+='';
}
else
{
alert('刷新失败，请手动刷新')
}
}
function index_menuTop_scroll(div_id,w)
{
var divObj=_gId(div_id);
if(w>0)
{
divObj.scrollLeft+=40;
}
else
{
divObj.scrollLeft-=40;	
}
}
function load_df_page()
{
if(!gid("td_main"))return;
if(gbl('df_info')==''){return};
var arr=df_info.split("[&]")
var title=arr[0];
var fileName=arr[1];
var typ=arr[2];
var classID_str=arr[3];
if(fileName!="")
{
show_module(fileName,title,0,typ,classID_str);
}
}
var mk_show_type_num=0; 
function mk_show_type()
{
_gId("mk_show_type_img2").style.display="";
_gId("mk_show_type_img1").style.display="none";
setTimeout("mk_show_type_sub()",1)
}
var first_h=0; 
var first_w=0;
function mk_show_type_sub()
{
var tb=td_main.getElementsByTagName('TABLE');
var c=_gId("td_main");
if(first_h==0||first_w==0)
{
first_h=c.offsetHeight/5+4; 
first_w=c.offsetWidth/4.8+4;
}
var tb_w=0,tb_h=0,z=0,m=0,b=0;
if(mk_show_type_num==0)
{
tb_w=first_w;
tb_h=first_h;
mk_show_type_num=1;
z=0.2;
m=15;
b=2;
}
else
{
var cur=_gId("tb_"+_gId("fileName").value)
show_module_max(cur);
_gId("mk_show_type_img1").style.display="";
_gId("mk_show_type_img2").style.display="none";
return;
}
for(var i=0;i<tb.length;i++)
{
if(tb[i].id.indexOf('tb_f')>-1)
{
if(tb[i].style.display=="none")
{
tb[i].style.display="block";	
}
if(tb[i].width=="100%")
{
tb[i].rows[0].style.display="";
tb[i].style.margin=m;
tb[i].style.borderWidth=b;
tb[i].width=tb_w;
tb[i].height=tb_h+tb[i].rows[0].offsetHeight;
var fileName=tb[i].id.split("_")[1];
var ifr=get_win("main_frame_"+fileName);
ifr.document.body.style.zoom=z;
}
var d=tb[i].rows[1].cells[0].getElementsByTagName("A")[0];
d.style.display="inline";
d.style.marginTop=-d.parentNode.offsetHeight;
}
}
_gId("mk_show_type_img1").style.display="";
_gId("mk_show_type_img2").style.display="none";
}
var xxxxxxxxxxxxx_win=window;
var xxxxxxxxxxxxx="";
function menu_scroll(menu_id,h,win)
{
if(!win)win=xxxxxxxxxxxxx_win;
var menu_obj=_gId(menu_id,win);
var sc_obj=menu_obj.rows[1].cells[0].getElementsByTagName("DIV")[0];
if(h>0)
{
sc_obj.scrollTop+=5;
}
else
{
sc_obj.scrollTop-=5;	
}
if(win.event&&win.event.button==1)
{
xxxxxxxxxxxxx_win=win;
xxxxxxxxxxxxx=setInterval("menu_scroll('"+menu_id+"',"+h+")",40);	
}
}
function menu_scroll_up()
{
clearInterval(xxxxxxxxxxxxx);
}
function index_body_click_closeChildMenu()
{
var f=_gId("fileName").value
if (f!='')
{
var frameObj=document.frames("main_frame_"+f);
ytd_menu_hiddenAll(frameObj);
}
}
function create_task_bar(fileName,t,f5,win_type,m_classID,isDesktop)
{
f5=-1;
var s="<table class=task_but cellspacing=0 cellpadding=0 style='float:left;table-layout:fixed' title='"+t+"' id='task_a_"+fileName+"' href='#ytd;' onclick=\"show_module('"+fileName+"','"+t+"',"+f5+",'"+win_type+"','"+m_classID+"');\"";
if(isDesktop!=1)
{
s+=" oncontextMenu=\"show_closeMenu(this,window)\" ";
}
else
{
s+=" oncontextMenu='this.click()'"
}
s+="onMouseOver='class_over(this)' onMouseOut='class_out(this)'><tr><td id=l><td id=c nowrap><span id=ico>"+t+"</span><td id=r>"
s+="<a id='close_mk' name='close_mk' onclick=\"close_module('"+fileName+"')\" title="+lang4("_Close")+" href='#ytd;'></a>";
s+="</td></tr></table>"
_gId('task_bar_center_div').insertAdjacentHTML('beforeEnd',s)
var as=_gId('task_bar_center_div').getElementsByTagName('TABLE');
task_a_select(as[as.length-1]);
task_a_reSize()
if(as.length==2)
{
_gId("but_mk_show_type").style.display="";	
}
}
function show_daiBan(curObj,objid)
{
var obj=gid(objid);
var o=curObj;
var ifr=obj.getElementsByTagName("IFRAME")[0];
if(ifr && ifr.src==''){ifr.src=ifr.src2}
var x_y=get_objPosition(window,o,obj,"lb",0,0);
obj.style.top=x_y.split(",")[1]-0+3;
obj.style.left=x_y.split(",")[0]-22;
if(obj.style.display!="none")
{
obj.style.display="none";
}
else
{
obj.style.display="block";
var w=obj.offsetWidth;
var l=obj.style.left.replace('px','')-0;
var body_w=window.document.body.offsetWidth;
if(w+l>body_w)
{
obj.style.left=body_w-w-22;
}
}
}
function show_daiBan_other(curObj,obj)
{
var o=curObj;
var ifr=obj.getElementsByTagName("IFRAME")[0];
if(ifr && ifr.src==''){ifr.src=ifr.src2}
var x_y=get_objPosition(window,o,obj,"lb",0,0);
obj.style.top=x_y.split(",")[1]-0+3;
obj.style.left=x_y.split(",")[0]-22;
obj.style.display="block";
var w=obj.offsetWidth;
var l=obj.style.left.replace('px','')-0;
var body_w=window.document.body.offsetWidth;
if(w+l>body_w)
{
obj.style.left=body_w-w-22;
}
}
function show_module_max(div)
{
var ds=gid('td_main').getElementsByTagName('DIV');
for(var i=0;i<ds.length;i++)
{
if(ds!=div && ds[i].style.display!='none')ds[i].style.display='none';
}
if(div)
{
div.style.display='';
}
show_type_num=0;
}
function show_module_checkCount(fileName)
{
try{
if(taskbar_count!='' && taskbar_count<1)taskbar_count=1;
}catch(e)
{
taskbar_count=64;
}
if(taskbar_count>1)
{
var div=gid('task_bar_center_div');
if(!div)return;
var tbs=div.getElementsByTagName("TABLE");
if (tbs.length>=taskbar_count)
{
var yn=0;
for(var i=0;i<tbs.length;i++)
{
var f=tbs[0].id.replace('task_a_','');
if(f=fileName)
{
yn=1;
break;	
}
}
if(yn==0)
{
var f=tbs[0].id.replace('task_a_','');
tbs[0].removeNode(true);
var tb=gid('tb_'+f);
if(tb){tb.removNode(true)}
}
}
}
else
{
gid('tr_task').style.display='none';
gid('task_bar_center_div').innerHTML='';
gid('td_main').innerHTML='';
}
}
function virtual_to_ok_mk(fileName)
{
fileName=(fileName+"_").split('_')[0];
var url="../"+asp_php+"/execute."+asp_php+"?exe=get_module_info&fileName="+fileName;
var s=ajax(url);
var arr=s.split("|");
if(arr.length>2)
{
gid('but_bar').style.display='';
gid('but_bar2').style.display='none';
show_module(fileName,arr[0],0,0,arr[2])
}
else
{
alert("取模块信息失败");
}
}
function show_module(fileName,t,f5,win_type,m_classID)
{
if(win_type)win_type=win_type.replace(/\{bm\}/gi,bm);
show_module_checkCount(fileName);
var tixin=(fileName.indexOf('_')>-1)?(fileName.split('_')[1]):('');
var link_type="",link_url,winName="";link_prop="";
if(win_type&&win_type.indexOf("[@]")>-1)
{
var arr=win_type.split("[@]");
link_type=arr[0]; 
link_url=arr[1]; 
winName=arr[2]; 
link_prop=arr[3]; 
}
var o2=_gId("top_mk_show_td2");
if(o2)
{
if(o2.style.display=="none"){o2.style.display=""}
}
if(_gId("td_deskTop").style.display!="none")
{
gid("td_deskTop").style.display="none";
gid("td_main").style.display="";
}
if(link_type=="open") 
{
window.open(link_url,winName,link_prop);
return;	
}
else if(link_type=="dialog") 
{
window.showModalDialog(link_url,window,link_prop);
return;
}
else if(link_type=="do")
{
eval(link_url);
return;
}
else
{
var sou_div=_gId("module_shai_frame"); 
if(sou_div)sou_div.style.display="none";
show_menu_yn_for_over.value='n';
var oTb=_gId('tb_'+fileName);
var but=_gId('task_a_'+fileName);
if (f5==1 || (f5!=-1 &&　giv('fileName')==fileName))
{
if(oTb)
{
oTb.removeNode(true);oTb=null;
but.removeNode(true);
}
}
var bar=gid('but_bar');
if(oTb)
{
show_module_max(oTb);
if(fileName.indexOf('_')>-1)
{
_gId('but_bar').style.display='none';
}
else
{
if(link_type=="self")
{
if(bar)bar.style.display='none';
}
else
{
if(bar)bar.style.display='';
show_but_bar(fileName,tixin);
}
}
}
else
{
var but_yn=(tixin.length>0)?('no'):(request('but'));
var main_left_yn=(tixin.length>0)?('no'):('yes');
var re=request_all('but,main_left_yn,fileName,tixin',window)
if(re.length<1)re="?0"
if(link_url)link_url+=(link_url.indexOf('?')>-1)?('&cur_fileName='+fileName):('?cur_fileName='+fileName)
if(link_type=="self")
{
var url=link_url;
if(bar)bar.style.display='none';
}
else
{
if(bar)bar.style.display=''; 
var url="main.htm"
try
{
if(window.event.ctrlKey==true|| charset=='gb2312'){url="main.htm.htm"}
}catch(e){}
url+=re+"&fileName="+fileName.split('_')[0]+"&tixin="+tixin+"&but="+but_yn+"&main_left="+main_left_yn;
}
if(win_type){url+="&"+win_type}
var mff="main_frame_"+fileName;
var str="<div style='width:100%;height:100%' id=tb_"+fileName+" >";
url=url.replace(/'/g,"%27")
url=url.replace(/"/g,"%22")
str+="<iframe  width='100%' height='100%'  scrolling=no frameborder=0 name="+mff+" id="+mff+" class=main_frame src='"+url+"'></iframe>";
str+="</div>";
var tbs=gid('td_main').getElementsByTagName("DIV");
for(var i=0;i<tbs.length;i++){tbs[i].style.display='none';}
gid('td_main').insertAdjacentHTML('beforeEnd',str);
if(request("task")!='no')
{create_task_bar(fileName,t,f5,win_type,m_classID);}
}
change_resize();
}
gid('fileName').value=fileName;
gid('par_fileName').value='';
if(request("task")!='no')task_a_select(_gId("task_a_"+fileName))
if(bj=='top' || bj=='top_top'){set_mk_2_but_selected(fileName,m_classID)};
if(bj.indexOf('left')>-1){index_menuLeft_selected_cur_but(fileName)};
index_reSize();
}
function show_but_bar(fileName,tixin,win)
{
var toolbutStr="";
if(!win||win.location.href.indexOf('main.htm')==-1)
{
win=gf(fileName);
}
try
{
toolbutStr=win.cur_mk_button_str;
}
catch(e)
{
toolbutStr="";
}
show_cur_mk_button(toolbutStr,fileName,tixin,win);
}
function set_mk_2_but_selected(fileName,m_classID)
{
var div_menu_top=_gId('div_menu_top')
if (div_menu_top)
{
if(!m_classID)
{
var as=div_menu_top.getElementsByTagName('A')
for(var i=0;i<as.length;i++)
{
if(as[i].outerHTML.indexOf("'"+fileName+"'")>-1)
{
var obj=as[i];
break;
}
}
if(obj)
{
var cur_menu_div=_gPar("obj.name=='div_menu_sub'",obj);
var m_classID=cur_menu_div.id.replace('menu_top_','');
}
}
index_menuTop_select_cur(m_classID);
index_menuTop_select_cur_but(fileName)
}
}
function show_bj_box(obj)
{
var bj=get_obj('bj');
var pic_1="",pic_2="",pic_3="",pic_4="",pic_5="";
if(bj=="top"){pic_1="../img/16x16_y.gif?0,-640";}
if(bj=="top_top"){pic_2="../img/16x16_y.gif?0,-640";}
if(bj=="left"){pic_3="../img/16x16_y.gif?0,-640";}
if(bj=="left2"){pic_4="../img/16x16_y.gif?0,-640";}
if(bj=="top_1"){pic_5="../img/16x16_y.gif?0,-640";}
var s="1|显示顶部菜单_宽|change_bj('top')|"+pic_1+"|0<&>";
s=s+"2|显示顶部菜单_窄|change_bj('top_top')|"+pic_2+"|0<&>";
s=s+"3|显示左边菜单_树形目录|change_bj('left')|"+pic_3+"|0<&>";
s=s+"4|显示左边菜单_抽屉式|change_bj('left2')|"+pic_4+"|0<&>";
s=s+"5|默认|change_bj('top_1')|"+pic_5+"|0<&>";
menu(obj,window,set_menu_content('top_bj_menu',s,window,0,'','menu',-3,3,'rt-lt'),0,0,'lt-lb')	
}
function show_task_box(obj)
{
var task_bar_location=get_obj('task_bar_location');
var pic_1="",pic_2="";
if(task_bar_location=="top"){pic_1="../img/16x16_y.gif?0,-640";}
if(task_bar_location=="bottom"){pic_2="../img/16x16_y.gif?0,-640";}
var s="1|顶部|change_task('top')|"+pic_1+"|0<&>";
s=s+"2|底部|change_task('bottom')|"+pic_2+"|0<&>";
menu(obj,window,set_menu_content('top_bj_menu',s,window,0,'','menu',-3,3,'rt-lt'),0,0,'lt-lb')	
}
function show_style_box(obj)
{
var css=get_obj('css');
var pic_1="",pic_2="",pic_3="",pic_4="",pic_5="",pic_6="",pic_7="";
if(css=="000"){pic_1="../img/16x16_y.gif?0,-640";}
if(css=="001"){pic_2="../img/16x16_y.gif?0,-640";}
if(css=="002"){pic_3="../img/16x16_y.gif?0,-640";}
if(css=="003"){pic_4="../img/16x16_y.gif?0,-640";}
if(css=="004"){pic_5="../img/16x16_y.gif?0,-640";}
if(css=="005"){pic_6="../img/16x16_y.gif?0,-640";}
if(css=="006"){pic_7="../img/16x16_y.gif?0,-640";}
var s="1|灰色调|change_css('000')|"+pic_1+"|0<&>";
s=s+"2|中性色调|change_css('001')|"+pic_2+"|0<&>";
s=s+"3|蓝色性|change_css('002')|"+pic_3+"|0<&>";
s=s+"4|黑色调|change_css('003')|"+pic_4+"|0<&>";
s=s+"4|绿色调|change_css('004')|"+pic_5+"|0<&>";
s=s+"5|红色调|change_css('005')|"+pic_6+"|0<&>";
s=s+"5|紫色调|change_css('006')|"+pic_7+"|0<&>";
menu(obj,window,set_menu_content('top_style_menu',s,window,0,'','menu',-3,3,'rt-lt'),0,0,'lt-lb')	
}
function show_closeMenu(obj,win)
{	
obj.onclick();
ytd_menu_hiddenAll(win);
var fileName=_gId("fileName").value;
var s="1|"+lang4("_Close")+"|close_module('"+fileName+"')|img|0<&>";
s=s+"2|"+lang4("_Close_all")+"|close_all()|img|0<&>";
s=s+"3|"+lang4("_Close_other_module")+"|close_other()|img|0<&>";
s=s+"4|"+lang4("_Refresh_structure")+"|main_frame_"+fileName+".document.location.href+=''||<&>"
s=s+"5|"+lang4("_Refresh_data")+"|main_submit_page_and_shai(main_frame_"+fileName+");||<&>";
menu(obj,window,set_menu_content('foot_menu_mk',s,window,0,'','menu',-3,3,'rt-lt','','',1),0,0,'lt-lb');
}
function s_h_tool_bar(jt,win)
{
if(!win)
{
var win=gf();
if(!win)alert('没有工具栏。err:140120');
}
var pf=win.parent;
if(!gid("but_bar",win.parent))
{
var but=gid('tool_bar_jt_span',win);
if(but){but.style.filter='Gray';}
return;
}
if(!jt)var jt=_gId('tool_bar_jt_span',win)
var tool_bar=_gId('but_bar_td');
if(!tool_bar)return;
if(tool_bar.style.display=="none")
{
jt.style.backgroundPosition="0px -20px";
jt.title="隐藏工具栏";
tool_bar.style.display='';
var v="show";
}
else
{
jt.style.backgroundPosition="0px -40px";
jt.title="显工具索栏";
tool_bar.style.display='none';
var v="hidden";
}
index_reSize();
_gId('frame_blank').src='../'+asp_php+'/execute.'+asp_php+'?exe=save_my_config&tag=toolBar_show&value='+v;
}
function s_h_deskTop()
{
var d=_gId("td_deskTop");
var m=_gId("td_main");
if(d.style.display=="none")
{
d.style.display="";
_gId("but_mk_show_type").style.display="none";
if(_gId("but_bar"))_gId("but_bar").style.display='none';
m.style.display="none";
var o2=_gId("top_mk_show_td2");
if(o2)o2.style.display="none";
index_reSize();
}
else
{
d.style.display="none";
var f="main_frame_"+gid("fileName").value;
var mf=gid(f);
if(mk_show_type_num!=1 && left(mf.src,8)=='main.htm')
{
if(gid("but_bar")){gid("but_bar").style.display='inline'};
}
m.style.display=""
var o1=_gId("but_mk_show_type");
var o2=_gId("top_mk_show_td2");
if(o1)o1.style.display="";
if(o2)o2.style.display="";
}
}
function sh_logo(obj)
{
if(td_logo.style.display=='none')
{
td_logo.style.display='';
obj.src='../img/right_to_left.gif';
obj.title='隐藏Logo';
}
else
{
td_logo.style.display='none';
obj.src='../img/left_to_right.gif';
obj.title='显示Logo';
}
}
function sh_tel(obj)
{
var hid=gid('frame_tel');
if(!hid){alert('你还没有启用呼叫中心');return;}
if(hid.style.display=='none')
{
hid.style.display='';
obj.src='../img/right_to_left.gif';
obj.title='显示呼叫中心';
}
else
{
hid.style.display='none';
obj.src='../img/left_to_right.gif';
obj.title='显示呼叫中心';
}
}
function change_bj(bj)
{
if(confirm(lang4("_Switch_to_page_layout")))
{		
var url="../"+asp_php+"/execute."+asp_php+"?exe=index_sel_bj&tag=bj&value="+bj;
gid('frame_blank').src=url;
}
}
function change_css(css)
{
_gId('frame_blank').src="../"+asp_php+"/execute."+asp_php+"?exe=index_sel_css&tag=css&value="+css;
}
function change_task(task_bar_location)
{
_gId('frame_blank').src="../"+asp_php+"/execute."+asp_php+"?exe=index_sel_css&tag=task_bar_location&value="+task_bar_location;
}
function task_a_select(obj)
{
if(!obj)return;
if(obj.className=="task_but_select")return;
var tbs=document.getElementById('task_bar_center_div').getElementsByTagName('TABLE')
for(var i=0;i<tbs.length;i++){tbs[i].className='task_but'}
if(obj){obj.className='task_but_select';}
}
function task_a_reSize()
{
var td=_gId('task_bar_center');
if(!td)return;
var div=_gId('task_bar_center_div');
if(parseInt(div.style.height.replace('px',''))!=td.offsetHeight)
{div.style.height=td.offsetHeight}
if(parseInt(div.style.width.replace('px',''))!=td.offsetWidth)
{div.style.width=td.offsetWidth}
var max_a_width=181;
var min_a_width=80;
var arr=div.getElementsByTagName("TABLE");
if(arr.length*max_a_width>=div.offsetWidth) 
{
var best_width=(div.offsetWidth-22)/arr.length-5;
if(best_width>=min_a_width)
{
for(var i=0;i<arr.length;i++)
{
arr[i].style.width=best_width;
}
}
else
{
div.style.overflowY="auto";
}
}
}
var task_div_curScrollTop=0;
function task_move_page(obj)
{
var move_max_height=_gId("task_bar_center").getElementsByTagName("TABLE")[0].offsetHeight; 
var move_height=obj.scrollTop;
var moved_y=move_height-task_div_curScrollTop;
if(move_height>task_div_curScrollTop)
{
obj.scrollTop+=move_max_height;	   
}
else if(move_height<task_div_curScrollTop)
{
obj.scrollTop-=move_max_height;
}
task_div_curScrollTop=obj.scrollTop;
}
var task_parent_tuo_isDown=false;
function task_parent_tuo_down()
{
var bar_width=_gId("task_bar").offsetWidth;
var tuo_div=_gId("task_bar_tuo_div");
tuo_div.setCapture();
tuo_div.style.width=bar_width;
tuo_div.style.top=get_top(_gId("task_bar"));
tuo_div.style.left=get_left(_gId("task_bar"));
tuo_div.style.display="block";
task_parent_tuo_isDown=true;
}
function task_parent_tuo_up()
{
if(task_parent_tuo_isDown)
{
_gId("task_bar_tuo_div").style.display="none";
_gId("task_bar").style.height=parseInt(document.body.offsetHeight-event.y);
task_parent_tuo_isDown=false;
_gId("task_bar_tuo_div").releaseCapture();
}
}
var task_bar_bts_isMoved=false;
var task_bar_bts_x=0;
var task_bar_scroll_x=0;
function task_bar_bts_down(obj)
{
task_bar_bts_isMoved=true;	
task_bar_bts_captureObj=obj;
task_bar_bts_x=event.x;
task_bar_scroll_x=obj.scrollLeft;
}
function task_bar_bts_move()
{
if(task_bar_bts_isMoved&&(event.button==1||event.button==2))
{
task_bar_bts_captureObj.scrollLeft=task_bar_scroll_x+(task_bar_bts_x-event.x);
}
}
function task_bar_bts_up()
{
task_bar_bts_isMoved=false;
task_bar_scroll_x=0;
task_bar_bts_x=0;
}
function task_parent_tuo_move()
{
if(task_parent_tuo_isDown)
{
var o=_gId("task_bar_tuo_div");
if(o)o.style.top=event.y;	
}
}
var index_leftMenu_tuoDiv=null;
var index_leftMenu_isTuo=false;
var index_leftMenu_fugaiDiv=null;
function index_leftMenu_startDrag()
{
if(event.srcElement.tagName=="A")return;
index_leftMenu_tuoDiv=_gId("index_leftMenu_tuoDiv");
var td=_gId("index_right_border");
index_leftMenu_tuoDiv.style.top=get_top(td);
index_leftMenu_tuoDiv.style.left=get_left(td);
index_leftMenu_tuoDiv.style.width=td.offsetWidth;
index_leftMenu_tuoDiv.style.height=td.offsetHeight;
index_leftMenu_tuoDiv.style.display="block";
index_leftMenu_fugaiDiv=_gId("index_leftMenu_fugaiDiv");
index_leftMenu_fugaiDiv.style.width=document.body.offsetWidth;
index_leftMenu_fugaiDiv.style.height=document.body.offsetHeight;
index_leftMenu_fugaiDiv.style.top=0;
index_leftMenu_fugaiDiv.style.left=0;
index_leftMenu_fugaiDiv.style.display="block";
index_leftMenu_isTuo=true;
}
function index_leftMenu_Drag()
{
if(index_leftMenu_isTuo)
{
index_leftMenu_tuoDiv.style.left=event.x;	
}
}
function index_leftMenu_stopDrag()
{
if(index_leftMenu_tuoDiv)
{
var obj=_gId("left_menu_td_td");
var a=_gId("sh_leftMenu_a");
if(obj.style.display!="none"&&get_left(index_leftMenu_tuoDiv)<=130)
{
if(obj.style.display!="none")
{
obj.style.display="none";
_gId("left_menu_td").style.width=6;
a.className="left_jt_close";
}
}
else if(obj.style.display=="none"&&get_left(index_leftMenu_tuoDiv)>=30)
{
obj.style.display="";
obj.style.width=172;
_gId("left_menu_td").style.width=181;
a.className="left_jt_open";
}
else
{
_gId("left_menu_td").style.width=get_left(index_leftMenu_tuoDiv)+"px";
obj.style.width=get_left(index_leftMenu_tuoDiv)+"px";
}
index_leftMenu_tuoDiv.style.display="none";	
index_leftMenu_tuoDiv=null;
index_leftMenu_fugaiDiv.style.display="none";
index_leftMenu_fugaiDiv=null
index_leftMenu_isTuo=false;
}
}
function index_reSize()
{
var h0=gih('index_div_main');
var h1=gih('index_top_tr0');
var h2=gih('logo_tr');
var h3=gih('tr_topMenu');
var h4=gih('tr_task');
var h5=gih('tr_but');
if(h5>65){h5=65}
var h=h0-h1-h2-h3-h4-h5;
if(h>0)
{
if(gid("td_deskTop"))gid("td_deskTop").style.height=h+'px';
if(gid("td_main"))gid("td_main").style.height=h+'px';
if(gid("index_center_tr"))gid("index_center_tr").style.height=h+'px';
}
}
function index_add_sub_content(url,win)
{
var ran=get_ran(20);
var w=900;
var h=600;
var h2=h-25;
var w2=w-10;
var t=(win.tf.document.body.offsetHeight-h)/2;
var l=(win.tf.document.body.offsetWidth-w)/2;
url+="&ran_div=div_"+ran;
var s="<div id='div_"+ran+"'>";
s+="<iframe id='blank_"+ran+"' class='bg_alpha_50' src='blank2.htm'  width='100%' height='100%' onload='this.height=0;this.width=0;var fdh=(this.Document?this.document.body.scrollHeight:this.contentDocument.body.offsetHeight);fdw=(this.Document?this.document.body.scrollWidth:this.contentDocument.body.offsetWidth);this.height=(fdh>700?fdh:700);this.width=(fdw>700?fdw:700)' ></iframe>";
s+="<div class='sub_window' style='z-index:11;width:"+w+"px;height:"+h+"px;left:"+l+"px;top:"+t+"px;background:url(../img/alpha_50.png);padding:5px;'position:absolute;overflow:hidden;>";
s+="<table width='100%' height=25 class='tb_subMk' style='background-repeat: repeat-x;'><tr><td></td><td align='right'><a href='#ytd'  onclick=index_del_sub_content('div_"+ran+"') title='关闭'/><div class='dx'>&nbsp;</div></a></td></tr></table>"
s+="<iframe id='frame_"+ran+"' name=frame_"+ran+" width='"+w2+"' height='"+h2+"' frameborder=0 src='"+url+"'></iframe>";
s+="</div></div>";
win.tf.document.body.insertAdjacentHTML("afterBegin",s);
}
function index_del_sub_content(ran)
{
var div=gid(ran);
if(div)div.removeNode(true);
}