<!--
function validate(frm) {
    var browserName = navigator.appName;
    var browserVer = parseInt(navigator.appVersion);
    if (browserName != "Netscape" || (browserName == "Netscape" && browserVer != 2)) {
	 if (frm.authority.value.length == 0){
            alert("Please enter the name of authority/company");
            frm.authority.focus();
            return false;
        }
	 if (frm.firstname.value.length == 0){
            alert("Please enter your first name");
            frm.firstname.focus();
            return false;
        }
	 if (frm.lastname.value.length == 0){
            alert("Please enter your last name");
            frm.lastname.focus();
            return false;
        }
	 if (frm.jobtitle.value.length == 0){
            alert("Please enter your Job Title");
            frm.jobtitle.focus();
            return false;
        }
	 if (frm.department.value.length == 0){
            alert("Please enter your Department");
            frm.department.focus();
            return false;
        }
	 if (frm.phone.value.length == 0){
            alert("Please enter your Phone Number");
            frm.phone.focus();
            return false;
        }							
	if (!check_email(frm.email.value)){
            alert("Please enter a valid email address!");
            frm.email.focus();
            return false;			
        }
	
 	if (frm.address1.value.length == 0){
            alert("Please enter your address");
            frm.address1.focus();
            return false;
        }
	if (frm.town.value.length == 0){
            alert("Please enter your town/city");
            frm.town.focus();
            return false;
        }
	if (frm.county.value.length == 0){
            alert("Please enter your county");
            frm.county.focus();
            return false;
        }
	if (frm.postcode.value.length == 0){
            alert("Please enter your postcode");
            frm.postcode.focus();
            return false;
        }				
   }
}
function check_email(e) {

	ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
	for(i=0; i < e.length ;i++){
		if(ok.indexOf(e.charAt(i))<0){ 
		return (false);
		}	
	} 

	if (document.images) {
		re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		if (!e.match(re) && e.match(re_two)) {
			return (-1);		
		} 
	}
}

<!-- Begin numeric test
function checkNumeric(objName,minval, maxval,comma,period,hyphen)
{
	var numberfield = objName;
	if (chkNumeric(objName,minval,maxval,comma,period,hyphen) == false)
	{
		numberfield.select();
		numberfield.focus();
		return false;
	}
	else
	{
		return true;
	}
}

function chkNumeric(objName,minval,maxval,comma,period,hyphen)
{
// only allow 0-9 be entered, plus any values passed
// (can be in any order, and don't have to be comma, period, or hyphen)
// if all numbers allow commas, periods, hyphens or whatever,
// just hard code it here and take out the passed parameters
var checkOK = "0123456789" + comma + period + hyphen;
var checkStr = objName;
var allValid = true;
var decPoints = 0;
var allNum = "";

for (i = 0;  i < checkStr.value.length;  i++)
{
ch = checkStr.value.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)
{	
alertsay = "Please enter only these values \""
alertsay = alertsay + checkOK + "\" in the \"" + checkStr.name + "\" field."
alert(alertsay);
return (false);
}

// set the minimum and maximum
//var chkVal = allNum;
//var prsVal = parseInt(allNum);
//if (chkVal != "" && !(prsVal >= minval && prsVal <= maxval))
//{
//alertsay = "Please enter a value greater than or "
//alertsay = alertsay + "equal to \"" + minval + "\" and less than or "
//alertsay = alertsay + "equal to \"" + maxval + "\" in the \"" + checkStr.name + "\" field."
//alert(alertsay);
//return (false);
//}
}
//<form method="POST" id=myform name=myform
//action="/articles/articles/javascript/checkNumeric.asp?ID=<%=siteID%>">
//Allow Comma, Period, Negative
//<input type=text onBlur="checkNumeric(this,-5,5000,',','.','-');"
//	name='allowcomma' size=10 maxlength=10><br>
//No Comma, Period, Negative
//<input type=text onBlur="checkNumeric(this,5,60,'','','');"
//	name='nocomma' size=10 maxlength=10><br>
//<input type="Submit" name="Save" value="Save">
//</form>
//  End of numeric test-->

//-->