//  Date Created: 05/11/2001
//  Last Updated: 06/11/2002
//  Created by Barbara Gulten
//  Email: bgulten@gr.com

function Editform(feedbackForm) 
{

var ValidCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ- ";
var ValidLoginCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
var ValidNumbers = "0123456789";

// Clear the alert message from the last iteration (if applicable)
AlertMsg = "";
FocusSet = 0;

// Message Check 
if ((feedbackForm.comment.value.length) < 1) {
  AlertMsg = AlertMsg + "\n" + "- Feedback Message cannot be empty. Please type in your comment or question.";
}


// Email Format Check 
if (feedbackForm.email.value > "") {
  Location1 = feedbackForm.email.value.indexOf('@');
  Location2 = feedbackForm.email.value.indexOf('.', Location1);
  if (Location1 == -1 || Location2 == -1) {
    AlertMsg = AlertMsg + "\n- Please enter an E-mail address in the format 'name@wisconsin.gov'";
	if (FocusSet == 0) {
      feedbackForm.email.focus();
      feedbackForm.email.select();
      FocusSet = 1;
	}
  }
// Email Spaces Check 
//if (feedbackForm.email.value.indexOf (' ') > -1) {
 // AlertMsg = AlertMsg + "\n- E-mail address cannot contain spaces.";
 // if (FocusSet == 0) {
 //   feedbackForm.email.focus();
 //   feedbackForm.email.select();
 //  FocusSet = 1;
 // } 
//} 
//} else {
 // AlertMsg = AlertMsg + "\n" + "- Please enter an E-Mail address.";
  //  if (FocusSet == 0) {
  //    feedbackForm.email.focus();
  //    feedbackForm.email.select();
  //    FocusSet = 1;
	//} 
}  

	var inputText = feedbackForm.pwinput.value;
	if (inputText < 1 || inputText == 'null') {
		AlertMsg = AlertMsg + "\n" + "- Please enter Verfication Text."; 
	} else if (inputText != feedbackForm.frmunique_id.value) {
		AlertMsg = AlertMsg + "\n" + "- Verfication Text is not correct."; 
	}

// If we don't have a message to display(no errors), submit the form..
if (AlertMsg == ""){

} 
else {
  alert(AlertMsg);
  return false;
  }
}






 

