<!--


function sc_toggle(id) {

    var row = document.getElementById('subcats_' + id);
    var cat_row = document.getElementById('cat_' + id);

    if (row) {

		if (row.style.display == "none") {
			row.style.display = "";
			cat_row.style.backgroundImage = "url(images/minus_icon.gif)";			cookie_array_add('cat_expanded', id);
		} else {
			row.style.display = "none";
			cat_row.style.backgroundImage = "url(images/plus_icon.gif)";			cookie_array_remove('cat_expanded', id);
		}
	}
}	

/* See if we have any previously expanded cats
   and re-expand them.
 */
function expandCats() {
	current = cookie_array('cat_expanded');
	if (current) {
		for (i in current) {
			sc_toggle(current[i]);						
		}
	}
}		

window.onload = expandCats;

// -->
