function validateStndFields(form)
{
	if ((form.firstName.value.length < 2))
	{
		alert("Please enter your first name.");
		form.firstName.focus();
		return (false);
	}
			
	if ((form.lastName.value.length < 2))
	{
		alert("Please enter your last name.");
		form.lastName.focus();
		return (false);
	}
			
	if ((form.title.value.length < 2))
	{
		alert("Please enter your job title.");
		form.title.focus();
		return (false);
	}
			
	if ((form.company.value.length < 2))
	{
		alert("Please enter your company name.");
		form.company.focus();
		return (false);
	}
			
	// extensive e-mail validation
		inputStr = form.email.value.toString();
		
		if (inputStr == null || inputStr == "") 
		{
			alert("Please enter your e-mail address.");
			form.email.focus();
			return false;
		}
				
		// check for @ and only one @
		temp = 0;
		flag = "no";
		inputStr = form.email.value.toString();
		for (var i = 0; i < inputStr.length; i++) 
		{
			var oneChar = inputStr.charAt(i)
			if (oneChar == "@") 
			{
			temp=temp+1;
			flag = "ok";
			}
		}
		if ((flag != "ok") || (temp >1)) 
		{
			alert("Your e-mail address is missing the @ symbol.  Please enter your e-mail address in this format: you@yourcompany.com.");
			form.email.focus();
			return false;
		}
				
		// check for one dot on right of @
		flag = "no";
		inputStr = form.email.value.toString();
		inputStr = inputStr.substring(inputStr.indexOf("@")+1,inputStr.length);
		for (var i = 0; i < inputStr.length; i++) 
		{
			var oneChar = inputStr.charAt(i);
			if (oneChar == ".") 
			{
			flag = "ok";
			}
		}
		if (flag != "ok") 
		{
			alert("Please enter your e-mail address in this format: you@yourcompany.com.");
			form.email.focus();
			return false;
		}
		
		// check for on right side of @ must be at least four characters long
		inputStr = form.email.value.toString();
		inputStr = inputStr.substring(inputStr.indexOf("@")+1,inputStr.length);
		if (inputStr.length > 3 ) 
		{
		
		} 
		else 
		{
			alert("Please enter your e-mail address in this format: you@yourcompany.com.");
			form.email.focus();
			return false;
		}
		// checks for the right side of the @ must be 0-9 or a-z or A-Z or _ or - or .
		inputStr = form.email.value.toString();
		inputStr = inputStr.substring(inputStr.indexOf("@")+1,inputStr.length);
		for (var i = 0; i < inputStr.length; i++) 
		{
			var oneChar = inputStr.charAt(i);
			if ((oneChar >="a" && oneChar<="z") || (oneChar >="A" && oneChar<="Z") ||
			oneChar == "_" || oneChar == "-" || oneChar == "." ||
			(oneChar >="0" && oneChar <= "9") ) 
			{
			
		} 
		else 
		{
			alert("Please enter your e-mail address in this format: you@yourcompany.com.");
			form.email.focus();
			return false;
		}
		}
				
		// check for on left side of @ must be atleast one character long
		inputStr = form.email.value.toString();
		inputStr = inputStr.substring(0,inputStr.indexOf("@"));
		if (inputStr.length > 0 ) 
		{
		
		} 
		else 
		{
			alert("Please enter your e-mail address in this format: you@yourcompany.com.");
			form.email.focus();
			return false;
		}
		// checks for before and after EACH dot after the @ must be 0-9 or a-z or A-Z or _ or -
		inputStr = form.email.value.toString();
		inputStr = inputStr.substring(inputStr.indexOf("@")+1,inputStr.length);
		for (var i = 0; i < inputStr.length; i++) {
		var oneChar = inputStr.charAt(i);
		if (oneChar == ".") 
		{
			inputStrBefore = inputStr.substring(i-1,i);
			inputStrAfter = inputStr.substring(i+1,i+2);
			if ((inputStrBefore >="a" && inputStrBefore<="z") ||
			(inputStrBefore >="A" && inputStrBefore<="Z") || inputStrBefore == "_" ||
			inputStrBefore == "-" || (inputStrBefore >="0" && inputStrBefore <= "9")) 
			{
		
		} else 
		{
			alert("Please enter your e-mail address in this format: you@yourcompany.com.");
			form.email.focus();
			return false;
		}
		if ((inputStrAfter >="a" && inputStrAfter<="z") ||
		(inputStrAfter >="A" && inputStrAfter<="Z") || inputStrAfter == "_" ||
		inputStrAfter == "-" || (inputStrBefore >="0" && inputStrBefore <= "9")) 
		{
		
		} else 
		{
			alert("Please enter your e-mail address in this format: you@yourcompany.com.");
			form.email.focus();
			return false;
		}
		}
		}
		
		// checks for on left of @ must be 0-9 or a-z or A-Z or _ or - or ! or % or . or &
		inputStr = form.email.value.toString();
		inputStr = inputStr.substring(0,inputStr.indexOf("@"));
		for (var i = 0; i < inputStr.length; i++) {
		var oneChar = inputStr.charAt(i);
		if ((oneChar >="a" && oneChar<="z") || (oneChar >="A" && oneChar<="Z") ||
		oneChar == "_" || oneChar == "-" || oneChar == "%" || oneChar == "!" || oneChar == "'" ||
		oneChar == "." || oneChar == "&" || (oneChar >="0" && oneChar <= "9")) {
		
		} else {
			alert("Please enter your email address in this format: you@yourcompany.com.");
			form.email.focus();
			return false;
		}
		}
		// checks for there must be at least two characters after the last dot after the @
		inputStr = form.email.value.toString();
		inputStr = inputStr.substring(inputStr.indexOf("@")+1,inputStr.length);
		inputStr = inputStr.substring(inputStr.lastIndexOf(".")+1,inputStr.length);
		if (inputStr.length > 1) {
		
		} else {
			alert("Please enter your e-mail address in this format: you@yourcompany.com.");
			form.email.focus();
			return false;
		}
	// done with e-mail validation
			
	if ((form.address.value.length < 2))
	{
		alert("Please enter your mailing address.");
		form.address.focus();
		return (false);
	}
	
	if ((form.city.value.length < 2))
	{
		alert("Please enter your city.");
		form.city.focus();
		return (false);
	}
	
	if (form.state.selectedIndex < 0)
	{
		alert("Please select the state or province you live in.");
	    form.state.focus();
	    return (false);
	}
	
	if ((form.state.selectedIndex == 0) || (form.state.value == ""))
	{
		alert("Please select the state or province you live in.");
	  	form.state.focus();
	  	return (false);
	}
	
	if ((form.zip.value.length < 2))
	{
		alert("Please enter your zip/postal code.");
		form.zip.focus();
		return (false);
	}
			
	// phone validation script		
		if ( (form.phone.value.length<10) )
		{
			alert("Please enter your entire phone number, including area code.");
			form.phone.focus();
			return (false);
		}
		
		phoneStr = form.phone.value.toString();
		
		for (var i = 0; i < phoneStr.length; i++) 
		{
			var oneChar = phoneStr.charAt(i);
			if (oneChar == "(" || oneChar == ")" || oneChar == "." || oneChar == "-" || oneChar == " " ||
			(oneChar >="0" && oneChar <= "9") ) 
			{
			
			} 
			else 
			{
				alert("Please enter your entire phone number, including area code.");
				form.phone.focus();
				return false;
			}
		}
		
		//bcp
		
		inputStr = form.phone.value.toString();
		
		var total = 0;
		var j = 1;
		for (var i = 0; i < inputStr.length; i++) 
		{
			var oneChar = inputStr.charAt(i)
			if (oneChar == " ") 
			{
			total = j++;
			}
		}
		
		if (total > 3)
		{
			alert("Please enter your entire phone number, including area code.");
			form.phone.focus();
			return false;
		}
	
	//bcp
	// end phone validation script
	
return (true);

}

