function view(label)
{ 
  if(label == "reg")
  {
    document.getElementById('entry').style.display = 'none';
    document.getElementById('reg').style.display = 'block';
  }
  if(label == "entry")
  {
    document.getElementById('entry').style.display = 'block';
    document.getElementById('reg').style.display = 'none';
  }
  if(label == "question")
  {
    document.getElementById('question').style.display = 'block';
  }
}

function isValidEmail (email, strict)
{
 if ( !strict ) email = email.replace(/^\s+|\s+$/g, '');
 flag = (/^([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]{2,4}$/i).test(email);
 if (!flag) alert("E-mail введен неправильно!"); 
 return flag;
}
