function lastPage(pageNo,act){
	if(pageNo==1){
		alert("已经是第一页了");
	}else{
		var pp=pageNo-1;
		window.location="/"+act+"="+pp;
	}
}

function nextPage(pageNo,pageSum,act){
	if(pageNo==pageSum){
		alert("已经是最后一页了");
	}else{
		var pp=pageNo+1;
		window.location=act+"="+pp;
	}
}

function goo(pageSum,act){
	var pp=document.getElementById("moveToPage").value;
	if(pp==""){
		alert("页码为空");
		return false;
	}
	if(isNaN(pp)){
		alert("页码不是数字");
		return false;
	}
	if(pp<0){
		alert("页码是负数");
		return false;
	}
	if(pp>pageSum){
		alert("页码超过总页数");
		return false;
	}
	window.location=act+"="+pp;
}

function lastPageZX(pageNo,act){
	var s=document.getElementById("searchInput").value;
	if(pageNo==1){
		alert("已经是第一页了");
	}else{
		var pp=pageNo-1;
		window.location=act+"="+pp+"&search="+s;
	}
}

function nextPageZX(pageNo,pageSum,act){
	var s=document.getElementById("searchInput").value;
	if(pageNo==pageSum){
		alert("已经是最后一页了");
	}else{
		var pp=pageNo+1;
		window.location=act+"="+pp+"&search="+s;
	}
}

function gooZX(pageSum,act){
	var s=document.getElementById("searchInput").value;
	var pp=document.getElementById("moveToPage").value;
	if(pp==""){
		alert("页码为空");
		return false;
	}
	if(isNaN(pp)){
		alert("页码不是数字");
		return false;
	}
	if(pp<0){
		alert("页码是负数");
		return false;
	}
	if(pp>pageSum){
		alert("页码超过总页数");
		return false;
	}
	window.location=act+"="+pp+"&search="+s;
}

function search(act){
	var s=document.getElementById("searchInput").value;
	window.location=act+encodeURIComponent(s);
}