var currCategory = 0;

// Updates the drop down menu automatically
function changeDropDowns(n, selOption) {
	if (n == -1) n = 0;

  // set the category
	document.getElementById('category_' + n).value = '0';

  // deactivate the old dropdown
	var old_cat = document.getElementById('category_' + currCategory);
  old_cat.style.visibility = 'hidden';
  old_cat.disabled = true;

	// activate the new dropdown
  var new_cat = document.getElementById('category_' + n);
  new_cat.style.visibility = 'visible';
  new_cat.disabled = false;

	// set the selected option in the category drop down
	document.getElementById('category_' + n).selectedIndex = selOption;
	
	// set the current category
	currCategory = n;

	//alert("Cat " + currCategory);
	//alert("option:" + seloption);
}

