var mainLayer=new Array("财政局简介","政务公开","财政信息","便民服务","政府采购","财税法规","网上办事");//主导航栏目
//0 1 2
//var mainLayerHttp=new Array("index.aspx","zwgk/index.aspx","#","#","#","#","#","#","#");

　//　然后在如下的位置添加“论坛”和“文献”栏目及连接地址。

var subLayer0=new Array("领导职能","各部门职能","财政工作人员守则"); //导航栏目一下的次级栏目
var subLayerHttp0=new Array("http://www.mhqczj.gov.cn/cjjj/index1.aspx?CateId=0101&amp;categoryName=领导职能&amp;isSingleInfo=True","http://www.mhqczj.gov.cn/cjjj/index1.aspx?CateId=0103&amp;categoryName=各部门职能&amp;isSingleInfo=True","http://www.mhqczj.gov.cn/cjjj/index1.aspx?CateId=0102&amp;categoryName=财政工作人员守则&amp;isSingleInfo=True");//主导航栏目一下的次级栏目连接地址
//var subLayer0=new Array();
//var subLayerHttp0=new Array();


var subLayer1=new Array("政府信息公开指南","政府信息公开目录","政务公开机构");//导航栏目三的次级栏目
var subLayerHttp1=new Array("http://www.mhqczj.gov.cn/zwgk/index1.aspx?CateId=0203&amp;categoryName=政府信息公开指南&amp;isSingleInfo=True","http://www.mhqczj.gov.cn/zwgk/index.aspx?catenum=0204&amp;catename=政府信息公开目录","http://www.mhqczj.gov.cn/zwgk/index1.aspx?CateId=0205&amp;categoryName=政务公开机构&amp;isSingleInfo=True");//主导航栏目三的次级栏目连接地址

var subLayer2=new Array("财政动态","信息传递");//导航栏目二的次级栏目
var subLayerHttp2=new Array("http://www.mhqczj.gov.cn/czxx/index.aspx?catenum=0301&catename=财政动态","http://www.mhqczj.gov.cn/czxx/index.aspx?catenum=0302&catename=信息传递");//主导航栏目二的次级栏目连接地址

//var subLayer2=new Array();
//var subLayerHttp2=new Array();

var subLayer3=new Array("便民服务信息","财政服务指南","常见问题解答");
var subLayerHttp3=new Array("http://www.mhqczj.gov.cn/bmfw/index.aspx?catenum=0401&catename=便民服务信息","http://www.mhqczj.gov.cn/bmfw/index1.aspx?CateId=0402&amp;categoryName=财政服务指南&amp;isSingleInfo=True","http://www.mhqczj.gov.cn/bmfw/index.aspx?catenum=0403&catename=常见问题解答");

var subLayer4=new Array("采购目录","招标公告","政府采购法","定点采购信息");
var subLayerHttp4=new Array("http://www.mhqczj.gov.cn/zfcg/index1.aspx?CateId=0502&amp;categoryName=采购目录&amp;isSingleInfo=True","http://www.mhqczj.gov.cn/zfcg/index1.aspx?CateId=0503&amp;categoryName=招标公告&amp;isSingleInfo=True","http://www.mhqczj.gov.cn/zfcg/index.aspx?catenum=0504&catename=政府采购法","http://www.mhqczj.gov.cn/zfcg/index.aspx?catenum=0505&catename=定点采购信息");

//var subLayer5=new Array("财政法规");
//var subLayerHttp5=new Array("http://www.mhqczj.gov.cn/csfg/index.aspx?catenum=0601&catename=财政法规");
var subLayer5=new Array();
var subLayerHttp5=new Array();


var subLayer6=new Array("软件下载","表格下载");
var subLayerHttp6=new Array("http://www.mhqczj.gov.cn/wsbs/index.aspx?catenum=0701&catename=软件下载","http://www.mhqczj.gov.cn/wsbs/index.aspx?catenum=0701&catename=表格下载");

//var subLayer7=new Array();
//var subLayerHttp7=new Array();

//--------------- 主导航条Table参数调整 ------------//
var mainTableTdWidth=86; //每个TD的宽度，调整主导航内容间距
var mainTableBorder=0; //调整主导航表格边框宽度
var mainTableCellspacing=0; //调整主导航表格Cellspacing
var mainTableCellpadding=1; //调整主导航表格Cellpadding
var mainTableBgcolor="#ffffff"; //调整主导航表格背景色
var mainTableBordercolor=""; //调整主导航表格编框颜色
var mainTableBackgroundImg=""; //调整主导航表格背景图片url地址
var hrefClassName="link" //调整url风格样式
var mainTableTdBgcolor="004ECD"; //调整主导航表格Td色

//--------------- 次导航条Table参数调整 ------------//
var subTableBorder=0; //调整次导航条表格边框宽度
var subTableCellspacing=0; //调整次导航条表格Cellspacing
var subTableCellpadding=1; //调整次导航条表格Cellpadding
var subTableBgcolor="#ffffff"; //调整次导航条表格背景色
var subTableBordercolor=""; //次导航条表格编框颜色
var subTableBackgroundImg=""; //次导航条表格背景图片url地址
var subTableTdBgcolor="004ECD"; //调整次导航表格Td色
var sbuTabbleTop=21; //次导航表格上下微调
var sbuTabbleLeft=-1; //次导航表格左右微调

//--------------- 系统参数*请勿调整 ------------//
var layerMax=mainLayer.length+10;
var layerName="index";

//--------------- 生成下拉菜单 ------------//
function createMainLayer(){ 
document.write("<table border=0 cellspacing=0 cellpadding=0><tr><td><div id='wall' onmouseout=layervib('visible','"+layerMax+"') style='position:relative; left:0px; top:0px; width:100%; z-index:1' ><table width="+mainLayer.length*mainTableTdWidth+" border='"+mainTableBorder+"' cellspacing='"+mainTableCellpadding+"' cellpadding='"+mainTableCellpadding+"' bgcolor='"+mainTableBgcolor+"' bordercolor='"+mainTableBordercolor+"' background='"+mainTableBackgroundImg+"'><tr height='25'>");
/*for(i=0;i<mainLayer.length;i++){
document.write("<td width='"+mainTableTdWidth+"' bgcolor='"+mainTableTdBgcolor+"' class='"+hrefClassName+"' onmouseover=layervib('visible','"+i+"')>&nbsp;<a href='#'>"+mainLayer[i]+"</a></td>");
}*/
document.write("<td width='"+mainTableTdWidth+"' bgcolor='"+mainTableTdBgcolor+"' class='"+hrefClassName+"' onmouseover=layervib('visible','"+0+"')>&nbsp;<font color='#ffffff'>"+mainLayer[0]+"</font></td>");
document.write("<td width='"+mainTableTdWidth+"' bgcolor='"+mainTableTdBgcolor+"' class='"+hrefClassName+"' onmouseover=layervib('visible','"+1+"')>&nbsp;<font color='#ffffff'>"+mainLayer[1]+"</font></td>");
document.write("<td width='"+mainTableTdWidth+"' bgcolor='"+mainTableTdBgcolor+"' class='"+hrefClassName+"' onmouseover=layervib('visible','"+2+"')>&nbsp;<font color='#ffffff'>"+mainLayer[2]+"</font></td>");
document.write("<td width='"+mainTableTdWidth+"' bgcolor='"+mainTableTdBgcolor+"' class='"+hrefClassName+"' onmouseover=layervib('visible','"+3+"')>&nbsp;<font color='#ffffff'>"+mainLayer[3]+"</font></td>");
document.write("<td width='"+mainTableTdWidth+"' bgcolor='"+mainTableTdBgcolor+"' class='"+hrefClassName+"' onmouseover=layervib('visible','"+4+"')>&nbsp;<font color='#ffffff'>"+mainLayer[4]+"</font></td>");//<a href='http://www.mhqczj.gov.cn/index.aspx'>
document.write("<td width='"+mainTableTdWidth+"' bgcolor='"+mainTableTdBgcolor+"' class='"+hrefClassName+"' onmouseover=layervib('visible','"+5+"')>&nbsp;<a href='http://www.mhqczj.gov.cn/csfg/index.aspx?catenum=06&catename=财税法规'><font color='#ffffff'>"+mainLayer[5]+"</font></a></td>");
document.write("<td width='"+mainTableTdWidth+"' bgcolor='"+mainTableTdBgcolor+"' class='"+hrefClassName+"' onmouseover=layervib('visible','"+6+"')>&nbsp;<font color='#ffffff'>"+mainLayer[6]+"</font></td>");
//document.write("<td width='"+mainTableTdWidth+"' bgcolor='"+mainTableTdBgcolor+"' class='"+hrefClassName+"' onmouseover=layervib('visible','"+7+"')>&nbsp;<a href='http://www.mhqczj.gov.cn/index.aspx'><font color='#ffffff'>"+mainLayer[7]+"</font></a></td>");

document.write("</tr></table>");

for(j=0;j<mainLayer.length;j++){
createSubLayer(j);
}
document.write("</div></table></td></tr></table>");
}

//--------------- 生成每项下拉菜单内容 ------------//
function createSubLayer(num){
var subLayerName= layerName +num;
var subLayerLeft=(mainTableTdWidth*num)+mainTableCellpadding+mainTableBorder;
var subLayerList=eval("subLayer"+num);
var subLayerHttpList=eval("subLayerHttp"+num);
document.write("<div id='"+subLayerName+"' style='position:absolute; left:"+(subLayerLeft+sbuTabbleLeft)+"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){
if(num==1||num==0)//根据菜单文字的多少，调整宽度。
{
document.write("<table width='120px' border='"+subTableBorder+"' cellspacing='"+subTableCellpadding+"' cellpadding='"+subTableCellpadding+"' bgcolor='"+subTableBgcolor+"' bordercolor='"+subTableBordercolor+"' background='"+subTableBackgroundImg+"'") 
}
else if(num==3||num==5)
{
  document.write("<table width='100px' border='"+subTableBorder+"' cellspacing='"+subTableCellpadding+"' cellpadding='"+subTableCellpadding+"' bgcolor='"+subTableBgcolor+"' bordercolor='"+subTableBordercolor+"' background='"+subTableBackgroundImg+"'") 
}
else if(num==4)
{
  document.write("<table width='90px' border='"+subTableBorder+"' cellspacing='"+subTableCellpadding+"' cellpadding='"+subTableCellpadding+"' bgcolor='"+subTableBgcolor+"' bordercolor='"+subTableBordercolor+"' background='"+subTableBackgroundImg+"'") 
}
else
{
document.write("<table width='75px' border='"+subTableBorder+"' cellspacing='"+subTableCellpadding+"' cellpadding='"+subTableCellpadding+"' bgcolor='"+subTableBgcolor+"' bordercolor='"+subTableBordercolor+"' background='"+subTableBackgroundImg+"'") 
}
for(h=0;h<subLayerList.length;h++){ 

document.write("<tr><td bgcolor='"+subTableTdBgcolor+"' width='100%' class='link'>&nbsp;<a href='"+ subLayerHttpList [h]+"' class='link'><font color='#ffffff'>"+subLayerList[h]+"</font></a>&nbsp;</td></tr>");
}
document.write("</table>");
}
document.write("</div>"); 

}

//------------------------------次菜单显隐控制--------------------------//
function layervib(type,num){
var H=type;
var temp=(H='visible'?'hidden':'visible')
for(var i=0;i<mainLayer.length;i++){
var E=eval('document.all.index'+i+'.style');
var H=eval(i);
if(i==num){E.visibility=type}else{E.visibility=temp};
}
}






