﻿

  //设置栏目ID为3
  var funID = 1;
  //设置书籍类别父ID为60
  var parentID = 1;
  //父类名称
  var parentName = encodeURIComponent("首页");
  //文件路径
  var filePath = '../main'; 
    //标题长度
  var titleLength = 14;
  //类名长度
  var typeLength = 11;
  //作者长度
  var writeLength = 7;
  //查看方式
  var defaultXslPath = '../UI/ArticleList.xslt';
  var viewType = 1;

  //用户ID
  var userID = 0;
  //用户名称
  var userName = '';

  //当前页码
  var currentPage = 1;
  //当前ID
  var currentID = parentID;
  
   
 function PageSizeProperty(){
   //这里设置不同浏览方式的页尺寸,因为简单方式固定为8,所以为8
   return viewType==1?8:8;
 }
 
   //页尺寸
  var pageSize = PageSizeProperty();
  
  
 
   //切换浏览方式
  function turnViewType(type, userID){
   switch(type){
     case  "1":
         viewType = type;
         defaultXslPath = '../UI/ArticleList.xslt';
         refrsh(pageSize,currentPage, 'refrsh', 'pagination01', $H({'userID':userID, 'xsltPath':defaultXslPath, 'viewType':viewType}));
       break;
     case "2":
         viewType = type;
         defaultXslPath = '../UI/ArticleMetailList.xslt';
         refrsh(pageSize,currentPage, 'refrsh', 'pagination01', $H({'userID':userID, 'xsltPath':defaultXslPath, 'viewType':viewType}));
       break;
     case "3":
         viewType = type;
        defaultXslPath = '../UI/MostWriters.xslt';
         refrsh(pageSize,currentPage, 'refrsh', 'pagination01', $H({'userID':userID, 'xsltPath':defaultXslPath, 'viewType':viewType}));
       break;       
   }
 };  
  

 //跳转到明细页
function GoToDetail(magaID, typeID){
    //addHitCount(rootUrl,magaID);
    window.location = "../main/GotoDetail.aspx?method="+escape("detailPage")+"&&bookID="+escape(magaID)+"&typeID="+escape(typeID);
};    
    
    //跳转到作者作品页
    function GoToWriterDetail(userID, userName){
      window.open('WriterList.aspx?userID='+encodeURIComponent(userID)+'&userName='+encodeURIComponent(userName),"_blank");
    };    
    
   function GoPage(typeID){
           window.location = "../main/GotoDetail.aspx?method="+escape("typePage")+"&typeID="+escape(typeID);
  };
