// JavaScript Document
function chk_string( str, req, min, max )// Checking the lent of the text box
{
	if( str.length == 0 && !req )
		return 0;
	if( str.length < min || str.length > max )
		return 1;
	return 0;
}


function chk_email( str, req )
{
	var email_RegEx = /^\w+([-.]\w+)*\@\w+([-.]\w+)*\.\w+$/;
	if( str.length == 0 && !req )
	    return 0;
	var found = email_RegEx.test( str );
	if( found == false )
	    return 1;
	return 0;
}
function newslatter()
{	
	
	// JavaScript Document


	
	 if( chk_email( document.form.searchtext.value, 1, 2, 250 ) )
	{
		alert("Email Id invalid or not specified");
		document.form.searchtext.focus();
		return false;
	} 
        document.form.action = "newslatter1.php";
		document.form.submit();

}	














