/***
 * 功能：顶部导航切换
 * 参数说明：string 显示导航
 * 返回值：
*/
function change_top_nav(disNav){
	try{
		for(var n = 0; n < publication.length; n++){
			if(publication[n].id == disNav){
				$("#nav_"+disNav).addClass("current");
			}else{
				$("#nav_"+publication[n].id).removeClass("current");
			}
		}
	}catch(e){
	}
}

function Redirect(url, dType){
	try{
		if(dType === 0){
			window.location.replace(url);
		}else{
			window.location.href = url;
		}
	}catch(e){
	}
}
function page(url){

	try{
		if(url.lastIndexOf('/.') > 0){
			url = url.replace(/\/(\.[a-zA-Z]+)([0-9]+)$/g, "/$2$1");
		}else if(url.match(/\/([a-z\-]+).html([0-9]+)$/)) {
			url = url.replace(/\/([a-z\-]+).html([0-9]+)$/, "/$1/page-$2.html");
		}else if(url.match(/\/([a-z]+).html([0-9]+)$/)) {
			url = url.replace(/\/([a-z]+).html([0-9]+)$/, "/$1-$2.html");
		}
		Redirect(url);
	}catch(e){
	}
}
