		var d = document;
		var bar = "_________________________________________________";
		var str = "I encountered the following errors:\n";
		var string = bar+"\n\n"+str;
		function warn(warning, run) {
			if (run == 1) { if (warning != "") { string += "    - " + warning + "\n"; }
			string += bar;
			alert(string);
			string = bar+"\n\n"+str;
			} else { string += "    - " + warning + "\n"; }
		}
		
		function checkData() {
			var error = 0;
			var numeric = /^\d+$/g;
			var decimal = /^\d+\.\d+$/g;
			var email = /^.+@.+\..+$/g;
			for (var i = 0; i < required.length; i++) {
			    var check = 0;
				var field = required[i][0];
				var type = required[i][2];
			    var name = (required[i][1])?required[i][1]:field;
			    var value = d.fm[required[i][0]].value;
				    if (type == 0 && value == "") {
				       check++; warn("You left the " + name + " field blank.", 0);
				    } else if (type == 1 && value.search(numeric) == -1) {
				       check++; warn("Sorry, but the " + name + " field can only contain numeric characters.", 0);
				    } else if (type == 2 && (d.fm[field].selectedIndex == -1 || d.fm[field].selectedIndex == 0)) {
				       check++; warn("Please make a valid selection from the " + name + " Drop-down menu.", 0);
				    } else if (type == 3 && value.search(email) == -1) {
				       check++; warn("Please define a valid email address", 0);
				    }
					if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) >= 4) {
				       if (check > 0) { error++; d.fm[required[i][0]].style.backgroundColor = "ffe6e6"; }
				       else { d.fm[required[i][0]].style.backgroundColor = ""; }
					} else {
					   if (check > 0) { error++; }
					}
			}
			if (error == 0) { return true; }
			else { warn("", 1); return false; } 
		}
