function check_account()
{
	var chk=document.create_account;
	if(chk.firstname.value=='')
	{
		alert("Enter your firstname");
		chk.firstname.focus();
		chk.firstname.select();
		return false;
	}
	if(chk.lastname.value=='')
	{
		alert("Enter your lastname");
		chk.lastname.focus();
		chk.lastname.select();
		return false;
	}
	
	
     if(chk.street_address.value=='')
	{
		alert("Enter your Street address");
		chk.street_address.focus();
		chk.street_address.select();
		return false;
	}	
	
	
	   if(chk.city.value=='')
	{
		alert("Enter your city");
		chk.city.focus();
		chk.city.select();
		return false;
	}	
	
	   if(chk.postcode.value=='')
	{
		alert("Enter your postcode");
		chk.postcode.focus();
		chk.postcode.select();
		return false;
	}	
	
	
	 if(chk.zone_country_id.value=='')
	{
		alert('Please select Country');
		chk.zone_country_id.focus();
		//chk.zone_country_id.select();
		return false;
	}	

	
	
	
	if(chk.telephone.value=='')
	{
		alert("Enter your telephone no.");
		chk.telephone.focus();
		chk.telephone.select();
		return false;
	}
	//validation for entering numbers only
	
	else
	{
		var chk=document.create_account;
		var checkOK = "0123456789";
		var checkStr = chk.telephone.value;
		var allValid = true;
		for (i=0;i<checkStr.length;i++)
			{
			ch = checkStr.charAt(i);
				for (j = 0;  j < checkOK.length;  j++)
					if (ch == checkOK.charAt(j))
						break;
					if (j == checkOK.length)
					{
						allValid = false;
						break;
					}
			}
		if (!allValid)
		{
		alert("Enter numbers only in Telephone no.");
		return (false);
		}

	}
	
	if(chk.email_address.value=='')
	{
		alert("Enter your email-id");
		chk.email_address.focus();
		chk.email_address.select();
		return false;
	}
	else
	{
		var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i
		var returnval=emailfilter.test(chk.email_address.value)
		if (returnval==false)
		{
			alert("Please enter a valid email address.");
			chk.email_address.focus();
			chk.email_address.select();
			return false;
		}
		
		
		var text = chk.email_address.value;
		// alert(text);
	var count = 0; 
	var i;
    for(i=0; i < text.length; i++) { 
	
       if(text.charCodeAt(i) >= 65 && text.charCodeAt(i) <= 90) 
	   {
        count++; }
	 }
	
	if(count>0)
	{
		alert("Please enter a email address in lower case letters only.");
		return false;
	}
}
	
	
	
	if(chk.customer_summary.value=='')
	{
		alert("Enter your summary of issue");
		chk.customer_summary.focus();
		chk.customer_summary.select();
		return false;
	}
	
	
	

	
}




	