// JavaScript Document
function checkform() {
	var objForm = document.forms["comments_form"];
	if (objForm.SeminarTitle.value == "" ) {
		alert( "You must enter a title for the seminar" );
		objForm.SeminarTitle.focus();
		return false;
	}
	if (objForm.TimetableTitle.value == "" ) {
		alert( "You must enter an abbreviated title for timetable" );
		objForm.TimetableTitle.focus();
		return false;
	}
	if (objForm.SeminarDescription.value == "" ) {
		alert( "You must enter a description of the seminar" );
		objForm.SeminarDescription.focus();
		return false;
	}
	if (objForm.Days.value == "" ) {
		alert( "You must select a preferred meeting day(s)" );
		objForm.Days.focus();
		return false;
	}
	if (objForm.time.value == "" ) {
		alert( "You must select a timeslot to meet" );
		objForm.time.focus();
		return false;
	}
}

function checkprofform() {
	var objForm = document.forms["comments_form"];
	if (objForm.FirstName.value == "" ) {
		alert( "You must enter a first name" );
		objForm.FirstName.focus();
		return false;
	}
	if (objForm.LastName.value == "" ) {
		alert( "You must enter a last name" );
		objForm.LastName.focus();
		return false;
	}
	if (objForm.College.value == "" ) {
		alert( "You must select a college" );
		objForm.College.focus();
		return false;
	}
	if (objForm.Department.value == "" ) {
		alert( "You must enter a department" );
		objForm.Department.focus();
		return false;
	}
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(objForm.email.value)){
		} else {
		alert("The email address does not appear to be valid.");
		objForm.email.focus();
		return false;
		}
	if (objForm.FacultyBiography.value == "" ) {
		alert( "You must enter a brief biography" );
		objForm.FacultyBiography.focus();
		return false;
	}
}
function toggle2(chk){
   document.getElementById("rftw-form").style.display=(chk.checked)?"block":"none";
   /*document.getElementById("tennessee").style.display=(chk.checked)?"none":"block";*/
}
	function populate(o)
		{
			d=document.getElementById('time');
			if(!d){return;}			
			var mitems=new Array();
			mitems['1']=['8:00 - 8:50','9:05 - 9:55','10:10 - 11:00','11:15 - 12:05','12:20 - 1:10','1:25 - 2:15','2:30 - 3:20','2:30 - 3:20','4:40 - 5:30','5:45 - 6:35','6:45 - 7:35','7:45 - 8:35','8:45 - 9:35','9:45 - 10:35'];
			mitems['3']=['8:00 - 8:50','9:05 - 9:55','10:10 - 11:00','11:15 - 12:05','12:20 - 1:10','1:25 - 2:15','2:30 - 3:20','2:30 - 3:20','4:40 - 5:30','5:45 - 6:35','6:45 - 7:35','7:45 - 8:35','8:45 - 9:35','9:45 - 10:35'];
			mitems['1']=['8:00 - 8:50','9:05 - 9:55','10:10 - 11:00','11:15 - 12:05','12:20 - 1:10','1:25 - 2:15','2:30 - 3:20','2:30 - 3:20','4:40 - 5:30','5:45 - 6:35','6:45 - 7:35','7:45 - 8:35','8:45 - 9:35','9:45 - 10:35'];
			mitems['1']=['8:00 - 8:50','9:05 - 9:55','10:10 - 11:00','11:15 - 12:05','12:20 - 1:10','1:25 - 2:15','2:30 - 3:20','2:30 - 3:20','4:40 - 5:30','5:45 - 6:35','6:45 - 7:35','7:45 - 8:35','8:45 - 9:35','9:45 - 10:35'];
			mitems['1']=['8:00 - 8:50','9:05 - 9:55','10:10 - 11:00','11:15 - 12:05','12:20 - 1:10','1:25 - 2:15','2:30 - 3:20','2:30 - 3:20','4:40 - 5:30','5:45 - 6:35','6:45 - 7:35','7:45 - 8:35','8:45 - 9:35','9:45 - 10:35'];
			mitems['1']=['8:00 - 8:50','9:05 - 9:55','10:10 - 11:00','11:15 - 12:05','12:20 - 1:10','1:25 - 2:15','2:30 - 3:20','2:30 - 3:20','4:40 - 5:30','5:45 - 6:35','6:45 - 7:35','7:45 - 8:35','8:45 - 9:35','9:45 - 10:35'];
			mitems['T']=['8:10 - 9:25','9:40 - 10:55','11:10 - 12:25','12:40 - 1:55','2:10 - 3:25','3:40 - 4:55','5:05 - 6:20','6:30 - 7:45','7:55 - 9:10','9:20 - 10:35'];
			d.options.length=0;
			cur=mitems[o.options[o.selectedIndex].value];
			if(!cur){return;}
			d.options.length=cur.length;
			for(var i=0;i<cur.length;i++)
			{
				d.options[i].text=cur[i];
				d.options[i].value=cur[i];
			}
		}
