function vote(url, id1, id2)
  {
    $.post(url, function(data)
      {
        $(id1).text(data);
        $(id2).text(data == 1 ? "Vote" : "Votes");
      });
  }

function spam(url, id)
  {
    $.post(url);
    $(id).text("Spam");
  }

function ajaxEntryList(url, id)
  {
    $(".autoRefreshMessage").html("refreshing...");
    $.get(url, function(data){$(id).html(data);});
    $(".autoRefreshMessage").html("");
  }

function ajaxAutoLogin(url, id)
  {
    url = url + "?autoLogin=" + ($(id).attr("checked") ? "true" : "false");
    $.get(url, function(data)
      {
        if (data == "true")
          $("#autoLogin").hide();
        else
          $("#autoLogin").show();
      });
  }

var timeoutId;

function refreshEntryList(f, timeout)
  {
    if (timeoutId)
        clearInterval(timeoutId);

    eval(f);

    if (timeout > 0)
        timeoutId = setInterval(f, timeout * 1000);
  }

function checkBrowser()
  {
    if ($.browser.msie && $.browser.version < 7)
      $(".jwaContentRefresh").css("display","none");
  }