﻿function showLi(n){
	var oli = document.getElementById("por_index").getElementsByTagName("li");
	for(var i=0; i< oli.length; i++){
		oli[i].className = "";
		document.getElementById("pro_"+i).className="none";
	}
	oli[n].className = "pkinds_01";
    document.getElementById("pro_"+n).className="block";
}
//案例详情选项卡
function ShowCaseViewTab(n){
	for(var i=0; i< 4; i++){
		document.getElementById("CaseViewTabItem"+i).className="none";
		document.getElementById("ShowCaseViewTitle"+i).className="";
	}
    document.getElementById("CaseViewTabItem"+n).className="block";
       document.getElementById("ShowCaseViewTitle"+n).className="now";
}
//设置4个月份 案例
/*function SetFourCaseItem(n,month,length){
	for(var i=0; i< length; i++){
		document.getElementById("web_listItem"+i).className="none";
		document.getElementById("web_listTitleItem"+i).className="";
	}
    document.getElementById("web_listItem"+n).className="web_list";
    document.getElementById("web_listTitleItem"+n).className="now";
    if($("#web_listItem"+n).html().length==0||$("#web_listItem"+n).html().length==13){
        $.ajax({
         type: "POST",
         url: "/MyWebHander/GetFourCaseItem.ashx",
         data:"yearMonth="+month,
         beforeSend:function(){
           $("#web_listItem"+n).append("<div id='loadingImg'><img src='/images/loading.gif'/>加载中...</div>");
         },
         complete:function(){
               $("#loadingImg").remove();
         },
         success: function(msg){
          $("#web_listItem"+n).append(msg);
          },
          error:function(a,b,c){
            $("#web_listItem"+n).append("<div>网络错误!<a href='javascript:void(0);' style='color:red;' onclick='SetFourCaseItem("+n+","+month+");'><b>重新加载</b></a></div>");
          }
        });
    }
}*/

 
 function SetFourCaseItem(n,month,classname,length){
	for(var i=0; i< length; i++){
		document.getElementById("web_listItem"+i).className="none";
		document.getElementById("web_listTitleItem"+i).className="";
	}
    document.getElementById("web_listItem"+n).className="web_list";
    document.getElementById("web_listTitleItem"+n).className="now";
    if($("#web_listItem"+n).html().length==0||$("#web_listItem"+n).html().length==13){
        $.ajax({
         type: "POST",
         url: "/MyWebHander/GetFourCaseItem.ashx",
         data:"codeNo="+month+"&classname="+classname,
         beforeSend:function(){
           $("#web_listItem"+n).append("<div id='loadingImg'><img src='/images/loading.gif'/>加载中...</div>");
         },
         complete:function(){
               $("#loadingImg").remove();
         },
         success: function(msg){
          $("#web_listItem"+n).append(msg);
          },
          error:function(a,b,c){
            $("#web_listItem"+n).append("<div>网络错误!<a href='javascript:void(0);' style='color:red;' onclick='SetFourCaseItem("+n+","+month+");'><b>重新加载</b></a></div>");
          }
        });
    }
}
