// Javascript used to handle changing the spinner image
var currGroup = '';
var currSpinner = '';
function spinnerOpen(groupID, spinnerID) {
    var newGroup = document.getElementById(groupID);
    if(currGroup == newGroup) {
	if(currGroup.style.display == 'none') {
        	currGroup.style.display = 'block';
		currSpinner.src='img/spinner_open.gif';
        } else {
		currGroup.style.display = 'none';
		currSpinner.src='img/spinner_closed.gif';
        }
	return;
    }
    if(currGroup != '') {
	currGroup.style.display = 'none';
	currSpinner.src='img/spinner_closed.gif';
    }
    currGroup = newGroup;
    currSpinner = document.getElementById(spinnerID);
    currGroup.style.display = 'block';
    currSpinner.src='img/spinner_open.gif';
}