//------- To check validity of entered email address
function checkEMail_Address(EMail_Address)
{
  if (!isBlank(EMail_Address))
  {
	var atFound = EMail_Address.indexOf("@")				//find @, starting at beginning
	if (atFound == -1)										//if no @ found
	{
	  alert("Please enter a valid email address with an @!")
	  return false
	}
	if (EMail_Address.indexOf(".", atFound) == -1)			//check for . starting at @  
	{						
	  alert("Please enter a valid email domain after the @!")
	  return false
	}
	return true
  }
  return true												//if no problem encountered
}
//------- To check if string passed is empty or not
function isBlank(string)									//check if just blanks returned
{	
  if (string.length == 0)              						//nothing entered?
    return true												//return, yes is blank	
  for (var i = 0; i <= string.length-1; i++)				//all blanks
    if (string.charAt(i) != " ")							// return false if just one
      return false											//character found
  return true												//else return true - just blanks
}
