/* Check for the existance of SMT_LOGIN to allow people to logout of SMT */ 
$(document).ready(function() {
  var smt_cookie = $.cookie('SMT_LOGIN');
  if (smt_cookie != null) {
    var href = $('#SMTloginOut a').attr("href");
    $('#SMTloginOut a').attr("href", href + "logout.aspx").text("Logout");
  };
});
function SetSmteEvent(smteFlag) {
  switch (smteFlag) {
    case 'wl':
      s.eVar4 = 'WallLogin';
      s.events = 'event20';
      break;
    case 'wr':
      s.eVar4 = 'WallReg';
      s.events = 'event20';
      break;
    case 'ul':
      s.eVar4 = 'UserToolsLogin';
      s.events = 'event20';
      break;
    case 'sl':
      s.eVar4 = 'SimpleLogin';
      s.events = 'event20';
      break;
    case 'rq':
      s.eVar4 = 'Requalification';
      s.events = 'event20';
      break;
    case 'id':
      s.eVar4 = 'IncrementalData';
      s.events = 'event20';
      break;
    case 'lo':
      s.eVar4 = 'Logout';
      s.events = 'event20';
      break;
    default:
      /* do nothing 
      s.eVar4 = 'unknown';
      s.events = 'event20'; */
      break;
  }
}

// Check for the existance of SMT_LOGIN to allow people to logout of SMT
$(document).ready(function() {
  var smt_cookie = $.cookie('SMT_LOGIN');
  if (smt_cookie != null) {
    var href = $('#loginArea a.SMTregister').attr("href");
    $('#loginArea').addClass('SMTlogout');
    $('#loginArea form').hide();
    $('#loginArea a.SMTregister').attr("href", href + "logout.aspx").text("Logout");
  };
});
/* */

$(document).ready(function() { 
  $("#loginArea").addClass("active");
  $("#loginArea input")
    .focus(function() {
      $(this).removeClass("empty");
    })
    .blur(function() {
      if ($(this).val() == "") {
        $(this).addClass("empty");
      };
    });
  $(window).load(function() {
    $("#loginArea input[value='']").addClass("empty");
  });
});