
    	function doWhat(act,opr,id){    	
    		if(opr=='view')
    			window.open(act+".do?method="+opr+"&id="+id,"_blank","localtion=no");
    		else	
    			window.location.href = act+".do?method="+opr+"&id="+id+"&value=2";

    	}
    	
    	function view(act,id){
    			if(act!='file')
    				act='article'; 	
    			window.open(act+".do?method=viewOne&id="+id,"_blank","localtion=no");
    	}
    	function more(act,param){
    	 		if(act!='file')
    				act='article'; 
    			window.open(act+".do?method=viewMore&"+param,"_blank","localtion=no");
    	}
		function turnTo(act,param){  
				if(act!='file')
    				act='article';   	
    			window.location.href =act+".do?method=viewMore&"+param;
    	}

		 function show(sid,id,value)
		 {
		   var obj=document.getElementById(sid);
		   
		   var obj1=document.getElementById("hid_id");
		   var obj2=document.getElementById("hid_value");	   
		   var obj3=document.getElementById("hid_id2");
		   var obj4=document.getElementById("hid_value2");
		   obj1.value=id;
		   obj2.value=value;
		   obj3.value=id;
		   obj4.value=value;		   		   
		   if(obj.style.display=="none"||obj.style.display=="")
		      obj.style.display="block";
		 }	 
		 function hide(sid)
		 {
		    var obj=document.getElementById(sid);
		   if(obj.style.display=="block")
		    obj.style.display="none";
		 }
		 
		 var setValue= 0;
		 
		 function bathDeal(){ 			
	 			 			
				 var tableForm=document.getElementById('ec');
	 			 
	 			 var yxj = 	document.getElementById('yxjId'); 			
	 			 tableForm.ec_totalpages.value = yxj.value;	
	 			  
	 			 var reason=document.getElementById('reasonID');
	 			 tableForm.ec_totalrows.value = reason.value;
	 			  			 
	 			 tableForm.action += '?setValue='+setValue;	 			 
	 			 tableForm.method.value='setBath';
	 			 tableForm.submit();
	 			
 		}
 		
 	 function hasSelectCheckBox(){
 		
 		var checkedBoxs = document.getElementsByName('ids');
 			
 		for(var i=0;i<checkedBoxs.length;i++){
 				if(checkedBoxs[i].checked == true)
 				return true;
 		}
 		alert("请选择要处理的记录！");
 		return false;
 			
 	}
 		
 		
 		 function deleteAll(){ 			
	 		if(hasSelectCheckBox()==true){	 
	 			 if(confirm('确定删除所有选中吗？')){ 				
	 			 var tableForm=document.getElementById('ec'); 			 
	 			 tableForm.method.value='deleteAll';
	 			 //alert(tableForm.action+tableForm.method.value);
	 			 tableForm.submit();
	 			}
	 		}
 		}
 				
 		function showBat(id,option){
 				
 			if(hasSelectCheckBox()==true){	
	 			if(confirm('确定处理所有选中吗？')){ 	
	 				 setValue = option;
	 				 if(option==2)
	 				 	bathDeal();
	 				 else{
	 				 var obj=document.getElementById(id);
		 			 if(obj.style.display=="none"||obj.style.display=="")
		 			 //alert(obj.style.display);
			      	 obj.style.display="block";
			      	 }
			    }
		    }
 		}		