<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

<!--
var loc=stringA=location.href.toLowerCase()
var strhref=""
var strlocation="/";
var len=strlocation.length;
var pos=stringA.indexOf(strlocation)

function lastfilename(stringA){

if (pos>=0){
	stringA=stringA.substring(pos+len,stringA.length);
	while (stringA.indexOf("/")>=0){
		pos=stringA.indexOf("/")
		stringA=stringA.substring(pos+1,stringA.length);
	}
}
return stringA
}	

function lastfoldername(stringA){
if (pos>=0){
	var pos1,pos2
	pos1 = stringA.lastIndexOf("/")//得到所在目录位置end
	stringA=stringA.substring(pos+len,pos1);
	pos2 = stringA.lastIndexOf("/")//得到所在目录位置start
	stringA=stringA.substring(pos2+1,pos1)
	}
return stringA
}


/*START--[0]----------------------------------------------------------------------------定义判断类型*/

var lastfoldername=lastfoldername(stringA)

/*------------------------------------------------------------------------------------------[0]--END*/



/*START--[0]-------------------------------------------------------------links[x] = 这儿输入连接页面*/


//可添加更多数组

var links = new Array();
links[0] = "http://www.improusa.com/en/index";
links[1] = "http://www.improusa.com/en/aboutus";
links[2] = "http://www.improusa.com/en/Quality/index.asp?idtree=.0.36.59.&PDTypeName=Engine%20Parts";
links[3] = "http://www.improusa.com/en/Plant/index.asp?idtree=.0.34.99.";
links[4] = "http://www.improusa.com/en/service/service.asp";
links[5] = "../Contactus/index1.asp";
links[6] = "#";
//var name = new Array()
name[0] = "http://www.improusa.com/images/nav/a1.gif";
name[1] = "http://www.improusa.com/images/nav/2.gif";
name[2] = "http://www.improusa.com/images/nav/3.gif";
name[3] = "http://www.improusa.com/images/nav/4.gif";
name[4] = "http://www.improusa.com/images/nav/5.gif";

var pic = new Array()
pic[0] = "http://www.improusa.com/images/en/index/menu/menu_1.gif";
pic[1] = "http://www.improusa.com/images/en/index/menu/menu_2.gif";
pic[2] = "http://www.improusa.com/images/en/index/menu/menu_3.gif";
pic[3] = "http://www.improusa.com/images/en/index/menu/menu_4.gif";
pic[4] = "http://www.improusa.com/images/en/index/menu/menu_5.gif";
pic[5] = "http://www.improusa.com/images/en/index/menu/menu_6.gif";
pic[6] = "http://www.improusa.com/images/en/index/menu/menu_8.gif";


var pic1 = new Array()
pic1[0] = "http://www.improusa.com/images/en/index/menu/menu_1_on.gif";
pic1[1] = "http://www.improusa.com/images/en/index/menu/menu_2_on.gif";
pic1[2] = "http://www.improusa.com/images/en/index/menu/menu_3_on.gif";
pic1[3] = "http://www.improusa.com/images/en/index/menu/menu_4_on.gif";
pic1[4] = "http://www.improusa.com/images/en/index/menu/menu_5_on.gif";
pic1[5] = "http://www.improusa.com/images/en/index/menu/menu_6_on.gif";
pic1[6] = "http://www.improusa.com/images/en/index/menu/menu_8_on.gif";


/*-----------------------------------------------------------------------------------------[0]--END*/

document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0'>");
document.write("<tr>");	 
for (var i=0; i<links.length; i++) {

// 判断验证
	//temp = links[i].replace(/(.+\/)/,"")
//	document.write(temp) 
//	document.write(anyfoldername) 
//	document.write(lastfilename)
	temp = links[i]
	if (temp == lastfoldername){
	
// 判断后内容
	document.write("<td id='menu"+[i+1]+"'><a href='"+links[i]+"'><img src='"+pic1[i]+"' border='0'></a></td>");
	}else{
	document.write("<td id='menu"+[i+1]+"'><a href='"+links[i]+"' onmouseout='MM_swapImgRestore()' onmouseover='MM_swapImage(\"image"+[i]+"\",\"\",\""+pic1[i]+"\",1)'><img src='"+pic[i]+"' border='0' name=\"image"+[i]+"\"></a></td>");
	}
}
document.write("</tr>");
document.write("</table>");

//-->