﻿function nd()
{
    alert("您登录后才能下载此文件。");
}
function _df(obj)
{
   return false;
}
function searchKey()
{
    if($.trim($("#tbkey").val())!="")
   { 
    $("#sf").submit();
    return false;
   }
   else
   {
        alert("请输入查询关键字。");
        return false;
   } 
}
function showDiv(obj,num,len,tar)
{
  var holder= $(tar).parent().parent();
  holder.find(".tagon").each(function(){
    this.className="tagoff";
  });
 for(var id = 1;id<=len;id++)
 {
  var ss=obj+id;
  if(id==num){
  try{document.getElementById(ss).style.display="block";
    $(tar).parent().attr("class","tagon");
  }catch(e){};
  }else{
  try{document.getElementById(ss).style.display="none"}catch(e){};
  }
 }
}

$(function(){
    var id=$("#hd_cur").val();
   if(id!=undefined)
   {  
        $("#nav li").each(function(){
            $(this).removeClass("ss");
        });
        $("#li_"+id).addClass("ss"); 
   } 
})

//by cyc 2010-05-18

$(function(){


$("#nextcyc").click(function(){
var pageIndex=$("#PageIndex").val();
var PageCount=$("#PageCount").val();
if(pageIndex>=PageCount&&PageCount!=0)
{
//alert("没有下一页了！");
return;}
else
{
var index= parseInt(pageIndex)+parseInt(1);
gets(index,1);
}
});


$("#upcyc").click(function(){
var pageIndex=$("#PageIndex").val();
var PageCount=$("#PageCount").val();
if(pageIndex<=1)
{
//alert("没有上一页了！");
return;}
else
{
var index= parseInt(pageIndex)-parseInt(1);

gets(index,0);
}
});

})
function gets(pageindex,up)
{
$.post("CommonHandlers/DigestPageHandler.ashx",{PageIndex:pageindex},function(re){
if(re.split('|')[0]=="nomore")
{ alert("没有更多结果了");}
else
{$(".zx2-kjwz ul li").not(":first").not(":last").remove();
var lis=re.split('|')[0];
var count=re.split('|')[1];

$(".zx2-kjwz ul li:first").after($(lis).fadeIn("slow"));
$("#PageCount").val(count);
var pageIndex=$("#PageIndex").val();
if(up=="1")
{
$("#PageIndex").val(pageindex);
}
else
{
$("#PageIndex").val(pageindex);}
}

});
}

var i=2;
$(function(){
var fist=$(".lb_mm26:last");
fist.show();

var interval;

//$(".lb_bq ul li").mouseover(function(){
//scroll(this);
//});
//$(".lb_bq26 ul li").not(":last").mouseover(function(){
//scroll(this);
//});
$(".lb_bq26 ul li").not(":last").click(function(){
scroll(this);
});
interval=setInterval(setIntervals,5000);
$(".lb_bq26 ul li").not(":last").mouseover(function(){
clearInterval(interval);

}).mouseout(function(){interval=setInterval("setIntervals()",5000);});
$(".lb-z26 .lb_mm26").mouseover(function(){
clearInterval(interval);

}).mouseout(function(){interval=setInterval("setIntervals()",5000);});;


 


})
function setIntervals()
{i--;
    if(i<0)
    i=2;
  $(".lb_bq26 ul li").eq(i).trigger("click");
  
}

function scroll(obj)
{
var indexs=$(".lb_bq26 ul li").index(obj);
i=indexs;
var divs=$(".lb_mm26");
var div=divs.eq(indexs);
var divothers=$(".lb_mm26").not(obj);
divothers.hide();
div.fadeIn(2000);
var otherlis=$(obj).siblings("li");
$(obj).addClass("lbon26").siblings("li").removeClass("lbon26");
}

function scrolls(obj)
{
var indexs=$(".lb_bq ul li").index(obj);

var divs=$(".lb_mm");
var div=divs.eq(indexs);
var divothers=$(".lb_mm").not(obj);
divothers.hide();
div.show();

$(obj).addClass("lbon26").siblings("li").removeClass("lbon26");
}
//by cyc end