function b2b_switch(direction) {
	current = current + direction;
	if(current>b2b_amount) current = 1;
	else if(current<1) current = b2b_amount;
	
	for(i=1; i <= b2b_amount; i++) {
		obj = document.getElementById('b2b_'+i);
		obj.setAttribute("class", (i==current) ? "" : "b2b_hidden");
		obj.setAttribute("className", (i==current) ? "" : "b2b_hidden");  // voor Internet Explorer
	}
}


var b2b_amount=0;
// Count them. 
greycells = document.getElementsByTagName('td');

for(var i=0; i<greycells.length; i++) {
	if(greycells[i].getAttribute('class') == 'ContentCellGrey' || greycells[i].getAttribute('className') == 'ContentCellGrey') {
		var tables = greycells[i].getElementsByTagName('table');
		for(var j=0; j<tables.length; j++) {
			if(tables[j].getAttribute('id') && tables[j].getAttribute('id').substr(0,4) == 'b2b_') {
				b2b_amount++;
			}
		}
	}
}

current = Math.ceil(Math.random() * b2b_amount);
b2b_switch(0);