function validateregistration()
{
	var errorstring = "Please fill out the following:\n";
	var found = false;
	var emailre = /^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9})$/;
	var areacodere = /\d\d\d/;
	var suffixre = /\d\d\d\d/;
	var zipre = /\d\d\d\d\d/;
	
	if(document.registrationform.fname.value == "")
	{
		errorstring += "- First Name\n";
		found = true;
	}
	
	if(document.registrationform.lname.value == "")
	{
		errorstring += "- Last Name\n";
		found = true;
	}
	
	if(document.registrationform.org.value == "")
	{
		errorstring += "- Organization\n";
		found = true;
	}
	
	/*
	if(document.registrationform.title.value == "")
	{
		errorstring += "- Title\n";
		found = true;
	}
	*/
	
	/*
	if(document.registrationform.tribe.value == "")
	{
		errorstring += "- Tribal Affiliation\n";
		found = true;
	}
	*/
	if(document.registrationform.address.value == "")
	{
		errorstring += "- Address\n";
		found = true;
	}
	
	if(document.registrationform.city.value == "")
	{
		errorstring += "- City\n";
		found = true;
	}
	
	if(document.registrationform.state.value == "")
	{
		errorstring += "- State\n";
		found = true;
	}
	
	if(!document.registrationform.zip.value.match(zipre))
	{
		errorstring += "- Zipcode\n";
		found = true;
	}
	
	if(!document.registrationform.areacode.value.match(areacodere) || !document.registrationform.prefix.value.match(areacodere) || !document.registrationform.suffix.value.match(suffixre))
	{
		errorstring += "- Phone Number\n";
		found = true;
	}
	
	if((document.registrationform.faxareacode.value != "" || document.registrationform.faxprefix.value != "" || document.registrationform.faxsuffix.value != "") && (!document.registrationform.areacode.value.match(areacodere) || !document.registrationform.prefix.value.match(areacodere) || !document.registrationform.suffix.value.match(suffixre)))
	{
		errorstring += "- Fax\n";
		found = true;
	}
	
	if(!document.registrationform.email.value.match(emailre))
	{
		errorstring += "- Email\n";
		found = true;
	}
	
	if(document.registrationform.email.value != document.registrationform.confirmemail.value)
	{
		errorstring += "- Email and Confirm Email do not match\n";
		found = true;
	}
	
	if(found)
	{
		alert(errorstring);
		return false;
	}else
	{
		return true;
	}
}
// End validateregistration //

function validateconsultation()
{
	var errorstring = "Please fill out the following:\n";
	var found = false;
	zipre = /\d\d\d\d\d/;
	datere = /\d\d-\d\d-\d\d\d\d/;
	phonere = /\d\d\d-\d\d\d-\d\d\d\d/;
	
	if(document.consultationform.title.value == "")
	{
		errorstring += "- Title\n";
		found = true;
	}
	
	if(document.consultationform.city.value == "")
	{
		errorstring += "- City\n";
		found = true;
	}
	
	if(document.consultationform.state.value == "")
	{
		errorstring += "- State\n";
		found = true;
	}
	
	if(!document.consultationform.zipcode.value.match(zipre))
	{
		errorstring += "- Zipcode e.g. 99201\n";
		found = true;
	}
	
	if(!document.consultationform.consultationdate.value.match(datere))
	{
		errorstring += "- Consultation Date (e.g. mm-dd-yyyy)\n";
		found = true;
	}
	
	if(document.consultationform.hotelname.value == "")
	{
		errorstring += "- Hotel Name\n";
		found = true;
	}
	
	if(document.consultationform.hoteladdress.value == "")
	{
		errorstring += "- Hotel Address\n";
		found = true;
	}
	
	if(!document.consultationform.hotelphone.value.match(phonere))
	{
		errorstring += "- Hotel Phone e.g. 555-555-5555\n";
		found = true;
	}
	
	if(found)
	{
		alert(errorstring);
		return false;
	}else
	{
		return true;
	}
}

function validateorganization()
{
	var found = false;
	var errorstring = "The following errors were found:\n";
	
	if(document.orgform.datecalled.value != "" && !document.orgform.datecalled.value.match(/\d\d-\d\d-\d\d\d\d/))
	{
		found = true;
		errorstring += "- Date Called e.g. mm-dd-yyyy\n";
	}
	
	if(found)
	{
		alert(errorstring);
		return false;
	}else
	{
		return true;
	}
}

function validateemail()
{
	var found = false;
	var errorstring = "Please fill out the following fields:\n";
	var emailre = /^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9})$/;
	
	if(!document.emailform.from.value.match(emailre))
	{
		found = true;
		errorstring += "- From Email\n";
	}
	
	if(document.emailform.subject.value == "")
	{
		found = true;
		errorstring += "- Subject\n";
	}
	
	if(found)
	{
		alert(errorstring);
		return false;
	}else
	{
		return true;
	}
}