var base = "grouping";
var number_of_groupings = 2;
var curr = Math.floor(Math.random()*number_of_groupings);

function changeGroupings() {
	var next = curr + 1;
	
	if (next >= number_of_groupings) {
		next = 0;
	}

	for(x=0;x<number_of_groupings;x++) {
		document.getElementById(base + x).style.display="none";
	}
	
	document.getElementById(base + next).style.display= "";
	
	curr = next;

}