function admin_validateForm()
{
	//extract the filename for the filepath
	var fileName = document.getElementById("fileName").value;
	fileName = fileName.substr(fileName.lastIndexOf("\\") + 1);
	if (fileName == "")
	{
		alert("User Error:  Please select a file before pressing 'Upload'");
		return false;
	}
	
	//extract the extension from the filename
	var fileExtension = fileName.substr(fileName.lastIndexOf(".") + 1);
	if (fileExtension != "xls" && fileExtension != "doc" && fileExtension != "pdf" && fileExtension != "gif"
		&& fileExtension != "jpg" && fileExtension != "ppt")
	{
		alert("User Error:  Only the following types of files are allowed to be uploaded:\n" + 
			"\n.doc \n.gif \n.jpg \n.pdf \n.xls \n.ppt ");
		return false;
	}

	//CALENDAR file validations (CALENDAR-YYYY_MM.jpg)
	if (fileName.substring(0, 8) == "CALENDAR" && (fileExtension != "jpg" || fileName.length != 20 
		|| fileName.indexOf("-") != 8 || fileName.indexOf("_") != 13))
	{
		alert("User Error:  The file name for CALENDAR images must be in the following format: CALENDAR-YYYY_MM.jpg");
		return false;
	}
	
	//CONTROL file validations (CONTROL-[name].xls)
	if (fileName.substring(0, 7) == "CONTROL" && 
		(fileName != "CONTROL-announcement.xls" && 
		 fileName != "CONTROL-coach.xls" &&
		 fileName != "CONTROL-hof.xls" &&
		 fileName != "CONTROL-link.xls" &&
		 fileName != "CONTROL-player.xls" &&
		 fileName != "CONTROL-game.xls"))
	{
		alert("User Error:  Only the following CONTROL files are allowed to be uploaded:\n" + 
			"\nCONTROL-announcement.xls \nCONTROL-coach.xls \nCONTROL-hof.xls \nCONTROL-link.xls " + 
			"\nCONTROL-player.xls \nCONTROL-VarsityJVGameSchedule.xls");
		return false;
	}	
	return true;
}

function login_validateForm()
{
	//extract the filename for the filepath
	var userName = document.getElementById("userName").value;
	var password = document.getElementById("password").value;

	if (userName == "" || password == "")
	{
		alert("User Error:  Please enter a User Name and Password before pressing 'Login'");
		return false;
	}

	return true;
}