function validateEmailv2(email)
{
// a very simple email validation checking. 
// you can add more complex email checking if it helps 
    if(email.length <= 0)
	{
		document.getElementById('errID').style.visibility = 'visible'
	  return false;
	}
    var splitted = email.match("^(.+)@(.+)$");
    if(splitted == null) { document.getElementById('errID').style.visibility = 'visible';  return false };
    if(splitted[1] != null )
    {
      var regexp_user=/^\"?[\w-_\.]*\"?$/;
      if(splitted[1].match(regexp_user) == null) { document.getElementById('errID').style.visibility = 'visible'; return false; }
    }
    if(splitted[2] != null)
    {
      var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
      if(splitted[2].match(regexp_domain) == null) 
      {
	    var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
	    if(splitted[2].match(regexp_ip) == null) { document.getElementById('errID').style.visibility = 'visible'; return false; }
      }// if
      return true;
    }


return false;

}