﻿var current=1;
function getID(id){
    return window.document.getElementById?window.document.getElementById(id):null;
}

function fn_showcrusher(tid){
    for(var i=1;i<=5;i++){
        getID("b"+i).className = "chanpin";
        getID("c"+i).style.display = "none";    
    }
    getID(tid).className = "chanpin1";
    getID(tid.replace("b","c")).style.display = "";
}
function show_crusher(){
	current=current%5;	
	current++;
	
	for(var i=1;i<=5;i++){
        getID("b"+i).className = "chanpin";
        getID("c"+i).style.display = "none";    
    }
    getID("b"+current).className = "chanpin1";
    getID("c"+current).style.display = "";
}	
function show_crusher_del(){
	
	current=current%5;
	current=current-1;
	if(current<=0){
		current=current+5;
	}
	for(var i=1;i<=5;i++){
        getID("b"+i).className = "chanpin";
        getID("c"+i).style.display = "none";    
    }
    getID("b"+current).className = "chanpin1";
    getID("c"+current).style.display = "";
}
function fn_showmill(tid){
    for(var i=1;i<=4;i++){
        getID("d"+i).className = "chanpin";
        getID("m"+i).style.display = "none";    
    }
    getID(tid).className = "chanpin1";
    getID(tid.replace("d","m")).style.display = "";
}
function show_mill(){
	current=current%4;	
	current++;
	
	for(var i=1;i<=4;i++){
        getID("d"+i).className = "chanpin";
        getID("m"+i).style.display = "none";    
    }
    getID("d"+current).className = "chanpin1";
    getID("m"+current).style.display = "";
}	
function show_mill_del(){
	
	current=current%4;
	current=current-1;
	if(current<=0){
		current=current+4;
	}
	for(var i=1;i<=4;i++){
        getID("d"+i).className = "chanpin";
        getID("m"+i).style.display = "none";    
    }
    getID("d"+current).className = "chanpin1";
    getID("m"+current).style.display = "";
}
function fn_showoptional(tid){
    for(var i=1;i<=3;i++){
        getID("e"+i).className = "chanpin";
        getID("o"+i).style.display = "none";    
    }
    getID(tid).className = "chanpin1";
    getID(tid.replace("e","o")).style.display = "";
}
function show_optional(){
	current=current%3;	
	current++;
	
	for(var i=1;i<=3;i++){
        getID("e"+i).className = "chanpin";
        getID("o"+i).style.display = "none";    
    }
    getID("e"+current).className = "chanpin1";
    getID("o"+current).style.display = "";
}	
function show_optional_del(){
	
	current=current%3;
	current=current-1;
	if(current<=0){
		current=current+3;
	}
	for(var i=1;i<=3;i++){
        getID("e"+i).className = "chanpin";
        getID("o"+i).style.display = "none";    
    }
    getID("e"+current).className = "chanpin1";
    getID("o"+current).style.display = "";
}
function banner_showTable(tid){
    for(var i=1;i<=2;i++){
		getID("p"+i).className = "banner_m";
        getID("banner"+i).style.display = "none";    
    }
	getID(tid).className = "banner_a";
    getID(tid.replace("p","banner")).style.display = "";
}
function fn_showpro(tid){
    for(var i=1;i<=4;i++){
        getID("list"+i).className = "";
        getID("pro"+i).style.display = "none";    
    }
    getID(tid).className = "active";
    getID(tid.replace("list","pro")).style.display = "";
}
