function validatevendor() 
{
var msg = "The following information is missing:\n\n";
var goalert = false;

	if (register.url.value == "") {
		msg += 'Website URL\n';
		goalert = true;
	}
	
	if (register.company.value == "") {
		msg += 'Company Name\n';
		goalert = true;
	}
	
	if (register.title.value == "") {
		msg += 'Title\n';
		goalert = true;
	}

	if (register.description.value == "") {
		msg += 'Description\n';
		goalert = true;
	}
	
	if (register.keywords.value == "") {
		msg += 'Keywords\n';
		goalert = true;
	}
		
	if (register.email.value == "") {
		msg += 'Email\n';
		goalert = true;
	}

if (goalert == true) {
	alert(msg);
	return false;
} else {
	var e = register.email.value;
	
	if (e.indexOf('@')==-1) { //does it have an @ in it?
		alert('Please provide a valid email address\n\nThe address is missing an @ symbol');
		return false;
	} 
	
	var atsplit = register.email.value.split('@');
	if (atsplit[0]=='') { //are there any characters before the @ symbol
		alert('Please provide a valid email address\n\nThe address is missing characters before the @ symbol');
		return false;
	}
	
	if (atsplit[1].indexOf('.')==-1) { //does it have a . after the @
		alert('Please provide a valid email address\n\nThe address is missing a . (dot) after the @ symbol');
		return false;
	} 
	
	var atdotsplit = atsplit[1].split('.');
	if (atdotsplit[0]=='') { //does it have characters immediately after the @				
		alert('Please provide a valid email address\n\nThe address is missing characters immediately after the @ symbol');
		return false;
	}
	
	var dotsplit = register.email.value.split('.');
	//alert(dotsplit[dotsplit.length-1]);
	if (dotsplit[dotsplit.length-1]=='') { //are there any characters after the last .
		alert('Please provide a valid email address\n\nThe address is missing characters after the last .(dot)');
		return false;
	}
		
	//otherwise submit the form
	register.submit();		
} 
}

function validatesignup() 
{
var msg = "The following information is missing:\n\n";
var goalert = false;

	if (register.url.value == "") {
		msg += 'Website URL\n';
		goalert = true;
	}
	
	if (register.username.value == "") {
		msg += 'Username\n';
		goalert = true;
	}
	
	if (register.password.value == "") {
		msg += 'Password\n';
		goalert = true;
	}
	
	if (register.passwordconfirm.value == "") {
		msg += 'Password Confirm\n';
		goalert = true;
	}

	if (register.randomimage.value == "") {
		msg += 'Validation Code\n';
		goalert = true;
	}
	
	if (register.company.value == "") {
		msg += 'Company Name\n';
		goalert = true;
	}
	
	if (register.title.value == "") {
		msg += 'Title\n';
		goalert = true;
	}

	if (register.description.value == "") {
		msg += 'Description\n';
		goalert = true;
	}
	
	if (register.keywords.value == "") {
		msg += 'Keywords\n';
		goalert = true;
	}
		
	if (register.email.value == "") {
		msg += 'Email\n';
		goalert = true;
	}

if (goalert == true) {
	alert(msg);
	return false;
} else {
	var e = register.email.value;
	
	if (e.indexOf('@')==-1) { //does it have an @ in it?
		alert('Please provide a valid email address\n\nThe address is missing an @ symbol');
		return false;
	} 
	
	var atsplit = register.email.value.split('@');
	if (atsplit[0]=='') { //are there any characters before the @ symbol
		alert('Please provide a valid email address\n\nThe address is missing characters before the @ symbol');
		return false;
	}
	
	if (atsplit[1].indexOf('.')==-1) { //does it have a . after the @
		alert('Please provide a valid email address\n\nThe address is missing a . (dot) after the @ symbol');
		return false;
	} 
	
	var atdotsplit = atsplit[1].split('.');
	if (atdotsplit[0]=='') { //does it have characters immediately after the @				
		alert('Please provide a valid email address\n\nThe address is missing characters immediately after the @ symbol');
		return false;
	}
	
	var dotsplit = register.email.value.split('.');
	//alert(dotsplit[dotsplit.length-1]);
	if (dotsplit[dotsplit.length-1]=='') { //are there any characters after the last .
		alert('Please provide a valid email address\n\nThe address is missing characters after the last .(dot)');
		return false;
	}
	
	// check to make sure password and password confirmation match.
	if (register.password.value != register.passwordconfirm.value) {
		msg = 'Your password and password confirmation do not match.  Please check to make sure you have entered the same password for each.';
		alert(msg);
		return false;
	}
	
	// check to make sure password and password confirmation match.
	if (register.randomimage.value != register.validation.value) {
		msg = 'The validation code entered is not correct.  Please check and re-enter the code.';
		alert(msg);
		return false;
	}
		
	//otherwise submit the form
	register.submit();		
} 
}

function checkterms()
{
if (register.termsofuse.checked == false) {
	alert ('Please check \'Terms of Use\' if you accept the SaNeeks Terms of Use.');
	return false;
} else { 	
	return validatesignup();
}	
}

function validatefeedback() 
{
var msg = "The following information is missing:\n\n";

var goalert = false;
	if (feedback.email.value == "") {
		msg += 'Email\n';
		goalert = true;
	}
	if (feedback.message.value == "") {
		msg += 'Feedback\n';
		goalert = true;
	}
	if (feedback.randomimage.value == "") {
		msg += 'Validation Code\n';
		goalert = true;
	}

if (goalert == true) {
	alert(msg);
	return false;
} else {

	// check to make sure password and password confirmation match.
	if (feedback.randomimage.value != feedback.validation.value) {
		msg = 'The validation code entered is not correct.  Please check and re-enter the code.';
		alert(msg);
		return false;
	}
	
	var e = feedback.email.value;
	
	if (e.indexOf('@')==-1) { //does it have an @ in it?
		alert('Please provide a valid email address\n\nThe address is missing an @ symbol');
		return false;
	} 
	
	var atsplit = feedback.email.value.split('@');
	if (atsplit[0]=='') { //are there any characters before the @ symbol
		alert('Please provide a valid email address\n\nThe address is missing characters before the @ symbol');
		return false;
	}
	
	if (atsplit[1].indexOf('.')==-1) { //does it have a . after the @
		alert('Please provide a valid email address\n\nThe address is missing a . (dot) after the @ symbol');
		return false;
	} 
	
	var atdotsplit = atsplit[1].split('.');
	if (atdotsplit[0]=='') { //does it have characters immediately after the @				
		alert('Please provide a valid email address\n\nThe address is missing characters immediately after the @ symbol');
		return false;
	}
	
	var dotsplit = feedback.email.value.split('.');
	//alert(dotsplit[dotsplit.length-1]);
	if (dotsplit[dotsplit.length-1]=='') { //are there any characters after the last .
		alert('Please provide a valid email address\n\nThe address is missing characters after the last .(dot)');
		return false;
	}
	
	//otherwise submit the form
	feedback.submit();		
} 
}

function validateemail() 
{
var msg = "The following information is missing:\n\n";

var goalert = false;
	
	if (forgot.email.value == "") {
		msg += 'Email\n';
		goalert = true;
	}

if (goalert == true) {
	alert(msg);
	return false;
} else {
	var e = forgot.email.value;
	
	if (e.indexOf('@')==-1) { //does it have an @ in it?
		alert('Please provide a valid email address\n\nThe address is missing an @ symbol');
		return false;
	} 
	
	var atsplit = forgot.email.value.split('@');
	if (atsplit[0]=='') { //are there any characters before the @ symbol
		alert('Please provide a valid email address\n\nThe address is missing characters before the @ symbol');
		return false;
	}
	
	if (atsplit[1].indexOf('.')==-1) { //does it have a . after the @
		alert('Please provide a valid email address\n\nThe address is missing a . (dot) after the @ symbol');
		return false;
	} 
	
	var atdotsplit = atsplit[1].split('.');
	if (atdotsplit[0]=='') { //does it have characters immediately after the @				
		alert('Please provide a valid email address\n\nThe address is missing characters immediately after the @ symbol');
		return false;
	}
	
	var dotsplit = forgot.email.value.split('.');
	//alert(dotsplit[dotsplit.length-1]);
	if (dotsplit[dotsplit.length-1]=='') { //are there any characters after the last .
		alert('Please provide a valid email address\n\nThe address is missing characters after the last .(dot)');
		return false;
	}
	
	//otherwise submit the form
	forgot.submit();		
} 
}

function validatepassword() 
{
var msg = "The following information is missing:\n\n";

var goalert = false;
	if (change.oldpassword.value == "") {
		msg += 'Old Password\n';
		goalert = true;
	}
	
	if (change.newpassword.value == "") {
		msg += 'New Password\n';
		goalert = true;
	}
	
	if (change.newpasswordconfirm.value == "") {
		msg += 'New Password Confirm\n';
		goalert = true;
	}
	
if (goalert == true) {
	alert(msg);
	return false;
} else {
	// check to make sure password and password confirmation match.
	if (change.newpassword.value != change.newpasswordconfirm.value) {
		msg = 'Your password and password confirmation do not match.  Please check to make sure you have entered the same password for each.';
		alert(msg);
		return false;
	}
	//otherwise submit the form
	change.submit();		
} 
}
