//Validates text field isn't empty
function notEmpty(elem)
{
	var str = elem.value;
	if(str.length == 0)
	{
		alert("You must fill in all required fields (*)");
		return false;
	} else 
	{
		return true;
	}
}
//end is not empty validation


// Email validation from http://www.javascripter.net/faq/validati.htm
//only looks for the @ then something after the @ symbol, doesn't look for a .com 
function validEmail() 
{
 var email=document.application.email.value;
 if (email.indexOf(' ')==-1 
      && 0<email.indexOf('@')
      && email.indexOf('@')+1 < email.length
 ) return true;
 else alert ('Invalid email address!')
 return false;
}
//end email validation


// Phone number validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
// Declaring required variables
var digits = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()- ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";
// Minimum no of digits in an international phone no.
var minDigits = 10;

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function checkInternationalPhone(strPhone){
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s) && s.length >= minDigits);
}

function validPhone(){
	var Phone=document.application.phone
	
	if (checkInternationalPhone(Phone.value)==false){
		alert("Please Enter a Valid Phone Number")
		Phone.value=""
		Phone.focus()
		return false
	}
	return true
 }
//end phone number validation


//CODE downloaded from// http://www.NetEvolution.co.uk
function checkCheckBoxes() {
	if (document.forms[0].terms.checked == false)
	{
	alert ('You must agree to the Terms.');
	return false;
	}
	else
		{
		return true;
		}
}

<!-- Original:  Brian Swalwell -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- This validates that the zip code is number and wither 5+4 or just 5 digits -->
function validateZIP(field) {
var valid = "0123456789-";
var hyphencount = 0;

if (field.length!=5 && field.length!=10) {
alert("Please enter your 5 digit or 5 digit+4 zip code.");
return false;
}
for (var i=0; i < field.length; i++) {
temp = "" + field.substring(i, i+1);
if (temp == "-") hyphencount++;
if (valid.indexOf(temp) == "-1") {
alert("Invalid characters in your zip code.  Please try again.");
return false;
}
if ((hyphencount > 1) || ((field.length==10) && ""+field.charAt(5)!="-")) {
alert("The hyphen character should be used with a properly formatted 5 digit+four zip code, like '12345-6789'.   Please try again.");
return false;
   }
}
return true;
}
//end validate zip code

/* JJ's attempt at making a validation for US states doesn't work
found at http://doc.async.com.br/formcheck_re/overview.html
////valid.State = /^(AK|AL|AR|AZ|CA|CO|CT|DC|DE|FL|GA|HI|IA|ID|IL|IN|KS|KY|LA|MA|MD|ME|MI|MN|MO|MS|MT|NB|NC|ND|NH|NJ|NM|NV|NY|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VA|VT|WA|WI|WV|WY)$/i;

function validState(s) {
var sStateCode = "State Code"
var iStateCode = "This field must be a valid two character U.S. state abbreviation."
var pStateCode = "2 character code (like CA)."
var USStateCodeDelimiter = "|";
var USStateCodes = "AL|AK|AS|AZ|AR|CA|CO|CT|DE|DC|FM|FL|GA|GU|HI|ID|IL|IN|IA|KS|KY|LA|ME|MH|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|MP|OH|OK|OR|PW|PA|PR|RI|SC|SD|TN|TX|UT|VT|VI|VA|WA|WV|WI|WY|AE|AA|AE|AE|AP"

     if (isStateCode.arguments.length == false){
			alert ("Please enter a 2 letter State Code")
       return (isStateCode.arguments[1] == true);
		 }
    return ( (USStateCodes.indexOf(s) != -1) &&
             (s.indexOf(USStateCodeDelimiter) == -1) )
}
*/