 $(document).ready(function(){
   $("#bforgot").click(function () {
      $("#info").slideUp();
      $("#away").slideUp();
      $("#forgot").slideDown();
    });

    $("#baway").click(function () {
      $("#info").slideUp();
      $("#forgot").slideUp();
      $("#away").slideDown();
    });

    $("#binfo").click(function () {
      $("#away").slideUp();
      $("#forgot").slideUp();
      $("#info").slideDown();
    });
 });

function check_emails()
{
  if( document.getElementById('forgot1').value != '' && document.getElementById('forgot2').value != '' && document.getElementById('forgot1').value == document.getElementById('forgot2').value )
    return true;

  alert( 'Please check the email you have provided...');
  return false;
}

function check_syc(syc)
{
  if( document.getElementById('username').value == '' || document.getElementById('password').value == '' )
  {
    alert('Please ensure you have provided your email and password...');
    document.getElementById('username').value = ' ';
    document.getElementById('password').value = '';
    document.getElementById('sec_question').value = '';
    return false;
  }

  var a = document.getElementById('sec_question').value;

  if( a == syc ) return true;

  alert('Please check your answer to the security question...');
  document.getElementById('sec_question').value = '';
  document.getElementById('username').value = ' ';
  document.getElementById('password').value = '';
  return false;
}
