// Function allows you to pass both term and termid
function SetHiddenInputs() {
	document.tmpform.TermsIndex.value = document.tmpform.TermsID.selectedIndex
	document.tmpform.TermsName.value = document.tmpform.TermsID.value        
}

// Function redirects user base on what button he/she selected
function SetFormAction(act_no) {
    if (act_no == 1)
        document.tmpform.action = "/schedules/MMDaySel.asp?" // By Days
    else if (act_no == 2)
        document.tmpform.action = "/schedules/MMTimeSched.asp?" // By Times
    else if (act_no == 3)
        document.tmpform.action = "http://www20.kellogg.northwestern.edu/dpco/catalog.asp" // By Department
}

// This is a convenience function.
function SetAll(act_no) {
    SetHiddenInputs()
    SetFormAction(act_no)
}
