function selectSchool(sSID)
{
	window.open("bb_school.jsp?sid=" + sSID,"_self");
}
function getSelectedClassParam()
{
	if (selector.cidp.checked) return selector.cidp.value;
	else
	{
		var nIndex = 0;
		while (selector.cidp[nIndex])
		{
			if (selector.cidp[nIndex].checked == true)
			{
				return selector.cidp[nIndex].value;
			}
			nIndex++;
		}
	}
	return "";
}
function selectClass(sCID)
{
	window.open("bb_school.jsp?sid=" + sSchoolID + "&cid=" + sCID,"_self");
}
function reuseClass()
{
	var sSelectedClassParam = getSelectedClassParam();
	if (sSelectedClassParam == "")
	{
		alert("Please select a class before clicking Use Selected Resource.");
		return;
	}
	if (sUserID == "")	window.open("teacherlogindlg.jsp","login","height=500px; width=240px; edge: Raised; center: Yes; help: Yes; resizable: Yes; status: No;");
	else window.open("verifylogin.jsp?dest=copyfrontend.jsp&bb=school&" + sSelectedClassParam,"_self");
}
function showHelp(sLesson)
{
	window.open('shareresource_help.html#' + sLesson,'help','width=400,scrollbars=yes').focus()
}
function successfulLogin(s1,s2)
{
	window.open("reuseclass.jsp?" + getSelectedClassParam(),"_self");
}
function selectBrowseMethod(sMethod)
{
	if (sMethod == "course") window.open("bb_course.jsp","_self");
	else if (sMethod == "school") window.open("bb_school.jsp","_self");
	else if (sMethod == "dlib") window.open("bb_dlib.jsp","_self");
}

