<!--
function form_validator(theform)
{
var alertsay = "";
if (theform.txtMessageID.selectedIndex <= 0)
{
alert("Please select a year.");
theform.txtMessageID.focus();
return (false);
}
// check to see if the field is blank
if (theform.pound.value == "")
{
alert("You must enter a value for pound.");
theform.pound.focus();
return (false);
}
// check to see if the field is blank
if (theform.shilling.value == "")
{
alert("You must enter a value for shilling.");
theform.shilling.focus();
return (false);
}
// check to see if the field is blank
if (theform.pence.value == "")
{
alert("You must enter a value for pence.");
theform.pence.focus();
return (false);
}
// only allow numbers to be entered
var checkOK = "0123456789";
var checkStr = theform.pound.value;
var allValid = true;
var allNum = "";
for (i = 0;  i < checkStr.length;  i++)
{
ch = checkStr.charAt(i);
for (j = 0;  j < checkOK.length;  j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
if (ch != ",")
allNum += ch;
}
if (!allValid)
{
alert("Please enter a number in the \"pound\" field.");
theform.pound.focus();
return (false);
}
// require a minimum of 9 and a maximum of 999999999999999
var chkVal = allNum;
var prsVal = parseInt(allNum);
if (chkVal != "" && !(prsVal >= "0" && prsVal <= "999999999999999"))
{
	alertsay = "Please enter a value greater than or "
	alertsay = alertsay + "equal to \"0\" and less than or "
	alertsay = alertsay + "equal to \"999999999999999\" in the \"NumberText\" field."
alert(alertsay);
theform.pound.focus();
return (false);
}
// only allow numbers to be entered
var checkOK = "0123456789";
var checkStr = theform.shilling.value;
var allValid = true;
var allNum = "";
for (i = 0;  i < checkStr.length;  i++)
{
ch = checkStr.charAt(i);
for (j = 0;  j < checkOK.length;  j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
if (ch != ",")
allNum += ch;
}
if (!allValid)
{
alert("Please enter only whole numbers in the \"shilling\" field.");
theform.shilling.focus();
return (false);
}
// require a minimum of 0 and a maximum of 19
var chkVal = allNum;
var prsVal = parseInt(allNum);
if (chkVal != "" && !(prsVal >= "0" && prsVal <= "19"))
{
	alertsay = "Please enter a value greater than or "
	alertsay = alertsay + "equal to \"0\" and less than or "
	alertsay = alertsay + "equal to \"19\" in the \"shillings\" field."
alert(alertsay);
theform.shilling.focus();
return (false);
}
// only allow numbers to be entered
var checkOK = "0123456789.";
var checkStr = theform.pence.value;
var allValid = true;
var allNum = "";
for (i = 0;  i < checkStr.length;  i++)
{
ch = checkStr.charAt(i);
for (j = 0;  j < checkOK.length;  j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
if (ch != ",")
allNum += ch;
}
if (!allValid)
{
alert("Please enter a number in the \"oldpence\" field.");
theform.pence.focus();
return (false);
}
// require a minimum of 0 and a maximum of 11.99
var chkVal = allNum;
var prsVal = parseInt(allNum);
if (chkVal != "" && !(prsVal >= "0" && prsVal <= "11.99"))
{
	alertsay = "Please enter a value greater than or "
	alertsay = alertsay + "equal to \"0\" and less than or "
	alertsay = alertsay + "equal to \"11.99\" in the \"old pence\" field."
alert(alertsay);
theform.pence.focus();
return (false);
}
return (true);
}
//-->