function createPageHTML(divName,_nPageCount, _nCurrIndex, _sPageName, _sPageExt,_nPageSum){
var head = document.getElementsByTagName('head')[0];
var style = document.createElement("link");
style.href = "";
style.rel = "stylesheet";
style.type = "text/css";
head.insertBefore(style,head.childNodes[0]);
var con_text = "";
if(_nPageCount == null || _nPageCount<1){
return;
}
var nCurrIndex = _nCurrIndex;
con_text += "
";
else
con_text +="首页 ";
if(nCurrIndex>1){
if((nCurrIndex-1)>0){
if((nCurrIndex-1)==1)
con_text += "";
else
con_text += "";
}
}
var startpage=0,endpage =0;
if(nCurrIndex > 5){
startpage = nCurrIndex-2;
if(_nPageCount-nCurrIndex>2){
endpage =nCurrIndex+2;
}else{
endpage = _nPageCount;
}
}else if(_nPageCount<6){
startpage = 1;
endpage = _nPageCount;
}else{
startpage = 1;
endpage = 6;
}
for(var k=startpage; k<=endpage; k++){
var param = "";
if(k >1 ) param = "_" + k;
if(k==nCurrIndex)
con_text += "";
else
con_text += "";
}
if(nCurrIndex<_nPageCount){
con_text += "";
}
con_text += " ";
document.getElementById(divName).innerHTML = con_text;
}
function pagination_go(sPageName,sPageExt,nPageCount){
var gopageID = document.getElementById('pagination_input').value;
gopageID= gopageID.replace(" ",'');
if(gopageID){
if(parseInt(gopageID)<=nPageCount && parseInt(gopageID)>0){
if(gopageID=="1"){
window.location.href = sPageName+"."+sPageExt;
}else{
window.location.href = sPageName+"_" + gopageID + "."+sPageExt;
}
}
}
return false;
}