function validateform2()
{
	// define vars
	var valid = true; 
	var errMsg = 'The following items need your attention:\n\n';
	
	// remember to change form name after 'document'
	var Temp     = document.form.f003
	
	var AtSym    = Temp.value.indexOf('@')
	var Period   = Temp.value.lastIndexOf('.')
	var Space    = Temp.value.indexOf(' ')
	var Length   = Temp.value.length - 1   // Array is from 0 to length-1
	
	//check values

	if ((AtSym < 1) ||                     // '@' cannot be in first position
		(Period <= AtSym+1) ||             // Must be atleast one valid char btwn '@' and '.'
		(Period == Length ) ||             // Must be atleast one valid char after '.'
		(Space  != -1))                    // No empty spaces permitted
		{  
			valid = false;
			errMsg += 'Please enter a valid e-mail address.\n';
		}
		
	// errors?, show them to user and stop processing form		
	if(!valid) 
		alert(errMsg); 
	return valid;
}

function validateform3()
{
	// define vars
	var valid = true; 
	var errMsg = 'The following items need your attention:\n\n';
	
	// remember to change form name after 'document'
	var Name     = document.form3.f002.value;
	var ACode    = document.form3.f004.value;
	var Phone    = document.form3.f005.value;
	var Temp     = document.form3.f003
	
	var AtSym    = Temp.value.indexOf('@')
	var Period   = Temp.value.lastIndexOf('.')
	var Space    = Temp.value.indexOf(' ')
	var Length   = Temp.value.length - 1   // Array is from 0 to length-1
	
	//check values
	
	if (Name == "")
		{
			valid = false;
			errMsg += 'Please provide your Full Name.\n';
		}

	if ((AtSym < 1) ||                     // '@' cannot be in first position
		(Period <= AtSym+1) ||             // Must be atleast one valid char btwn '@' and '.'
		(Period == Length ) ||             // Must be atleast one valid char after '.'
		(Space  != -1))                    // No empty spaces permitted
		{  
			valid = false;
			errMsg += 'Please enter a valid e-mail address.\n';
		}
	
	if (ACode == "")
		{
			valid = false;
			errMsg += 'Please provide your Area Code.\n';
		}
	
	if (Phone == "")
		{
			valid = false;
			errMsg += 'Please provide your Phone Number.\n';
		}
		
	// errors?, show them to user and stop processing form		
	if(!valid) 
		alert(errMsg); 
	return valid;
}

function validateform4()
{
	// define vars
	var valid = true; 
	var errMsg = 'The following items need your attention:\n\n';
	
	// remember to change form name after 'document'
	
	var HowDidYouHear	= document.quoteform.HowDidYouHear.value;
	var Name		    = document.quoteform.Name.value;
	var HomeNumber	    = document.quoteform.HomeNumber.value;	
	var State		    = document.quoteform.State.value;
	var Destination	    = document.quoteform.Destination.value;
	var Duration	    = document.quoteform.Duration.value;	
	var Depart_Month    = document.quoteform.Depart_Month.value;
	var Depart_Day	    = document.quoteform.Depart_Day.value;
	var Depart_Year 	= document.quoteform.Depart_Year.value;
	var Cabin_Type	 	= document.quoteform.Cabin_Type.value;	
	var Temp     		= document.quoteform.Email
	
	var AtSym    = Temp.value.indexOf('@')
	var Period   = Temp.value.lastIndexOf('.')
	var Space    = Temp.value.indexOf(' ')
	var Length   = Temp.value.length - 1   // Array is from 0 to length-1
	
	//check values

	if ((AtSym < 1) ||                     // '@' cannot be in first position
		(Period <= AtSym+1) ||             // Must be atleast one valid char btwn '@' and '.'
		(Period == Length ) ||             // Must be atleast one valid char after '.'
		(Space  != -1))                    // No empty spaces permitted
		{  
			valid = false;
			errMsg += 'Please enter a valid e-mail address.\n';
		}
	
	if (HowDidYouHear == "")
 		{
 			valid = false;
 			errMsg += 'Please provide how did you hear about us?\n';
 		}
		
	if (Name == "")
 		{
 			valid = false;
 			errMsg += 'Please provide your Full Name.\n';
 		}

	if (HomeNumber == "")
 		{
 			valid = false;
 			errMsg += 'Please provide your Phone Number with Area Code.\n';
 		}		
	
	if (State == "")
 		{
 			valid = false;
 			errMsg += 'Please provide your State.\n';
 		}
		
	if (Destination == "")
 		{
 			valid = false;
 			errMsg += 'Please provide where you would like to cruise?\n';
 		}
	
	if (Duration == "")
 		{
 			valid = false;
 			errMsg += 'Please provide how many days you would like to sail?\n';
 		}		
	
	if (Depart_Month == "")
 		{
 			valid = false;
 			errMsg += 'Please provide your Departure Month.\n';
 		}
		
	if (Depart_Day == "")
 		{
 			valid = false;
 			errMsg += 'Please provide your Departure Day.\n';
 		}

	if (Depart_Year == "")
 		{
 			valid = false;
 			errMsg += 'Please provide your Departure Year.\n';
 		}
		
	if (Cabin_Type == "")
 		{
 			valid = false;
 			errMsg += 'Please provide your Cabin Type.\n';
 		}				

	// errors?, show them to user and stop processing form		
	if(!valid) 
		alert(errMsg); 
	return valid;
}

