function validateRequired(f, identifier) {
	if (f.value == "") {
		alert(identifier + " a required field!\n\nPlease fill in the information to continue.");
		f.focus()
		return false;
	} else {
		return true;
	}
}


function validateOther(f,c, identifier) {
	if (f.value == "Other" && c.value == "") {
		alert(identifier + " a required field!\n\nPlease fill in the information to continue.");
		c.focus()
		return false;
	} else {
		return true;
	}
}



function validateEmail(f, identifier){
  validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;

//alert( f.value );
if (f.value == "") {}
else {
   if (f.value.search(validRegExp) == -1) 
   {
	alert(identifier + " a required field!\n\nPlease enter a valid Email Address to continue.");
	f.focus()
	return false;
    }
    }
    return true; 
}

function validateCheckBox(f, identifier) {
	if (f.checked == false)		
	{
	alert(identifier + " a required field!\n\nPlease check the box to continue.");
	return false;		
   	} else {		
   		return true;
	}
}

function validateNumeric(f, identifier){

   var strValidChars = "0123456789-";
   var strChar;
   var strString = f.value;
   var blnResult = true;

   //if (strString.length == 0) return false;

   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         alert(identifier + " a required field!\n\nPlease fill in the information to continue.");
	 f.focus()
         blnResult = false;
         }
      }
   return blnResult;
}
 

function validateMin(f, identifier, num) {
    var strString = f.value;
    var blnResult = true;    
    if ((f.value.length < num) && (f.value.length > 0)){
        alert(identifier + " requires a minimum of " + num + " characters!\n\nPlease enter this information to continue.");
        f.focus();    
        blnResult = false;
    }   
    return blnResult;  

}
