function CheckAll(x)
{

if (ISBLANK(x.fname.value) ||ISBLANK(x.phone.value) ||ISBLANK(x.emailid.value)||ISBLANK(x.subj.value)||ISBLANK(x.vcode.value) ||ISBLANK(x.messg.value)) 
	{ 	
		    alert("All fields with * sign are compulsory !!");
    	    return false;
    }
	
	//checkemail(myemail)
	if(checkemail(x.emailid.value)==false)
	  {
       alert("Please enter a valid email address!");
		return false;
	  }
	 

	  
	 return true;
}

/// to check that perticular value is EMPTY OR NOT
function ISBLANK(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
}

//// check email validation	
function checkemail(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)
}


