function formValidator(TutorTimeLogForm)
{
	var frommonth          = document.TutorTimeLogForm.FromMonth;
	var fromday            = document.TutorTimeLogForm.FromDay;
	var fromyear           = document.TutorTimeLogForm.FromYear;	
	var tomonth            = document.TutorTimeLogForm.ToMonth;
	var today              = document.TutorTimeLogForm.ToDay;
	var toyear             = document.TutorTimeLogForm.ToYear;	
    var name               = document.TutorTimeLogForm.TutorName;
    var preparationhours   = document.TutorTimeLogForm.PreparationHours;
    var lessonhours        = document.TutorTimeLogForm.LessonHours;
    var miscellaneoushours = document.TutorTimeLogForm.MiscellaneousHours;
    var workshophours      = document.TutorTimeLogForm.WorkshopHours;
 
 
    if (frommonth.value == "")
    {
        window.alert("Please enter the month for the start of the period.");
        frommonth.focus();
        return false;
    }
    
    if (fromday.value == "")
    {
        window.alert("Please enter the day for the start of the period.");
        fromday.focus();
        return false;
    }
    
    if (fromyear.value == "")
    {
        window.alert("Please enter the year for the start of the period.");
        fromyear.focus();
        return false;
    }
    
    if (tomonth.value == "")
    {
        window.alert("Please enter the month for the end of the period.");
        tomonth.focus();
        return false;
    }
    
    if (today.value == "")
    {
        window.alert("Please enter the day for the end of the period.");
        today.focus();
        return false;
    }
    
    if (toyear.value == "")
    {
        window.alert("Please enter the year for the end of the period.");
        toyear.focus();
        return false;
    }
   
    if (name.value == "")
    {
        window.alert("Please enter your name.");
        name.focus();
        return false;
    }
     
	var checkOK = "0123456789";
	var checkStr = preparationhours.value;
	var allValid = true;
	var validGroups = true;
	for (i = 0;  i < checkStr.length;  i++)
  	{
    	ch = checkStr.charAt(i);
    	for (j = 0;  j < checkOK.length;  j++)
      		if (ch == checkOK.charAt(j))
        	break;
    	if (j == checkOK.length)
    	{
      		allValid = false;
      		break;
    	}
  	}
 	if (!allValid)
	{
	    alert("Please enter only the digits 0 through 9 for your preparation hours.");
	    preparationhours.focus();
	    return false;
	}
     
	var checkOK = "0123456789";
	var checkStr = lessonhours.value;
	var allValid = true;
	var validGroups = true;
	for (i = 0;  i < checkStr.length;  i++)
  	{
    	ch = checkStr.charAt(i);
    	for (j = 0;  j < checkOK.length;  j++)
      		if (ch == checkOK.charAt(j))
        	break;
    	if (j == checkOK.length)
    	{
      		allValid = false;
      		break;
    	}
  	}
 	if (!allValid)
	{
	    alert("Please enter only the digits 0 through 9 for your lesson hours.");
	    lessonhours.focus();
	    return false;
	}
     
	var checkOK = "0123456789";
	var checkStr = miscellaneoushours.value;
	var allValid = true;
	var validGroups = true;
	for (i = 0;  i < checkStr.length;  i++)
  	{
    	ch = checkStr.charAt(i);
    	for (j = 0;  j < checkOK.length;  j++)
      		if (ch == checkOK.charAt(j))
        	break;
    	if (j == checkOK.length)
    	{
      		allValid = false;
      		break;
    	}
  	}
 	if (!allValid)
	{
	    alert("Please enter only the digits 0 through 9 for your miscellaneous hours.");
	    miscellaneoushours.focus();
	    return false;
	}
     
	var checkOK = "0123456789";
	var checkStr = workshophours.value;
	var allValid = true;
	var validGroups = true;
	for (i = 0;  i < checkStr.length;  i++)
  	{
    	ch = checkStr.charAt(i);
    	for (j = 0;  j < checkOK.length;  j++)
      		if (ch == checkOK.charAt(j))
        	break;
    	if (j == checkOK.length)
    	{
      		allValid = false;
      		break;
    	}
  	}
 	if (!allValid)
	{
	    alert("Please enter only the digits 0 through 9 for your workshop hours.");
	    workshophours.focus();
	    return false;
	}
	
    return true;
}