var url="http://bottlemeamessage.com/";

function reset_nl()
{
	if(this.document.frm_taf.to_email.value=="friend's email?")
	{
		this.document.frm_taf.to_email.value="";
	}
}

function restore_nl()
{
	if(this.document.frm_taf.to_email.value=="")
	{
		this.document.frm_taf.to_email.value="friend's email?";
	}
}
       
function chk_taf()
{
	if(this.document.frm_taf.to_email.value=="" || this.document.frm_taf.to_email.value=="friend's email?")
	{
		alert("Please fill Email Address to continue");
		return false;
	}
	else
	{
		var str=this.document.frm_taf.to_email.value;
		var aa=str.indexOf("@");
		var bb=str.indexOf(".");
		var cc=str.charAt(aa);
	
		if(aa==-1)
		{
			alert("Please enter the valid Email Address")
			return false;
		}
		else if(bb==-1)
		{
			alert("Please enter the valid Email Address")
			return false;
		}
		else
		{
			taf_popup(this.document.frm_taf.to_email.value);
			return false;
		}
	}
}

function reset_nl1()
{
	if(this.document.frm_taf1.to_email.value=="friend's email?")
	{
		this.document.frm_taf1.to_email.value="";
	}
}

function restore_nl1()
{
	if(this.document.frm_taf1.to_email.value=="")
	{
		this.document.frm_taf1.to_email.value="friend's email?";
	}
}
       
function chk_taf1()
{
	if(this.document.frm_taf1.to_email.value=="" || this.document.frm_taf1.to_email.value=="friend's email?")
	{
		alert("Please fill Email Address to continue");
		return false;
	}
	else
	{
		var str=this.document.frm_taf1.to_email.value;
		var aa=str.indexOf("@");
		var bb=str.indexOf(".");
		var cc=str.charAt(aa);
	
		if(aa==-1)
		{
			alert("Please enter the valid Email Address")
			return false;
		}
		else if(bb==-1)
		{
			alert("Please enter the valid Email Address")
			return false;
		}
		else
		{
			taf_popup(this.document.frm_taf1.to_email.value);
			return false;
		}
	}
}

function taf_popup(to_email)
{
window.open(url+"taf.php?act=show_taf&to_email="+to_email,'Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+500+',height='+375)
}