function pagesoft(){
	var path = window.location.pathname;
	var paths = new Array();
	paths = path.split("/");
	path = paths[paths.length-1];
	if(path.indexOf(".jsp")>-1){
		paths = path.split(".jsp");
		path = paths[0];
	}else{
		return;
	}
	var pn, current;
	//alert(path.indexOf("_"));
	if(path.indexOf("_")>-1){
		paths = path.split("_");
		pn = paths[0];
		current = paths[1];
		current = parseInt(current);
	}else{
		pn = path;
		current = 1;
	}
	//alert(current);
	var vtotal = document.getElementById("total").value;
	var total = parseInt(vtotal);
	//alert(total)
	if(isNaN(total)){
		return;
	}
	var total2 = total;
	if(total < current){
		document.write("top_index有误，softotal不能小于当前页码");
		return;
	}
	if(total==1){
		document.write("只有1页");
	}else if(total <1 || total < current){
		document.write("top_index有误，softotal不能小于1");
	}else{
		if(total > current){
			document.write("<td><a href=\""+pn + "_"+(current + 1)+".jsp\">上一页</a></td>");
			//alert("total:"+ total+"   current:" + current);
		}
		for(i = 1;i<(total + 1);i++){
			if(total2 != current){
				if(total != i){
				document.write("<td><a href=\""+pn + "_" + total2+".jsp\">" + i+"</a></td>");//alert(current);
				}else{
					document.write("<td><a href=\""+pn +".jsp\">" + i+"</a></td>");//alert(current);
				}
			}else{
				document.write("<td>"+i+"</td>");
			}
			total2--;
		}
		if(2==current){
			document.write("<td><a href=\"" + pn +".jsp\">下一页</a></td>");
		}else if(1 < current){
			document.write("<td align=\"right\"><a href=\""+pn+"_"+(current - 1)+".jsp\">下一页</a></td>");
		}
	}
}