

IE = document.all;
var redo = false;

function setup_fields(form) {
	with (form) {
		if (typeof(FirstName) == "object") {
		FirstName.xmin = 1;
		FirstName.maxLength = 25;
		FirstName.xlabel = "First Name";
		FirstName.onkeypress = hitReturn;
		FirstName.xvalidate = isString;
		FirstName.xerror = showError;
		FirstName.xerrmsg = "Your First Name is required.";
		}
		if (typeof(LastName) == "object") {
		LastName.xmin = 2;
		LastName.maxLength = 25;
		LastName.xlabel = "Last Name";
		LastName.onkeypress = hitReturn;
		LastName.xvalidate = isString;
		LastName.xerror = showError;
		LastName.xerrmsg = "Your Last Name is required.";
		}
		if (typeof(Email) == "object") {
		Email.xmin = 1;
		Email.maxLength = 50;
		Email.xlabel = "Email";
		Email.onkeypress = editEmail;
		Email.xvalidate = isEmail;
		Email.xerror = showError;
		Email.xerrmsg1 = "The Email Address you entered, \"";
		Email.xerrmsg2 = "\" is not formatted correctly.\nPlease re-enter your Email Address now using this format: name@somewhere.com.";
		}
		if (typeof(Email2) == "object") {
		Email2.xmin = 1;
		Email2.maxLength = 50;
		Email2.xlabel = "Email2";
		Email2.onkeypress = editEmail;
		Email2.xvalidate = isEmail2;
		Email2.xerror = showError;
		Email2.xerrmsg1 = "The Email Address you entered, \"";
		Email2.xerrmsg2 = "\" is not formatted correctly.\nPlease re-enter your Email Address to confirm.";
		}
		if (typeof(Address) == "object") {
		Address.xmin = 1;
		Address.maxLength = 50;
		Address.xlabel = "Address 1";
		Address.onkeypress = hitReturn;
		Address.xvalidate = isString;
		Address.xerror = showError;
		Address.xerrmsg = "Your Street Address is required.";
		}
		 
		if (typeof(City) == "object") {
		City.xmin = 3;
		City.maxLength = 30;
		City.xlabel = "City";
		City.onkeypress = hitReturn;
		City.xvalidate = isString;
		City.xerror = showError;
		City.xerrmsg = "Please make sure the City you entered is at least 3 characters.";
		}
		if (typeof(State) == "object") {
		State.xmin = 1;
		State.maxLength = 30;
		State.xlabel = "State";
		State.onkeypress = hitReturn;
		State.xvalidate = isString;
		State.xerror = showError;
		State.xerrmsg = "Please select your State/Province.";
		}
		if (typeof(Zip) == "object") {
		Zip.xmin = 5;
		Zip.xeditmax = 5;
		Zip.maxLength = 5;
		Zip.xlabel = "Zip";
		Zip.onkeypress = editPostal;
		Zip.xvalidate = isPostal;
		Zip.xerror = showError;
		Zip.xerrmsg = "Please make sure the Zip Code you entered is 5 digits long.";
		}
		/*if (typeof(Phone) == "object") {
		Phone.xmin = 10;
		Phone.xeditmax = 10;
		Phone.maxLength = 14;
		Phone.xlabel = "Phone";
		Phone.xvalidate = isString;
		Phone.xerror = showError;
		Phone.xerrmsg = "The Phone Number you entered is incomplete.  Please enter your full Phone Number -- including area code.";
		}*/
		if (typeof(Comments) == "object") {
		Comments.xmin = 1;
		Comments.maxLength = 50;
		Comments.xlabel = "Comments";
		Comments.xvalidate = isString;
		Comments.xerror = showError;
		Comments.xerrmsg = "Please write your comments";
		}
	}
		
return;
}
