function checkIfEmpty(field, message)
{
	if(field.value=='')
	{
		alert(message);
		field.focus();
		return false; 
	}
	return true;
}

function checkSubsForm(f)
{
  if(!checkIfEmpty(f.name, 'Введите свое имя'))
  	return false;

  if(!checkIfEmpty(f.email, 'Введите e-mail'))
  	return false;

  return true;
}
