//--------------- 主导航条内容 ------------//
var mainLayer=new Array("学院概况","机构设置","党团建设","信息服务","办公系统","汇华招生","就业指导","教务在线","院长信箱","师大首页","返回首页");//主导航栏目
var mainLayerHttp=new Array("#","#","#","#","#","zhaosheng","jiuye","jwc","mailto:hhyzxx@mail.hebtu.edu.cn","http://www.hebtu.edu.cn/","index.php");//主导航栏目连接地址
//--------------- 次导航条内容 ------------//
var subLayer0=new Array("校园简介","历任院长","学部专家","学院建设","校园风光"); //导航栏目一下的次级栏目
var subLayerHttp0=new Array("http://222.30.226.10/index.php?mods=zjhh","http://222.30.226.10/index.php?mods=zjhh&cate=xyld","http://222.30.226.10/index.php?mods=zjhh&cate=xyzj","http://222.30.226.10/index.php?mods=zjhh&cate=xyjs","http://222.30.226.10/index.php?mods=zjhh&cate=xyfg");//主导航栏目一下的次级栏目连接地址
var subLayer1=new Array("教务在线","学生处","行政处","其它机构"); //导航栏目一下的次级栏目
var subLayerHttp1=new Array("http://222.30.226.10/jwc/","http://222.30.226.10/hhxsc","http://222.30.226.10/xingzh/","http://222.30.226.10/index.php?mods=jgsz");//主导航栏目一下的次级栏目连接地址
var subLayer2=new Array("党建之窗","学院团委");
var subLayerHttp2=new Array("http://222.30.226.10/CommunistParty","http://222.30.226.10/");
var subLayer3=new Array("网络课堂","学分制系统","校园一卡通","网络安全","学校校历","班车时刻","办公电话","高校学籍查询","天气预报","列车车次查询");
var subLayerHttp3=new Array("http://222.30.226.10/hhcmc/study.htm","http://222.30.226.10/xfz","http://ecard.hebtu.edu.cn/","http://202.206.100.60/","http://huihua.hebtu.edu.cn/xl.doc","http://huihua.hebtu.edu.cn/banche.html","index.php?mods=tele","http://xjxl.chsi.com.cn/ss/he/index.jsp","http://www.nmc.gov.cn/","http://www.shike.org.cn/TrainInfo/");
var subLayer4=new Array("学院办公系统","员工办公系统","十七大专题论坛");
var subLayerHttp4=new Array("http://222.30.226.10/Hhoffice/","http://222.30.226.10/Economy/","http://222.30.226.10/bbst");


//--------------- 主导航条Table参数调整 ------------//
//--------------- 主导航条Table参数调整 ------------//
var mainTableTdWidth=70; //每个TD的宽度，调整主导航内容间距
var mainTableTdHeight=23;
var mainTableBorder=0; //调整主导航表格边框宽度
var mainTableCellspacing=0; //调整主导航表格Cellspacing
var mainTableCellpadding=0; //调整主导航表格Cellpadding
var mainTableBgcolor=""; //调整主导航表格背景色
var mainTableBordercolor=""; //调整主导航表格编框颜色
var mainTableBackgroundImg=""; //调整主导航表格背景图片url地址
var hrefClassName="dhfont"; //调整url风格样式
var mainTableTdBgcolor=""; //调整主导航表格Td色

//--------------- 次导航条Table参数调整 ------------//
var subTableBorder=0; //调整次导航条表格边框宽度
var subTableCellspacing=0; //调整次导航条表格Cellspacing
var subTableCellpadding=0; //调整次导航条表格Cellpadding
//var subTableBgcolor="#0662A3"; //调整次导航条表格背景色
var subTableBgcolor="#0662A3"; //调整次导航条表格背景色
var subTableBordercolor=""; //次导航条表格编框颜色
var subTableBackgroundImg=""; //次导航条表格背景图片url地址
var subTableTdBgcolor=""; //调整次导航表格Td色
var sbuTabbleTop=19; //次导航表格上下微调
var sbuTabbleLeft=1; //次导航表格左右微调

//--------------- 系统参数*请勿调整 ------------//
var layerMax=mainLayer.length+10;
var layerName="index"

//--------------- 生成下拉菜单 ------------//
function createMainLayer(){ 
document.write("<table border=0 cellspacing=0 cellpadding=0 align=center><tr><td><div id='wall' onmouseout=layervib('visible','"+layerMax+"') style='position:relative; left:0px; top:0px; width:100%; z-index:1' ><table width='760' height="+mainTableTdHeight+" border='"+mainTableBorder+"' cellspacing='"+mainTableCellpadding+"' cellpadding='"+mainTableCellpadding+"' bgcolor='"+mainTableBgcolor+"' bordercolor='"+mainTableBordercolor+"' background='"+mainTableBackgroundImg+"'><tr>");
for(i=0;i<mainLayer.length;i++){
document.write("<td width='"+mainTableTdWidth+"' height='"+mainTableTdHeight+"'valign=bottom bgcolor='"+mainTableTdBgcolor+"' class='"+hrefClassName+"' onmouseover=layervib('visible','"+i+"')><a href='"+ mainLayerHttp[i]+"' class='"+hrefClassName+"'>"+mainLayer[i]+"</a></td>");
}
document.write("</tr></table>");

for(j=0;j<5;j++){
createSubLayer(j,100,0);


}
//for(j=mainLayer.length-2;j<mainLayer.length;j++)
//{
//createSubLayer(mainLayer.length-5,100,-30);
//createSubLayer(mainLayer.length-4,100,-30);
//}
document.write("</div></td></tr></table>");
}



//--------------- 生成每项下拉菜单内容 ------------//
function createSubLayer(num,divWidth,offset){
var subLayerName= layerName +num;
var subLayerLeft=(mainTableTdWidth*num)+mainTableCellpadding+mainTableBorder;
var subLayerList=eval("subLayer"+num);
var subLayerLeftMargin=subLayerLeft+sbuTabbleLeft-offset;
var subLayerHttpList=eval("subLayerHttp"+num);
document.write("<div id='"+subLayerName+"' style='position:absolute; left:"+subLayerLeftMargin+"px; top:"+((mainTableBorder+mainTableCellspacing+mainTableCellpadding)*2+sbuTabbleTop)+"px; z-index:2; height: 24px; visibility: hidden' onmouseover=layervib('visible','"+num+"') onmouseout=layervib('visible','"+layerMax+"')>");
if(subLayerList.length!=0){
document.write("<table width='"+divWidth+"' border='"+subTableBorder+"' cellspacing='"+subTableCellpadding+"' cellpadding='"+subTableCellpadding+"' bgcolor='"+subTableBgcolor+"' bordercolor='"+subTableBordercolor+"' background='"+subTableBackgroundImg+"'") 
for(h=0;h<subLayerList.length;h++){ 
document.write("<tr><td id='item"+num+"_"+h+"' onmouseover=changelight('item"+num+"_"+h+"','dropmenuHIGH') onmouseout=changelight('item"+num+"_"+h+"','dropmenu')  bgcolor='"+subTableTdBgcolor+"' width='100%' class='"+hrefClassName+"'><a href='"+ subLayerHttpList [h]+"' class='"+hrefClassName+"'>&nbsp;"+subLayerList[h]+"</a></td></tr>");
document.write("<tr><td bgcolor='#4B6B9A' height='1' width='100%'></td></tr>");

}
document.write("</table>");
}
document.write("</div>"); 

}

function changelight(row, stylename) {
eval('document.all.' + row + '.className = "' + stylename + '"');
}


//------------------------------次菜单显隐控制--------------------------//
function layervib(type,num){
var H=type;
var temp=(H='visible'?'hidden':'visible')
for(var i=0;i<5;i++){
var E=eval('document.all.index'+i+'.style');
var H=eval(i);
if(i==num){E.visibility=type}else{E.visibility=temp};
}
}

function switchCell(n) {
	for(i=0;i<navcell.length;i++){
		navcell[i].className="tab-off";
		tb[i].style.display="none";
	}
	navcell[n].className="tab-on";
	tb[n].style.display="block";
}