function index_menuTop_class_0__click(obj)
{
var o=show_menu_yn_for_over;
o.value=(o.value=='n')?'y':'n';
if(o.value=='y')
{
var id=obj.id.replace('mm_','')
index_menuTop_show_sub(id,obj)
index_menuTop_over_cur(obj);
}
else
{
index_menuTop_hid_all()
}
}
function index_menuTop_get_spans_width()
{
var ss=div_top_menu_scroll.getElementsByTagName('SPAN');
var spans_w=0;
for(var i=0;i<ss.length;i++)
{
if(ss[i].id=='line' || ss[i].id=='m_bg')spans_w+=ss[i].offsetWidth;
}
return spans_w;
}
function index_menuTop_hid_sub(obj)
{
var par_menu_id=',';
var cur_menu_div=obj.parentElement;
while(cur_menu_div.name!='div_menu_sub')
{
cur_menu_div=cur_menu_div.parentElement;
if(cur_menu_div.tagName=='BODY')break;
}
if (cur_menu_div.name=='div_menu_sub')
{
var s=cur_menu_div.id.replace('menu_top_','');
var arr=s.split('_');
var par_menu_id_str=","
var lev_id='';
for (var i=0;i<arr.length;i++)
{
lev_id+="_"+arr[i]
par_menu_id_str+='menu_top'+lev_id+','
}
var arr=index_menu_old.value.split(',');
for(var i=1;i<arr.length;i++)
{
var id2=','+arr[i]+','
if(!(par_menu_id_str.indexOf(id2)>-1))
{
var o=document.getElementById(arr[i]);
var o2=document.getElementById(arr[i]+'_shadow')
if(o){o.style.display='none';}
if(o2){o2.style.display='none';}
index_menu_old.value=index_menu_old.value.replace(id2,',');
}
}
index_menu_old.value=index_menu_old.value.replace(/,,/g,',')
}
else
{
index_menuTop_hid_all()
}
}
function index_menuTop_hid_all()
{
var arr=_gId('index_menu_old').value.split(',');
for(var i=1;i<arr.length;i++)
{
var id2=','+arr[i]+','
var o=document.getElementById(arr[i]);
var o2=document.getElementById(arr[i]+'_shadow')
if(o){o.style.display='none';}
if(o2){o2.style.display='none';}
index_menu_old.value=index_menu_old.value.replace(id2,',');
}
index_menuTop_over_cur();
index_menu_old.value=index_menu_old.value.replace(/,,/g,',')
}
function index_menuTop_over_cur(obj)
{
var as=document.getElementsByName('m_class_0');
for(var i=0;i<as.length;i++)
{
if(as[i].lock!='y'){as[i].className='index_menuTop_out';}
}
if(obj && obj.lock!='y'){obj.className='index_menuTop_over';}
}
function index_menuTop_select_cur(id)
{
var as=document.getElementsByName('m_class_0');
for(var i=0;i<as.length;i++)
{
as[i].className='index_menuTop_out';
as[i].lock='';
as[i].innerText=as[i].innerText;
}
var arr=id.split('_');
var cur_mk_2_id="mk_2_"+arr[arr.length-1]
var m_1_id="mm_"+arr[0];
var o=document.getElementById(m_1_id);
if(o){
o.className="index_menuTop_ed_out"
o.innerHTML="<b>"+o.innerHTML+"</b>";
o.lock='y';
}
var par_i=arr.length-1;
var pid=arr[par_i];
var cur_mk_2=_gId(cur_mk_2_id);
var i,arr_m_str,ico_style,str='';
if(!cur_mk_2)
{
var a_over=" onMouseOver=menu_over(this)"
var a_out="  onMouseOut= menu_out(this) "
for (i=0;i<m_id.length;i++)
{
if(m_pid[i]==pid)
{
arr_m_str=m_str[i].split('|')
ico_style=(arr_m_str[3]!='')?(" style='"+get_ico(arr_m_str[3])+"'"):("class=menu_a");
str+="<td class=but_paq><p><q><a id='menu_x_a_"+arr_m_str[2]+"' "+a_over+" "+a_out+" onclick=\"show_module('"+arr_m_str[2]+"',this.innerText,0,'"+arr_m_str[1]+"','"+arr_m_str[4]+"');\" ><b "+ico_style+">"+arr_m_str[0]+"</b></a> </q></p></td>";
}
}
if (str!='')
{
var str="<div class=menu_x id='"+cur_mk_2_id+"'><table class=but_paq><tr>"+str+"</tr></table></div>";
mk_2_div.innerHTML=str;
}
cur_mk_2=_gId(cur_mk_2_id);
}
var divs=mk_2_div.getElementsByTagName('DIV')
for(var i=0;i<divs.length;i++)
{
if(divs[i].id.indexOf('mk_2_')>-1)
{divs[i].style.display='none'}
}
if(cur_mk_2)cur_mk_2.style.display='block';
}
function index_menuTop_select_cur_but(fileName)
{
var obj=document.getElementById('menu_x_a_'+fileName);
if(!obj)return;
var tb=_gPar("obj.tagName=='TABLE'",obj)
if(tb.tagName!='TABLE')return;
var tds=tb.getElementsByTagName('TD');
for(var i=0;i<tds.length;i++)
{
var a=tds[i].getElementsByTagName('A')[0];
if(!a){continue;}
tds[i].className=(a.id=='menu_x_a_'+fileName)?'but_paq_cur':''
}
}
function index_menuTop_s_h_jianTou()
{
var td1=gid("td_menu_0_scroll");
var td2=gid("index_top_menu_center");
if(!td1 || !td2)return;
td1.style.display=(td2.offsetWidth<index_menuTop_get_spans_width())?'block':"none"
}
function index_menuTop_show_shadow(obj)
{
var shadow_id=obj.id+'_shadow';
var div_shodow=_gId(shadow_id);
set_shadow('div_menu_top',shadow_id,obj.offsetWidth,obj.offsetHeight,obj.style.top,obj.style.left,obj.style.zIndex,'#000',3)
}
function index_menuTop_body_onclick()
{
var obj=event.srcElement;
while(obj.name!='m_class_0' && obj.name!='m_class_sub' && obj.tagName!='BODY')
{
obj=obj.parentElement;
}
if(obj.name=='m_class_0')
{
index_menuTop_class_0__click(obj)
}else if(obj.name=='m_class_sub')
{
return;
}else
{index_menuTop_hid_all();
}
}
function index_menuTop_show_sub(pid,obj)
{
if(show_menu_yn_for_over.value=='n')return;
index_menuTop_hid_sub(obj);
if (obj.name=='m_class_0')
{
var top=get_top(obj);
var left=get_left(obj)+1;
top=top+obj.offsetHeight;
}else
{
var cur_menu_div=obj.parentElement;
while(cur_menu_div.name!='div_menu_sub'){cur_menu_div=cur_menu_div.parentElement}
var top=get_top(obj);
top+=3;
var left=get_left(cur_menu_div);
left+=cur_menu_div.offsetWidth;
left-=6;
}
var id_str=(cur_menu_div)?(cur_menu_div.id+"_"+pid):('menu_top_'+pid)
var sub_menu_div=document.getElementById(id_str);
if(sub_menu_div)
{
sub_menu_div.style.display='block';
sub_menu_div.style.top=top;
sub_menu_div.style.left=left;
index_menuTop_show_shadow(sub_menu_div);
index_menu_old.value+=id_str+',';
return;
}
var a_over=" menu_over(this) "
var a_out=" onMouseOut=menu_out(this) "
var str="";
for (var i=0;i<mc_pid.length;i++)
{
if(mc_pid[i]==pid)
{
var arr3=(mc_str[i]+"|").split("|");
var a_over2=';index_menuTop_show_sub('+mc_id[i]+',this);';
var b="<b><i>"+arr3[0]+"</i></b>";
str+="<tr><td class=but_paq><p><q><a onMouseOver=\""+a_over+a_over2+"\" "+a_out+" name=m_class_sub class=menu_aa>"+b+"</a></q></p></td></tr>";
}
}
for (i=0;i<m_pid.length;i++)
{
if(m_pid[i]==pid)
{
arr_m_str=m_str[i].split('|')
var ico_style=(arr_m_str[3]!='')?(" style='"+get_ico(arr_m_str[3])+"'"):("class=menu_a");
str+="<tr><td class=but_paq><p><q><a onMouseOver=\""+a_over+"\" "+a_out+" onclick=\"show_module('"+arr_m_str[2]+"',this.innerText,0,'"+arr_m_str[1]+"','"+arr_m_str[4]+"');\" ><b "+ico_style+">"+arr_m_str[0]+"</b></a> </q></p></td></tr>";
}
}
if (str!='')
{
str="<div name=div_menu_sub class=menu  id="+id_str+"><table  cellspacing=0 cellpadding=0 width='100%'>"+str+"</table></div>"
div_menu_top.insertAdjacentHTML("beforeEnd",str)
sub_menu_div=document.getElementById(id_str);
sub_menu_div.style.top=top;
sub_menu_div.style.left=left;
index_menuTop_show_shadow(sub_menu_div);
index_menu_old.value+=id_str+',';
}
}
function index_menuTop_find_classID()
{
var tb=_gId("index_menuTop_tb",top);
var fontObj=tb.getElementsByTagName("B")[0];
var id=fontObj.parentNode.id.split("_")[1];
return id;
}						
function index_menuTop_location(obj)
{
if(obj.offsetWidth==17)
{
var temp=gid('td_top_mk1').innerHTML;
top_mk_show_td1.style.display='none';
gid('td_top_mk1').innerHTML='';
td_topMenu.style.display='';
td_topMenu.innerHTML=temp;
}
else
{
var temp=td_topMenu.innerHTML;
td_topMenu.style.display='none';
td_topMenu.innerHTML='';
top_mk_show_td1.style.display='';
td_top_mk1.innerHTML=temp;
}
}
function index_menuTop_open_sysSet2()
{
var classID=index_menuTop_find_classID(); 
open_dialog('module_manage.htm?classID='+classID,950,500);
}
function index_menuTop_show() 
{
var str='';
for (var i=0;i<mc_id.length;i++)
{
if(mc_pid[i]=='0')
{
var arr=(mc_str[i]+"|").split('|');
var t="";
if(arr[1].length>0)t+="<div id=TM_img style='background-image: url("+arr[1]+")'></div>";
t+="<div id=TM_name>"+arr[0]+"</div>";
str+="<td nowrap><span id=m_bg><span id=m_l><span id=m_r>";
str+="<a name=m_class_0 class=index_menuTop_out id='mm_"+mc_id[i]+"' onmouseover='index_menuTop_show_sub("+mc_id[i]+",this);index_menuTop_over_cur(this)' wanneng_menu=0>"+t+"</a>";
str+="</span></span></span>";
str+='<span id=line></span></td>';
}
}
_gId('div_top_menu_scroll').innerHTML=("<table id='index_menuTop_tb' cellspacing=0 cellpadding=0><tr>"+str+"</tr></table>")
setTimeout("index_menuTop_s_h_jianTou()",1)
}
index_menuTop_show()