//上海火速信息
//任卓鸣2003.01
//使用时注意图片的格式jpg or gif
//注意图片大小尺寸

var loc=stringA=location.href.toLowerCase()
var strlocation="/"
var len=strlocation.length
var tempfilename,temp,content,pic1,pic2
var systemhref,webhref

function filename(stringA){
var pos=stringA.indexOf(strlocation)
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
}

systemhref=filename(stringA)//页面载入时首先调用，判断当前页面的文件名,将文件名赋予systemhref

function comparehref(webhref,pic1,pic2){//webhref是需要连结的页面地址，pic1是原图片的地址，pic2是
	temp=filename(webhref)
	if (temp==systemhref){
		content="<img name=" + pic2 + " src='" + pic2 + "' width=199 height=27 border=0>"
	}
	else{
		content='<a href=' + webhref + ' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage("'+pic1+'","","'+pic2+'",1)><img name='+pic1+' src='+pic1+' width=199 height=27 border=0></a>'
	}
	return content
}

function comparehref_top(webhref,pic1,pic2){//webhref是需要连结的页面地址，pic1是原图片的地址，pic2是
	temp=filename(webhref)
	if (temp==systemhref){
		content="<img name=" + pic2 + " src='" + pic2 + "' border=0>"
	}
	else{
		content='<a href=' + webhref + ' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage("'+pic1+'","","'+pic2+'",1)><img name='+pic1+' src='+pic1+' border=0></a>'
	}
	return content
}

