// JavaScript Document

// Hier muss nichts verändert werden

var box_count 		= '0';
var box_count_max 	= '100';
var box_active 		= '1';
var show_number		= '0';


function show_box_number () {
	show_number = 1;
	show_box_number_text ();
}

function show_box_number_text () {
	if (box_count == 0) { count_box(); }
	document.all.box_count.innerText = box_active + '/' + box_count;
}

function count_box () {
	for (box_alive=1;box_alive<box_count_max;box_alive++){
		if (document.getElementById("rotation_cnt_" + box_alive)) { box_count++; }
	}
}

function box_next () {
	 if (box_count == 0) { count_box(); }
	 if (box_active >= box_count) { box_active = '0' }
	 go_to_box (parseInt(box_active) + 1);
}

function box_prev () {
	if (box_count == 0) { count_box(); }
	if (box_active == 1) { box_active = parseInt(box_count) + 1; }
	go_to_box (parseInt(box_active) - 1);
}

function go_to_box (box_load) {
	
	box_active = box_load;
	
	for (box_cnt = 1; box_cnt <= box_count; box_cnt++) {
		document.getElementById("rotation_cnt_" + box_cnt).className = 'box_nonactive'; }
	
	document.getElementById("rotation_cnt_" + box_load).className = 'bt_box_content';
	
	if (show_number == 1) { show_box_number_text (); }
	
}

/* var active_tab = '1';
var tabs_count = 0;
var tabs_count_max = 10;
var slider_count = 0;
var slider_count_max = 10;

function top_slider_go (tabnr_load) {
	if (tabs_count == 0) { count_tabs(); }
	if (slider_count == 0) { count_slider(); }
	
	var slnr_load = tabnr_load;
				
	for (tb_cnt = 1; tb_cnt <= tabs_count; tb_cnt++) {
		document.getElementById("tab" + tb_cnt).className = 'tab_nonactive'; }
		
	for (sl_cnt = 1; sl_cnt <= slider_count; sl_cnt++) {
		document.getElementById("sl"  + sl_cnt).className = 'sl_nonactive'; }
		
	if (tabnr_load > slider_count) { slnr_load = '1'; }
		
	document.getElementById("tab" + tabnr_load).className = 'tab_active';
	document.getElementById("sl"  + slnr_load).className = 'sl_active';
		
	active_tab = tabnr_load;
}
	
function top_slider_next () {
	if (tabs_count == 0) { count_tabs(); }
	if (active_tab >= tabs_count) {active_tab = '0'}
	top_slider_go (parseInt(active_tab) + 1);
}

function top_slider_prev () {
	if (tabs_count == 0) { count_tabs(); }
	if (active_tab == 1) { active_tab = parseInt(tabs_count) + 1; }
	top_slider_go (parseInt(active_tab) - 1);
}

function count_tabs () {
	for (tb_cnt_main=1;tb_cnt_main<tabs_count_max;tb_cnt_main++){
		if (document.getElementById("tab" + tb_cnt_main)) { tabs_count++; }
	}
}

function count_slider () {
	for (sl_cnt_main=1;sl_cnt_main<slider_count_max;sl_cnt_main++){
		if (document.getElementById("sl" + sl_cnt_main)) { slider_count++; }
	}
}
*/
