//'these two variables reg_exp1, reg_exp2 are for checking the valid emails.
//These are regular expressions.

 var reg_exp1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/
 var reg_exp2 =/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/

function check_form(frm)
{
	
	if (frm.f_name.value=="")
	{
		alert("Please enter your name !");
		frm.f_name.focus();
		return false;
	}
	else if(!isNaN(frm.f_name.value))
	{
		alert("Invalid name !");
		frm.f_name.focus();
		return false;
	}
	else if (reg_exp1.test(frm.e_mail.value) || !reg_exp2.test(frm.e_mail.value))
	{
	   alert("Your E-Mail Id is invalid. Please Recheck!!");
	   frm.e_mail.focus();
	   return false;
	}
	else if (reg_exp1.test(frm.to_mail.value) || !reg_exp2.test(frm.to_mail.value))
	{
	   alert("Your E-Mail Id is invalid. Please Recheck!!");
	   frm.to_mail.focus();
	   return false;
	}

	
	
	return true;
}
function form(path)
{
if (path="")
{
	path="./";
}


document.write('<div align="center"><form method="get"      action="http://groups.yahoo.com/subscribe/emailcmailgrp"      style="background-color: #7C597C; width: 254px; padding: 2px 4px">  <h6 style="font-weight: bold; margin-bottom: 5px; text-align: center">      Subscribe to emailcmailgrp</h6>  <input style="vertical-align: top"      type="text"      name="user"      value="enter email address"      size="20" />  <input type="image" alt="Click to join emailcmailgrp"      name="Click to join emailcmailgrp"      src="http://us.i1.yimg.com/us.yimg.com/i/yg/img/i/us/ui/join.gif" />  <p style="text-align: center;">  Powered by <a href="http://us.groups.yahoo.com/">us.groups.yahoo.com</a></p></form></div><div align="center"><form method="post" name="form_query" action="'+path+'/php-bin/query.php"onsubmit="return check_form(this);"><TABLE class=text><TR>	<TD> Your Name</TD>	<TD> Your Email ID</TD>	<TD>Your Friends Email ID</TD></TR><TR>	<TD><INPUT TYPE="text" NAME="f_name"></TD>	<TD><INPUT TYPE="text" NAME="e_mail"></TD>	<TD><INPUT TYPE="text" NAME="to_mail"></TD></TR><TR>	<TD><input type="hidden" name="lurl"></TD>	<TD></TD>	<TD align="right"><INPUT TYPE="submit" name="submit"              value="Send This eMail" ></TD></TR></TABLE></form></div><div align="center"><center> <iframe src="http://www.emailcmail.com/ad-horizontal-2.html" width="100%" height="142" border="0" frameborder="0" align="middle">  <p>Your browser does not support iframes.</p></iframe></center></div>')
}