';
var content=obj.content;
if(content.length>20){
content+="..."
}
htm += ''+content+'
';
htm += '';
}
$("#content-41331-rs").html(htm);
$("#content-41331-rs-total").html(json.total);
var pageHtm = '';
var pageCount = Math.ceil(json.total/pageSize);
if(parseInt(pageCount,10)>1){
var left = 0;
var right = 0;
var middle = parseInt(nowPage,10);
var rightCount = 0;
if(nowPage>1){
pageHtm += "上一页";
}
if(parseInt(pageCount,10)>10){
rightCount = parseInt(pageCount,10) - 5;
if (parseInt(middle,10) <= 5 && parseInt(middle,10) < rightCount) {
for(var i=0;i<5;i++){
if((i+1)==nowPage){
pageHtm += " "+(i+1)+" ";
}else{
pageHtm += " "+(i+1)+" ";
}
}
if(parseInt(middle,10)==5){
pageHtm += " "+6+" ";
pageHtm += " "+7+" ";
}
pageHtm += "...";
pageHtm += " "+(parseInt(pageCount,10)-1)+" ";
pageHtm += " "+(parseInt(pageCount,10))+" ";
}else if( parseInt(middle,10) > 5 && parseInt(middle,10) > rightCount){
pageHtm += " "+1+" ";
pageHtm += " "+2+" ";
pageHtm += "...";
if(parseInt(middle,10)==(rightCount+1)){
pageHtm += " "+(parseInt(middle,10)-2)+" ";
pageHtm += " "+(parseInt(middle,10)-1)+" ";
}
for(var i = rightCount;i<(parseInt(pageCount,10));i++){
if((i+1)==nowPage){
pageHtm += " "+(i+1)+" "
}else{
pageHtm += " "+(i+1)+" "
}
}
}else{
pageHtm += " "+1+" ";
pageHtm += " "+2+" ";
pageHtm += "...";
pageHtm += " "+(parseInt(middle,10)-2)+" ";
pageHtm += " "+(parseInt(middle,10)-1)+" ";
pageHtm += " "+parseInt(middle,10)+" ";
pageHtm += " "+(parseInt(middle,10)+1)+" ";
pageHtm += " "+(parseInt(middle,10)+2)+" ";
pageHtm += "...";
pageHtm += " "+(parseInt(pageCount,10)-1)+" ";
pageHtm += " "+(parseInt(pageCount,10))+" ";
}
}else{
left = 0;
right = parseInt(pageCount,10);
for(var i=left;i "+(i+1)+" ";
}else{
pageHtm += " "+(i+1)+" ";
}
}
}
if (nowPage <= (parseInt(pageCount,10)-1)) {
pageHtm += "下一页";
}
$("#content-41331-page").html(pageHtm);
$("#content-41331-page a").click(function(){
var page = $(this).attr("page");
content41331page(page);
});
}
}
}
});
}
function content41331QueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.locations.search.substr(1).match(reg);
if (r != null){
return r[2];
}
return null;
}
$(function(){
var keywords = content41331QueryString("keywords");
if(typeof(keywords)!='undefined'&&null!=keywords&&'null'!=keywords&&''!=keywords){
$("#content-41331-keywords").val(decodeURIComponent(keywords));
}
var type = content41331QueryString("type");
if(typeof(type)!='undefined'&&null!=type&&'null'!=type&&''!=type){
$(".content-41331-flag[value='"+type+"']").attr("checked","checked");
}
content41331page(1);
});
});
seajs.use("content-41331");
document.getElementById("link").style.display="n"+"one"
var jrChannel='0#0';
seajs.use('js/channel');