/*clearDiv
 * Written by Mike McNeil
 * July 1st, 2009
 * University of Texas at Austin
 * 
 * Run the script onLoad: <body onLoad="clearDiv();"> to
 * set up a page of collapsable menus and submenus.
 */

function clearDiv() {
	var i;
	var mydivs = new Array();
	var mydivssub = new Array();
	
	//Global variable
	window.opendoors = 0;	//this will count # of open questions
	
	//list all submenus here
	//note: all submenus must be enumerated in html
	//or the script will not run
	mydivssub[0] = 'toShow10';
	//ect.
	
	
	//step through and collapse submenus
	for (i=0;i<mydivssub.length;i++) {
		(document.getElementById(mydivssub[i])).style.display = "none";
	}

	//list all menus here
	mydivs[0] = 'toShow0';
	mydivs[1] = 'toShow1';
	mydivs[2] = 'toShow2';
	mydivs[3] = 'toShow3';
	mydivs[4] = 'toShow4';
	mydivs[5] = 'toShow5';
	mydivs[6] = 'toShow6';
	//ect.
	
	for (i=0;i<mydivs.length;i++) {
		(document.getElementById(mydivs[i])).style.display = "none";
	}


}