/////////////////////////////////////
// Waiting list confirm dialog box //
// Used in:  class2.jsp            //
/////////////////////////////////////

function goRegister()
{
	if(confirm("This class is currently full.  If you register, you will be placed on a waiting list.\nDo you wish to be placed on the waiting list?"))
		document.getElementById('frmSignUp').submit();
}

/////////////////////////////////////
// Display results pane for search //
// Used in: search.jsp             //
/////////////////////////////////////

function ShowResults()
{
	document.getElementById("resultspane").style.display = "";
}

////////////////////////////////////////////////////
// Return the page to wherever it was linked from //
// Used in: admin/editindiv.jsp                   //
////////////////////////////////////////////////////

function Update()
{
	var page_from = location.search;
	page_from = page_from.slice(6, page_from.length);

	window.location = "manage" + page_from + ".jsp";
}

//////////////////////////////////////////////////
// Determine whether to load add or edit form   //
// Used in: admin/class.jsp, admin/program.jsp, //
//          admin/programgroup.jsp              //
//////////////////////////////////////////////////

function dispMngForm(obj)
{
	var page_disp = location.search;
	page_disp = page_disp.slice(6, page_disp.length);

	if(page_disp == "add")
		document.getElementById("add"+ obj).style.display = "block";
	if(page_disp == "edit")
		document.getElementById("edit" + obj).style.display = "block";
}