function image_Validator(theForm)
{

  if (theForm.ImgTitle.value == "")
  {
    alert("Please enter an Image Title.");
    theForm.ImgTitle.focus();
    return (false);
  }

  if (theForm.ImgTitle.value.length > 20)
  {
    alert("Please enter at most 20 characters for Image Title.");
    theForm.ImgTitle.focus();
    return (false);
  }

  if (theForm.Author.value == "")
  {
    alert("Please enter Your Name.");
    theForm.Author.focus();
    return (false);
  }

  if (theForm.Author.value.length > 20)
  {
    alert("Please enter at most 20 characters for Your Name.");
    theForm.Author.focus();
    return (false);
  }

  if (theForm.authoremail.value == "")
  {
    alert("Please enter your Email Address in case of problems with your image.");
    theForm.authoremail.focus();
    return (false);
  }
  
  // test if valid email address, must have @ and .
  var checkEmail = "@.";
  var checkStr = theForm.authoremail.value;
  var EmailValid = false;
  var EmailAt = false;
  var EmailPeriod = false;
  for (i = 0;  i < checkStr.length;  i++)
  {
  ch = checkStr.charAt(i);
  for (j = 0;  j < checkEmail.length;  j++)
  {
  if (ch == checkEmail.charAt(j) && ch == "@")
  EmailAt = true;
  if (ch == checkEmail.charAt(j) && ch == ".")
  EmailPeriod = true;
	  if (EmailAt && EmailPeriod)
		break;
	  if (j == checkEmail.length)
		break;
	}
	// if both the @ and . were in the string
  if (EmailAt && EmailPeriod)
  {
		EmailValid = true
		break;
	}
  }
  if (!EmailValid)
  {
  alert("Please enter a valid email address.");
  theForm.authoremail.focus();
  return (false);
  }
  
  if (theForm.imageFileName.value == "")
  {
    alert("Please upload at least one image.");
    theForm.imageFileName.focus();
    return (false);
  }
  
  if (theForm.Description.value == "")
  {
    alert("If RV, motorhome or trailer, please include at least year, make and model in Comments.");
    theForm.Description.focus();
    return (false);
  }
  
  if (theForm.category.selectedIndex < 0)
  {
    alert("Please select a Category.");
    theForm.category.focus();
    return (false);
  }

  if (theForm.category.selectedIndex == 0)
  {
    alert("Select is not a valid Category option.");
    theForm.category.focus();
    return (false);
  }

  if (theForm.validate_imgsubmit.value == "")
  {
    alert("Please enter the validation code.");
    theForm.validate_imgsubmit.focus();
    return (false);
  }

  var chkVal = theForm.validate_imgsubmit.value;
  var prsVal = chkVal;
  if (chkVal != "" && !(prsVal == "RVNUT"))
  {
    alert("The validation code you entered is incorrect.");
    theForm.validate_imgsubmit.focus();
    return (false);
  }
  return (true);
}