// JavaScript Document
var cUrl=location.href; //取得当前文件名
cUrl=cUrl.toLowerCase(); //转换成小写

var MenuFlag=new Array("","index","snews.asp?typeid=0101","products.asp?typeid=0201","products.asp?typeid=0301","news.asp?typeid=0401","news.asp?typeid=05","snews.asp?typeid=06");

var MenuImg=new Array("","images/IndexMenu1.jpg","images/IndexMenu2.jpg","images/IndexMenu3.jpg","images/IndexMenu4.jpg","images/IndexMenu5.jpg","images/IndexMenu6.jpg","images/IndexMenu7.jpg");

var MenuOnImg=new Array("","images/OnIndexMenu1.jpg","images/OnIndexMenu2.jpg","images/OnIndexMenu3.jpg","images/OnIndexMenu4.jpg","images/OnIndexMenu5.jpg","images/OnIndexMenu6.jpg","images/OnIndexMenu7.jpg");

// 将导航菜单中的页面文件名存入arr数组
/*
for (var Menui=0;Menui<=8 ;Menui++ )
{
if (cUrl.indexOf(MenuFlag[Menui])>0) //判断当前页面是否存在数组中
{
document.getElementById("TopMenu"+Menui).style.background="#FFF";
document.getElementById("TopMenu"+Menui).style.color="#2A5CB9";

}
}
*/
		for (var Menui=0;Menui<=8 ;Menui++ )
		{
		if (cUrl.indexOf(MenuFlag[Menui])>0) //判断当前页面是否存在数组中
		{
		MenuImg[Menui]=MenuOnImg[Menui];
		}
		}
function showMenu()
{
		document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
		document.write('			<tr>');
		document.write('			  <td width="20" align="center">&nbsp;</td>');
		document.write('			  <td width="70" align="center"><a href="index.asp"><img src="'+MenuImg[1]+'" border="0" onMouseOver="this.src=\''+MenuOnImg[1]+'\'" onMouseOut="this.src=\''+MenuImg[1]+'\'"></a></td>');
		document.write('			  <td width="120"><div align="center"><a href="goto.asp?typeid=01"><img src="'+MenuImg[2]+'" border="0" onMouseOver="this.src=\''+MenuOnImg[2]+'\'" onMouseOut="this.src=\''+MenuImg[2]+'\'"></a></div></td>');
		document.write('			  <td width="95"><div align="center"><a href="goto.asp?typeid=02"><img src="'+MenuImg[3]+'" border="0" onMouseOver="this.src=\''+MenuOnImg[3]+'\'" onMouseOut="this.src=\''+MenuImg[3]+'\'"></a></div></td>');
		document.write('			  <td width="120"><div align="center"><a href="goto.asp?typeid=03"><img src="'+MenuImg[4]+'" border="0" onMouseOver="this.src=\''+MenuOnImg[4]+'\'" onMouseOut="this.src=\''+MenuImg[4]+'\'"></a></div></td>');
		document.write('			  <td width="95"><div align="center"><a href="goto.asp?typeid=04"><img src="'+MenuImg[5]+'" border="0" onMouseOver="this.src=\''+MenuOnImg[5]+'\'" onMouseOut="this.src=\''+MenuImg[5]+'\'"></a></div></td>');
		document.write('			  <td width="95"><div align="center"><a href="goto.asp?typeid=05" ><img src="'+MenuImg[6]+'" border="0" onMouseOver="this.src=\''+MenuOnImg[6]+'\'" onMouseOut="this.src=\''+MenuImg[6]+'\'"></a></div></td>');
		document.write('			  <td width="120"><div align="center"><a href="goto.asp?typeid=06" ><img src="'+MenuImg[7]+'" border="0" onMouseOver="this.src=\''+MenuOnImg[7]+'\'" onMouseOut="this.src=\''+MenuImg[7]+'\'"></a></div></td>');
		document.write('			  <td width="220">&nbsp;</td>');
		document.write('			</tr>');
		document.write('		  </table>');
}