
function validate()
{
if (document.registration.contactName.value==""){
	alert("Please enter Contact Name");
	document.registration.contactName.focus();
	document.registration.contactName.select();
	return false;
}
else if (document.registration.contactName.value.length>=40){
	alert("number of characters exceeds the maximum length");
	document.registration.name.focus();
	document.registration.name.select();
	return false;
}
else if (document.registration.organizationName.value==""){
	alert("Please enter Organization Name");
	document.registration.organizationName.focus();
	document.registration.organizationName.select();
	return false;
}
else if (document.registration.email.value==""){
	alert("Please enter email address");
	document.registration.email.focus();
	document.registration.email.select();
	return false;
}
/*else if (document.registration.recipient.value.length>=15){
	alert("number of characters exceeds the maximum length");
	document.registration.recipient.focus();
	document.registration.recipient.select();
	return false;
}*/
else if ((document.registration.email.value.indexOf('@',0)<0)||(document.registration.email.value.length<5)||(document.registration.email.value.indexOf('.',0)<1)){
	alert("Please enter a valid email address");
	document.registration.email.focus();
	document.registration.email.select();
	return false;
}
/*else if(document.registration.content.value.length>30){
	alert("message exceeds the maximum length");
	return false;
}*/
	
}

function validate_tell_friend()
{
	if (document.tell_friend.fromName.value==""){
		alert("Please enter Your Name");
		document.tell_friend.fromName.focus();
		document.tell_friend.fromName.select();
		return false;
	}
	else if (document.tell_friend.fromName.value.length>=40){
		alert("Your Name: number of characters exceeds the maximum length");
		document.tell_friend.fromName.focus();
		document.tell_friend.fromName.select();
		return false;
	}
	else if (document.tell_friend.fromEmail.value==""){
		alert("Please enter your email address");
		document.tell_friend.fromEmail.focus();
		document.tell_friend.fromEmail.select();
		return false;
	}
	else if ((document.tell_friend.fromEmail.value.indexOf('@',0)<0)||(document.tell_friend.fromEmail.value.length<5)||(document.tell_friend.fromEmail.value.indexOf('.',0)<1)){
		alert("Your Email Address: Please enter a valid email address");
		document.tell_friend.fromEmail.focus();
		document.tell_friend.fromEmail.select();
		return false;
	}
	else if (document.tell_friend.toName.value==""){
		alert("Please enter Your Name");
		document.tell_friend.toName.focus();
		document.tell_friend.toName.select();
		return false;
	}
	else if (document.tell_friend.toName.value.length>=40){
		alert("Your Name: number of characters exceeds the maximum length");
		document.tell_friend.toName.focus();
		document.tell_friend.toName.select();
		return false;
	}
	else if (document.tell_friend.toEmail.value==""){
		alert("Please enter your email address");
		document.tell_friend.toEmail.focus();
		document.tell_friend.toEmail.select();
		return false;
	}
	else if ((document.tell_friend.toEmail.value.indexOf('@',0)<0)||(document.tell_friend.toEmail.value.length<5)||(document.tell_friend.toEmail.value.indexOf('.',0)<1)){
		alert("Your Email Address: Please enter a valid email address");
		document.tell_friend.toEmail.focus();
		document.tell_friend.toEmail.select();
		return false;
	}
	
}