function validateFriend()
{
	trimFields();
	if(obj.full_name.value == '')
	{
		alert("Please enter your Name.");
		obj.full_name.focus();
		return;
	}
	if(obj.email.value == '')
	{
		alert("Please enter your Email.");
		obj.email.focus();
		return;
	}
	if(!chkEmail(obj.email.value))
	{
		alert("Please enter a valid Email Address.");
		obj.email.focus();
		obj.email.select();
		return;
	}
	if(obj.message.value == '')
	{
		alert("Please enter Custom Message.");
		obj.message.focus();
		return;
	}
	if(obj.emails.value == '')
	{
		alert("Please enter your Friend Emails.");
		obj.emails.focus();
		return;
	}
	emails = obj.emails.value;
	arrEmails = emails.split(',');
	if(arrEmails.length > 0)
	{
		if(arrEmails.length > 5)
		{
			alert("Please enter upto 5 emails.");
			obj.emails.focus();
			return;
		}
		for(var i = 0; i < arrEmails.length;i++)
		{
			if(!chkEmail(strTrim(arrEmails[i])))
			{
				alert("Please enter valid emails, separated by comma.");
				obj.emails.focus();
				obj.emails.select();
				return;
			}
		}
	}
	if(obj.captcha.value == '')
	{
		alert("Please enter the Alphanumeric value shown.");
		obj.captcha.focus();
		return;
	}
	strPost = 'full_name='+obj.full_name.value;
	strPost+= '&email='+obj.email.value
	strPost+= '&message='+obj.message.value;
	strPost+= '&emails='+obj.emails.value;
	strPost+= '&captcha='+obj.captcha.value;
	strPost+= '&page_uri='+obj.page_uri.value;
	$('#loader_blk').css('display', 'block');
	$('#btn_blk').css('display', 'none');
	//Now post the form using ajax
	 $.ajax({
	   type: "POST",
	   data: strPost,
	   url: "submit_friend_link.php"+'?hash='+parseInt(Math.random() * 10000000000),
	   success: function(retVal){
			if(retVal == 'SUCCESS')
			{
				alert('An email has been sent to your friends with a link to this product. Thank you for sharing!');
				$('#closeBut').click();
			}
			else
			{
				alert(retVal);
			}
			$('#loader_blk').css('display', 'none');
			$('#btn_blk').css('display', 'block');
	   }
	});
}
