	/// when this is true, it means the string contains a potential EXE file (bad!)
function testExe(val) {
	var badEnding = /\.exe\b/i; // we might want to check against ".exe" other than just at the end of the string
	return badEnding.test(val);
}

	/// when this is _true_, it means the short description has a terminal period (good!)
function testShortDescr(val) {
	var goodDescr = /\.\s*$/; // require a period at the end of the string (upto whitespace)
	return (val == "" || goodDescr.test(val));
}

function warnExe(field) {
	if (testExe(field.value)) {
		alert("This appears to point to a Windows executable, and MacUpdate does not accept Windows software");
	}
}

function warnShortDescr(field) {
	if (!testShortDescr(field.value)) {
		alert("Short descriptions should end with a period.");
			// add missing period to end
		field.value += "."; // this doesn't check for interveting whitespace...
	}
}