function trim(s)
{
  if (s)
    return s.replace(/(^\s+)|(\s+$)/g, "");
  else
    return '';
}

function empty(s)
{
    if(trim(s) == '')
          return true;
    return false;
}


function CheckLoginForm()
{
  if (empty(document.auth.login.value))
  {
    alert('Введите свой логин.');
    return false;
  }
   
  if (empty(document.auth.passw.value))
  {
    alert('Введите свой пароль.');
    return false;
  }    
}  
    
