function CheckAllnewsletter(x)
{
if (ISBLANKnews(x.email.value))      
	{ 	
		    alert("Please enter your email address !!");
    	    return false;
    }
	if(checkemailnews(x.email.value)==false)
	{
		alert("Please enter a valid email address!")
		return false;
	}
    
	//
	 return true;
}

/// to check that perticular value is EMPTY OR NOT
function ISBLANKnews(xx)
{ 
        var cc=0,tt;
		for(tt=0; tt<xx.length; tt++)
		{
		     if (xx.charAt(tt)==' ')
			 {
			 	cc=cc+1; // count blank character
			 }
		}
		if (cc==xx.length)
		{
			return true;  //// means it is BLANK
		}
	     return false;	//// means it is NOT BLANK
}
function checkemailnews(myemail)
{
var str=myemail;
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str))
{
testresults=true
}
else
{
testresults=false
}
return (testresults)
}
