// JavaScript Document
// Remind your friends From
// Northlandjuices
function remind_your_friends()
{
	var m_from=document.frmPostcard.m_from.value;
	var m_to=document.frmPostcard.m_to.value;
	if(""==(document.frmPostcard.m_dear.value).trim())
	{
		alert("Please enter the dear field");
		document.frmPostcard.m_dear.focus();
		return false;
	}
	else if(""==(document.frmPostcard.m_love.value).trim())
	{
		alert("Please enter the love field");
		document.frmPostcard.m_love.focus();
		return false;
	}
	else if(""==(document.frmPostcard.m_from.value).trim())
	{
		alert("Please enter the from email");
		document.frmPostcard.m_from.focus();
		return false;
	}
	else if(m_from!="" && (m_from.indexOf("@",0)==-1 || m_from.indexOf(".",0)==-1))
	{
		alert("Enter the valid from email");
		document.frmPostcard.m_from.focus();
		document.frmPostcard.m_from.select();
		return false;
	}
	else if(""==(document.frmPostcard.m_to.value).trim())
	{
		alert("Please enter the to email");
		document.frmPostcard.m_to.focus();
		return false;
	}
	else if(m_to!="" && (m_to.indexOf("@",0)==-1 || m_to.indexOf(".",0)==-1))
	{
		alert("Enter the valid to email");
		document.frmPostcard.m_to.focus();
		document.frmPostcard.m_to.select();
		return false;
	}
}
String.prototype.trim = function() 
{
	return this.replace(/^\s+|\s+$/g,"");
}