function j_focus(o_target)
{
o_target.focus();
o_target.select();
}

function j_hide(s_menu) 
{
var o_menu = document.getElementById(s_menu);
o_menu.style.color = "rgb(161, 177, 189)";
document.getElementById("x" + s_menu).style.visibility = "hidden";
}

function j_show(s_menu) 
{
var o_menu = document.getElementById(s_menu);
o_menu.style.color = "rgb(255, 255, 255)";
var i_x = o_menu.offsetLeft;
var i_y = o_menu.offsetTop;
var o_temp = o_menu.offsetParent;
while (o_temp !== null)
  {
  i_x += o_temp.offsetLeft;
  i_y += o_temp.offsetTop;
  o_temp = o_temp.offsetParent;
  };
i_x = i_x;
i_y = i_y + 27;
var o_submenu = document.getElementById("x" + s_menu);
o_submenu.style.left = i_x + "px";
o_submenu.style.top = i_y + "px";
o_submenu.style.visibility = "visible";
}

function j_highlight(s_menu)
{
var o_menu = document.getElementById(s_menu);
o_menu.style.color = "rgb(255, 255, 255)";
}

function j_reset(s_menu)
{
var o_menu = document.getElementById(s_menu);
o_menu.style.color = "rgb(161, 177, 189)";
}

function j_submit(o_main)
{
  var s_email = o_main.value
  if (s_email == "")
    {
      s_email = "";
    }
  else
    {
      s_email = "&e=" + s_email;
    };
  window.location="https://www.esswny.com/secure_login.aspx?a=e" + s_email;
}

function j_test_message(o_main, s_session, s_type)
{
  var s_email = o_main.value
  if (s_email != "")
    {
      window.location="https://www.esswny.com/secure_account" + s_session + "&a=e&t=" + s_type + "&e=" + s_email;
    };
}

function j_bookmark()
{
var s_url = "http://www.esswny.com";
var s_title = "Employment Screening Services"
if (document.all)
  {
  window.external.AddFavorite(s_url, s_title);
  }
else
  {
  if (window.sidebar)
    {
    window.sidebar.addPanel(s_title, s_url, "");
    };
  };
}

function j_display(s_target, s_status, s_show_text, s_hide_text)
{
var o_div = document.getElementById("div_" + s_target);
if (s_status == "1")
  {
  o_div.style.display = "block";
  var s_status_new = "0";
  var s_action = s_hide_text;
  }
else
  {
  o_div.style.display = "none";
  var s_status_new = "1";
  var s_action = s_show_text;
  };
document.getElementById("span_" + s_target).innerHTML = "<a href=\"javascript:j_display('" + s_target + "', '" + s_status_new + "', '" + s_show_text + "', '" + s_hide_text + "')\">" + s_action + "</a>"
}

function j_verify(s_link, s_action)
{
var s_cr = confirm("Are you sure you want to " + s_action);
if (s_cr != "0")
  {
  top.location = s_link;
  };
}

