var url = "http://he.js.cnfol.com"+filename+"/id="+id+"&num="+page_num+"&br="+br+"&jstype=1&style="+style+"&p=";
function G(id){return document.getElementById(id);}
function index_next(){
var n = G('next_num').value;
n = parseInt(n) == 0 ? 2 : parseInt(n) ;
index_page(n);
/*
if (page_Count == '' || typeof(page_Count) == 'undefined') page_Count = 1;
page_Count = parseInt(page_Count);
if(n>page_Count){
G('next_num').value = page_Count + 1;
G('ncolor').style.color = "red";
return;
}else{
G('ncolor').style.color = "";
}
$.getScript(url+n, function(){
G('index_div'+id).innerHTML = datalist;
G('next_num').value = n + 1;
});
*/
}
function index_head(){
var n = G('next_num').value-2;
n = parseInt(n) == 0 ? 2 : parseInt(n) ;
index_page(n);
}
function index_last(){
var n=page_Count;
$.getScript(url+n, function(){
G('index_div'+id).innerHTML = datalist;
G('page').innerHTML = page(11);
});
}
function index_page(n){
$.getScript(url+n, function(){
G('index_div'+id).innerHTML = datalist;
G('next_num').value = n + 1;
G('page').innerHTML = page(n+1);
});
$(".TopicLst .Pt10").addClass("F14");
}
function page(v)
{
var strNext = ' 共 '+page_Count+' 页首页 ';
var current = v ? v : 2;
var n = 14;
var i = 0;
var end_page;
var start_page;
if(page_Countpage_Count){
end_page = page_Count;
}else{
end_page = parseInt(i*10)+10;
}
}
var previous = (current > 1) ? (current-2) : 1;
if(previous){
strNext+='上一页 ';
}
for (var i=start_page;i<=end_page;i++)
{
strNext+='[ '+i+' ] ';
}
if(page_Count>end_page){
strNext += '...';
}
strNext += '下一页 ';
strNext += '末页';
if(v) return strNext;
if(parseInt(total) > parseInt(page_num)){
document.writeln(strNext);
}
}
page(0);