function getTimeString(intValue){
	var s = (100 + intValue) + "";
	s = s.substring(1);
	return s;
}
function ShowPageBar(_nPageCount, _nCurrIndex, _sPageName, _sPageExt){
  var pageCount = _nPageCount;
	var currIndex = _nCurrIndex;
	var temp = "";
	if (pageCount == null || currIndex == null){
		//alert("error1");
		return;
	}
  temp = "<table border=0 cellspacing=0 cellpadding=0><tr><td width=141>";
  var p = "<a href=" + _sPageName + "_" + (currIndex-1) + "." + _sPageExt + " class=a2>上一页</a>";
  var n = "<a href=" + _sPageName + "_" + (currIndex + 1) + "." + _sPageExt + " class=a2>下一页</a>";
	if(pageCount == 1){
    p = "";
    n = "";
  }
  if(currIndex == 0){
    p = "";  
  }
  if(currIndex == 1){
    p = "<a href=" + _sPageName + "." + _sPageExt + " class=a2>上一页</a>"; 
  }
  if(currIndex == (pageCount-1)){    
    n = "";
  }
  
	if(pageCount > 1){
		temp += p + "&nbsp;";
		for(var i=0;i<pageCount;i++){
			if(i==0){
				temp += "<a href=" + _sPageName + "." + _sPageExt + " class=a2>1</a>&nbsp;";
			}else{
				temp += "<a href=" + _sPageName + "_" + (i) + "." + _sPageExt + " class=a2>" + (i+1) + "</a>&nbsp;";
			}
		}		
	  temp += n + "&nbsp;";
	}
  temp += "</td></tr></table>";
	document.write(temp);
}	

function ShowDate(){
	var s = "";
	var d = new Date();
	s += d.getFullYear() + "年";
	s += getTimeString((d.getMonth() + 1)) + "月";
  s += getTimeString(d.getDate()) + "日";
	document.write(s);
}
