function fo_addPageNavigation(e, d, f, b)
{
   var a;
   var c =
   {
      nItems : e, page : d, url : b
   }
   ;
   if(f == 1)
   {
      a = 20;
      c.wording = ["fonavpost", "fonavposts"]
   }
   else
   {
      a = 50;
      c.wording = ["fonavtopic", "fonavtopics"]
   }
   c.nPages = Math.ceil(e / a);
   g_addPages(ge("nmvnct34cg46"), c);
   g_addPages(ge("nmvnct34cg47"), c)
}
Listview.templates.forumstopic =
{
   sort : ["-lastpost"], nItemsPerPage : - 1, hideBands : 1 | 2, poundable : 2, sortable : false, columns : [
   {
      id : "subject", name : LANG.subject, align : "left", value : "subject", compute : function(j, f)
      {
         var c = ce("div");
         var m = ce("a"), b, l;
         m.className = "forums-topicsubject"; m.href = this.template.getItemLink(j);
         b = ce("span");
         ae(b, ct(j.subject));
         if(j.locked || (j.blog && j.blog != 1))
         {
            b.className = "icon-locked";
            l = ce("span");
            ae(l, b);
            b = l
         }
         if(j.sticky)
         {
            var h = new Date(j.firstpost), n = (g_serverTime - h) / 1000;
            b.className = (n < 1209600 ? "icon-sticky" : "icon-sticky2");
            l = ce("span");
            ae(l, b);
            b = l
         }
         if(j.blog == 1)
         {
            b.className = "icon-blog";
            l = ce("span");
            ae(l, b);
            b = l
         }
         ae(m, b);
         ae(f, m);
         var o = Math.ceil((j.replies + 1) / 20);
         if(o > 1)
         {
            var e = ce("div");
            e.className = "forums-topicpages"; ae(e, ct(LANG.lvboard_pages));
            var d = Math.max(1, o / 4);
            for(var g = 1; g <= 5; ++ g)
            {
               var k;
               if(g == 5)
               {
                  k = o
               }
               else
               {
                  k = Math.floor(1 + (g - 1) * d)
               }
               if(k > o)
               {
                  break
               }
               m = ce("a");
               m.href = "/forums&topic=" + j.id + (k > 1 ? "." + k : "") + (j.lastpost[1] == k ? "&p=" + j.lastpost[2] : "");
               ae(m, ct("[" + k + "]"));
               ae(e, m);
               if(k == o)
               {
                  break
               }
            }
            ae(f, e)
         }
      }
   }
   ,
   {
      id : "author", name : LANG.author, value : "author", compute : function(d, e)
      {
         var b = ce("a");
         b.href = "/user=" + d.author;
         ae(b, ct(d.author));
         var c;
         if(d.roles)
         {
            d.user = d.author;
            c = Listview.funcBox.coGetColor(d, 4)
         }
         b.className = (c ? c : "q1");
         ae(e, b)
      }
   }
   ,
   {
      id : "replies", name : LANG.replies, value : "replies"
   }
   ,
   {
      id : "views", name : LANG.views, value : "views"
   }
   ,
   {
      id : "lastpost", name : LANG.lastpost, align : "left", value : "lastpost", compute : function(d, f)
      {
         var c = new Date(d.lastpost[0]), e = (g_serverTime - c) / 1000;
         f.className = "small";
         f.style.whiteSpace = "nowrap";
         ae(f, ct(LANG.lvboard_by));
         var b = ce("a");
         b.style.fontWeight = "bold";
         b.href = "/user=" + d.lastpost[3];
         ae(b, ct(d.lastpost[3]));
         ae(f, b);
         ae(f, ct(" "));
         b = ce("a");
         Listview.funcBox.coFormatDate(b, e, c);
         b.style.cursor = "pointer";
         b.className = "q1 icon-lastpost";
         b.href = "/forums&topic=" + d.id + (d.lastpost[1] > 1 ? "." + d.lastpost[1] : "") + "&p=" + d.lastpost[2] + "#p" + d.lastpost[2];
         ae(f, b)
      }
      , sortFunc : function(d, c)
      {
         var e = strcmp(d.sticky, c.sticky);
         if(e != 0)
         {
            return e
         }
         if(d.sticky)
         {
            return - strcmp(d.id, c.id)
         }
         else
         {
            return strcmp(d.lastpost[2], c.lastpost[2])
         }
      }
   }
   ], getItemLink : function(a)
   {
      return(Browser.ie ? "http://" + location.hostname : "") + "/forums&topic=" + a.id + (a.lastpost[1] == 1 ? "&p=" + a.lastpost[2] : "")
   }
}
;
Listview.templates.forumspost =
{
   sort : [], mode : 2, nItemsPerPage : - 1, hideBands : 1 | 2, poundable : 2, columns : [], compute : function(q, X, W)
   {
      var e = (g_user.roles & U_GROUP_MODERATOR) != 0, L = e || (g_pageInfo.locked == 0 && q.user.toLowerCase() == g_user.name.toLowerCase() && ! g_user.forumban), D = L && ! q.op, Z = 0, z = g_users[q.user], c = 0, h = 0, Y = 0, w = null;
      if(g_pageInfo.blog && q.op && (g_user.roles & U_GROUP_MODERATOR))
      {
         L = true
      }
      if(W == 0)
      {
         X.style.paddingTop = "6px"
      }
      if(z != null)
      {
         if(g_customColors[q.user])
         {
            w = g_customColors[q.user]
         }
         else
         {
            if(z.roles & U_GROUP_ADMIN)
            {
               c = 1
            }
            else
            {
               if(z.roles & U_GROUP_GREEN_TEXT)
               {
                  h = 1
               }
               else
               {
                  if(z.roles & U_GROUP_VIP)
                  {
                     Y = 1
                  }
               }
            }
         }
         if( ! g_pageInfo.blog || ! q.op)
         {
            Z = 1
         }
      }
      var V = ce("div");
      var g = ce("div");
      var p = ce("div");
      var r = ce("em");
      var u = ce("div");
      q.divPost = p;
      q.divLinks = r;
      q.divBody = u;
      V.className = "forums-post-wrapper"; V.id = "p" + q.id; g.className = "forums-post-container forums-post-container" + (W % 2); var o = ce("div");
      o.className = "forums-post-topcorners"; ae(o, ce("div")); ae(o, ce("p"));
      ae(g, o);
      if( ! this.blog)
      {
         var A = ce("div");
         A.className = "forums-post-userinfo"; if(z != null && z.avatar)
         {
            ae(A, Icon.createUser(z.avatar, z.avatarmore, 2, null, ((z.roles & U_GROUP_PREMIUM) && ! (z.border))))
         }
         var T = ce("p");
         var S = ce("a");
         S.href = "/user=" + q.user;
         ae(S, ct(q.user));
         ae(T, S);
         if(z != null && (z.roles & U_GROUP_PREMIUM))
         {
            z.title = LANG.premium_title
         }
         if(z != null && z.title != null)
         {
            ae(T, ce("br"));
            ae(T, ct("<" + z.title + ">"))
         }
         var Q = ce("p");
         if(z != null)
         {
            ae(Q, ct(LANG.lvtopic_joined));
            var J = ce("span");
            var m = new Date(z.joined), R = (g_serverTime - m) / 1000;
            Listview.funcBox.coFormatDate(J, R, m);
            ae(Q, J);
            ae(Q, ce("br"));
            ae(Q, ct(LANG.lvtopic_posts + number_format(z.posts))); if(z.roles > 0)
            {
               var K = 0;
               for(var U = 1; U <= 9; ++ U)
               {
                  if(z.roles & (1 << (U - 1)))
                  {
                     ++ K
                  }
               }
               if(K > 0)
               {
                  ae(Q, ce("br"));
                  ae(Q, ct((K != 1 ? LANG.lvtopic_roles : LANG.lvtopic_role)));
                  K = 0;
                  for(var U = 1; U <= 32; ++ U)
                  {
                     if(z.roles & (1 << (U - 1)))
                     {
                        if(K ++ > 0)
                        {
                           ae(Q, ct(LANG.comma))
                        }
                        if(U == 9)
                        {
                           if( ! g_user.premium)
                           {
                              var H = ce("a");
                              ae(H, ct(g_user_roles[U]));
                              H.href = "/premium";
                              ae(Q, H)
                           }
                           else
                           {
                              ae(Q, ct(g_user_roles[U]))
                           }
                        }
                        else
                        {
                           ae(Q, ct(g_user_roles[U]))
                        }
                     }
                  }
               }
            }
            ae(T, Q)
         }
         ae(A, T);
         ae(g, A)
      }
      p.className = "forums-post"; if(this.blog)
      {
         p.className += " forums-post-blog"
      }
      var d = ce("p");
      d.className = "forums-post-dateline"; var F = 0; if(L)
      {
         var b = ce("span");
         var I = ce("a");
         if(g_pageInfo.blog && q.op)
         {
            I.href = "/edit=blog&id=" + g_pageInfo.topic
         }
         else
         {
            I.href = "javascript:;";
            I.onclick = Listview.funcBox.coEdit.bind(this, q, - 1)
         }
         ae(I, ct(LANG.lvtopic_edit));
         ae(b, I);
         ae(r, b);
         F = 1
      }
      if(D)
      {
         var s = ce("span");
         if(F)
         {
            ae(s, ct("|"))
         }
         var y = ce("a");
         y.href = "javascript:;";
         y.onclick = Listview.funcBox.foDelete.bind(this, q);
         ae(y, ct(LANG.lvtopic_delete));
         ae(s, y);
         ae(r, s);
         F = 1
      }
      if(Z)
      {
         var E = ce("span");
         if(F)
         {
            ae(E, ct("|"))
         }
         var l = ce("a");
         ae(l, ct(LANG.lvcomment_report));
         if(q.op && g_pageInfo)
         {
            q.sticky = g_pageInfo.sticky
         }
         l.onclick = ContactTool.show.bind(ContactTool,
         {
            mode : 2, post : q
         }
         );
         l.className = "report";
         l.href = "javascript:;";
         g_addTooltip(l, LANG.report_tooltip, "q2");
         ae(E, l);
         ae(r, E);
         F = 1
      }
      if((g_pageInfo.locked == 0 && ! g_user.forumban) || e)
      {
         if( ! g_pageInfo.blog || (g_pageInfo.blog && ! q.op))
         {
            var N = ce("span");
            if(F)
            {
               ae(N, ct("|"))
            }
            var P = ce("a");
            if(g_user.id > 0)
            {
               P.href = "javascript:;";
               P.onclick = fo_goToNewPost.bind(P, 1, q)
            }
            else
            {
               P.href = "/account=signin"
            }
            ae(P, ct(LANG.lvtopic_quote));
            ae(N, P);
            ae(r, N);
            F = 1
         }
         var k = ce("span");
         if(F)
         {
            ae(k, ct("|"))
         }
         var n = ce("a");
         if(g_user.id > 0)
         {
            n.onclick = fo_goToNewPost.bind(n, 1);
            n.href = "#post-reply"
         }
         else
         {
            n.href = "/account=signin"
         }
         ae(n, ct(LANG.lvtopic_reply));
         ae(k, n);
         ae(r, k)
      }
      ae(d, r);
      var v = ce("var");
      ae(v, ct(LANG.lvtopic_by));
      S = ce("a");
      S.href = "/user=" + q.user;
      ae(S, ct(q.user));
      ae(v, S);
      ae(v, ct(" "));
      var a = ce("a");
      a.className = "q0";
      a.href = "#p" + q.id;
      var B = new Date(q.date), R = (g_serverTime - B) / 1000;
      Listview.funcBox.coFormatDate(a, R, B, 1);
      a.style.cursor = "pointer";
      ae(v, a);
      ae(v, ct(sprintf(LANG.lvcomment_patch, g_getPatchVersion(B))));
      if(this.blog && z != null && z.avatar)
      {
         var f = Icon.createUser(z.avatar, z.avatarmore, 0, null, ((z.roles & U_GROUP_PREMIUM) && ! (z.border)));
         if( ! Browser.ie6)
         {
            f.style.marginRight = "3px"
         }
         f.style.cssFloat = f.style.styleFloat = "left";
         ae(d, f);
         v.style.lineHeight = "26px"
      }
      ae(d, v);
      ae(p, d);
      u.className = "forums-post-body text"; if(w)
      {
         u.className += " comment-" + w
      }
      else
      {
         if(c)
         {
            u.className += " comment-blue"
         }
         else
         {
            if(h)
            {
               u.className += " comment-green"
            }
            else
            {
               if(Y)
               {
                  u.className += " comment-gold"
               }
            }
         }
      }
      var M = Markup.CLASS_USER;
      if(z && z.roles)
      {
         M = Markup.rolesToClass(z.roles)
      }
      u.innerHTML = Markup.toHtml(q.body,
      {
         allow : M, roles : z ? z.roles : null, uid : q.id
      }
      );
      ae(p, u);
      if(z == null || ! (z.roles & U_GROUP_STAFF) || (g_user.roles & U_GROUP_STAFF))
      {
         var O = ce("div");
         q.divLastEdit = O;
         O.className = "comment-lastedit";
         ae(O, ct(LANG.lvtopic_lastedit));
         var t = ce("a");
         ae(t, ct(" "));
         ae(O, t);
         ae(O, ct(" "));
         var J = ce("span");
         ae(O, J);
         ae(O, ct(" "));
         ae(p, O);
         Listview.funcBox.coUpdateLastEdit(q)
      }
      if( ! this.blog && z != null && z.sig != null)
      {
         var C = ce("div");
         C.className = "forums-post-sig"; if(w)
         {
            C.className += " comment-" + w
         }
         else
         {
            if(c)
            {
               C.className += " comment-blue"
            }
            else
            {
               if(h)
               {
                  C.className += " comment-green"
               }
               else
               {
                  if(Y)
                  {
                     C.className += " comment-gold"
                  }
               }
            }
         }
         C.innerHTML = Markup.toHtml(z.sig,
         {
            allow : M, mode : Markup.MODE_SIGNATURE, uid : (q.id + "-sig")
         }
         );
         ae(p, C)
      }
      ae(g, p);
      var G = ce("div");
      G.className = "clear";
      ae(g, G);
      ae(V, g);
      var x = ce("div");
      x.className = "forums-post-bottomcorners"; ae(x, ce("div"));
      ae(x, ce("p"));
      ae(g, x);
      ae(X, V)
   }
}
;
Listview.templates.forumpostpreview =
{
   sort : [3], nItemsPerPage : 75, columns : [
   {
      id : "subject", name : LANG.subject, align : "left", value : "subject", compute : function(c, f)
      {
         var b = ce("a");
         b.style.fontFamily = "Verdana, sans-serif";
         if(c.blog)
         {
            $(b).addClass("icon-blog")
         }
         b.href = this.template.getItemLink(c);
         ae(b, ct(c.subject));
         ae(f, b);
         var e = ce("div");
         e.className = "small";
         b = ce("a");
         b.className = "q1";
         if(c.blog)
         {
            b.href = "/forums&board=" + c.board
         }
         ae(b, ct(LANG.foboards[c.board]));
         ae(e, b);
         ae(f, e)
      }
   }
   ,
   {
      id : "preview", name : LANG.preview, align : "left", width : "50%", value : "preview", compute : function(c, f)
      {
         var e = ce("div");
         e.className = "crop";
         ae(e, ct(Markup.removeTags(c.preview,
         {
            mode : Markup.MODE_ARTICLE, uid : c.id
         }
         )));
         ae(f, e);
         if(c.user)
         {
            e = ce("div");
            e.className = "small3";
            ae(e, ct(LANG.lvtopic_by));
            var b = ce("a");
            b.href = "/user=" + c.user;
            ae(b, ct(c.user));
            ae(e, b);
            ae(f, e)
         }
      }
   }
   ,
   {
      id : "posted", name : LANG.posted, width : "16%", value : "elapsed", compute : function(b, e)
      {
         var a = new Date(b.date), d = (g_serverTime - a) / 1000;
         var c = ce("span");
         Listview.funcBox.coFormatDate(c, d, a, 0, 1);
         ae(e, c)
      }
   }
   ], getItemLink : function(a)
   {
      if(a.offset)
      {
         var b = Math.ceil((a.offset + (a.blog ? 0 : 1)) / 20);
         if(a.blog)
         {
            return"/blog=" + a.topic + (b > 1 ? "." + b : "") + "#p" + a.id
         }
         else
         {
            return"/forums&topic=" + a.topic + (b > 1 ? "." + b : "") + "#p" + a.id
         }
      }
      else
      {
         if(a.blog)
         {
            return"/blog=" + a.topic
         }
         else
         {
            return"/forums&topic=" + a.topic
         }
      }
   }
}
;
Listview.funcBox.foDelete = function(a)
{
   if(confirm(LANG.confirm_deletepost))
   {
      new Ajax("/forums=deletepost&id=" + a.id); this.deleteRows([a]);
      alert(LANG.message_postdeleted + " " + LANG.message_allow5min)
   }
}
;
Listview.funcBox.beforeTopics = function()
{
   function a(g, f, h, e)
   {
      var d = this.getCheckedRows();
      if( ! d.length)
      {
         alert("No topics selected.")
      }
      else
      {
         if(g == null || confirm("Are you sure you want to " + g + " " + (d.length == 1 ? "this topic" : "these " + d.length + " topics") + "?"))
         {
            var b = "", c = 0;
            array_walk(d, function(i)
            {
               if(e == null || e(i))
               {
                  b += i.id + ",";
                  ++ c
               }
            }
            );
            b = rtrim(b, ",");
            if(b != "")
            {
               new Ajax("/forums=" + f + "&id=" + b); if(h)
               {
                  this.deleteRows(d)
               }
            }
            alert(c + " topic" + (c == 1 ? "" : "s") + " affected." + (c > 0 ? "\n\nPlease allow up to 5 minutes for this to take effect." : "")); (Listview.cbSelect.bind(this, false))()
         }
      }
   }
   if(g_user.roles & U_GROUP_MODERATOR)
   {
      this.mode = 1;
      this.hideBands = null;
      this.createCbControls = function(j)
      {
         var e = ce("input"), h = ce("input"), c = ce("input"), g = ce("input"), i = ce("select");
         e.type = h.type = c.type = g.type = "button";
         e.value = "Delete";
         h.value = "Rename";
         c.value = "Lock";
         g.value = "Unlock";
         e.onclick = a.bind(this, "delete", "deletetopic&deleted=1", 1, function(d)
         {
            if( ! d.blog || (g_user.roles & U_GROUP_ADMIN))
            {
               return 1
            }
         }
         );
         c.onclick = a.bind(this, "lock", "locktopic&locked=1", 0, function(d)
         {
            if(( ! d.blog || (g_user.roles & U_GROUP_ADMIN)) && ! d.locked)
            {
               d.locked = 1;
               return 1
            }
         }
         );
         g.onclick = a.bind(this, "unlock", "locktopic&locked=0", 0, function(d)
         {
            if(( ! d.blog || (g_user.roles & U_GROUP_ADMIN)) && d.locked)
            {
               d.locked = null;
               return 1
            }
         }
         );
         h.onclick = (function()
         {
            var d = this.getCheckedRows();
            if( ! d.length)
            {
               alert("You might want to pick a topic to rename.")
            }
            else
            {
               if(d.length > 1)
               {
                  alert("You may only rename one topic at a time.")
               }
               else
               {
                  fo_RenameTopic2(d[0].subject, d[0].id)
               }
            }
            (Listview.cbSelect.bind(this, false))()
         }
         ).bind(this);
         i.onchange = (function(l)
         {
            var d = l.options[l.selectedIndex].value;
            l.selectedIndex = 0;
            (a.bind(this, "move", "movetopic&board=" + d, 1, function(m)
            {
               return 1
            }
            ))()
         }
         ).bind(this, i);
         var f = ce("option");
         ae(f, ct("Move to..."));
         f.style.color = "#bbbbbb";
         ae(i, f);
         fo_addOptBoards(i, mn_forums, g_pageInfo.board); ae(j, e); ae(j, h); ae(j, c);
         ae(j, g);
         var k = ce("input"), b = ce("input");
         k.type = b.type = "button";
         k.value = "Stick";
         b.value = "Unstick";
         k.onclick = a.bind(this, "stick", "sticktopic&sticky=1", 0, function(d)
         {
            if(( ! d.blog || (g_user.roles & U_GROUP_ADMIN)) && ! d.sticky)
            {
               d.sticky = 1;
               return 1
            }
         }
         );
         b.onclick = a.bind(this, "unstick", "sticktopic&sticky=0", 0, function(d)
         {
            if(( ! d.blog || (g_user.roles & U_GROUP_ADMIN)) && d.sticky)
            {
               d.sticky = null;
               return 1
            }
         }
         );
         ae(j, k);
         ae(j, b);
         ae(j, i)
      }
   }
}
;
function fo_addOptBoards(h, b, c, d, j)
{
   for(var e = 0, f = b.length; e < f; ++ e)
   {
      if(b[e][0] == null)
      {
         continue
      }
      if(j && b[e][4] && b[e][4].requiredAccess)
      {
         continue
      }
      if(b[e][4] && b[e][4].requiredAccess && ! (g_user.roles & b[e][4].requiredAccess))
      {
         continue
      }
      if(b[e][3] != null)
      {
         var g = ce("optgroup");
         g.label = b[e][1];
         fo_addOptBoards(g, b[e][3], c, d);
         ae(h, g)
      }
      else
      {
         if(b[e][0] != c)
         {
            var a = ce("option");
            a.value = b[e][0];
            if(b[e][0] == d)
            {
               a.selected = true
            }
            ae(a, ct(b[e][1]));
            ae(h, a)
         }
      }
   }
}
function fo_getForumPath(f, d, b)
{
   if( ! b)
   {
      b = "3,3,"
   }
   for(var c = 0, a = f.length; c < a; ++ c)
   {
      if(f[c][0] == null)
      {
         if(c != 0)
         {
            break
         }
         else
         {
            continue
         }
      }
      if(f[c][3] != null)
      {
         var e = fo_getForumPath(f[c][3], d, b + f[c][0] + ",");
         if(e)
         {
            return e
         }
      }
      else
      {
         if(f[c][0] == d)
         {
            return b + f[c][0]
         }
      }
   }
}
function fo_validateForm(c, d)
{
   if(d == 0)
   {
      var b = c.elements.subject;
      if(trim(b.value).length < 1)
      {
         alert(LANG.message_topicsubject);
         b.focus();
         return false
      }
   }
   var a = c.elements.body;
   if( ! Listview.funcBox.coValidate(a, d))
   {
      return false
   }
   if( ! g_requireCaptcha())
   {
      return true
   }
   if(c.elements.captcha.value.length == 5)
   {
      return true
   }
   else
   {
      alert(LANG.message_codenotentered);
      c.elements.captcha.focus();
      return false
   }
   return true
}
function fo_goToNewPost(d, b)
{
   var c = document.forms.newtopic; if(this.href == "javascript:;")
   {
      if(d == 0)
      {
         location.replace("#new-topic")
      }
      else
      {
         location.replace("#post-reply")
      }
   }
   if(c)
   {
      var a = gE(c, "textarea")[0];
      if(d == 1 && b != null && b.user != null && b.body != null)
      {
         a.value += "[quote " + b.user + "]" + b.body + "[/quote]\n\n";
         g_setCaretPosition(a, a.value.length)
      }
      setTimeout((function()
      {
         this.focus()
      }
      ).bind(a), 25)
   }
}
function fo_RenameTopic()
{
   var a = fo_RenameTopic2(g_pageInfo.subject, g_pageInfo.topic);
   if(a != "")
   {
      g_pageInfo.subject = a
   }
}
function fo_RenameTopic2(b, a)
{
   var c = prompt(LANG.prompt_renametopic, b);
   if(c != null)
   {
      c = trim(c);
      if(c.length >= 1)
      {
         if(c.length >= 100)
         {
            alert(LANG.message_subjectlimit)
         }
         else
         {
            if(c != b)
            {
               new Ajax("/forums=renametopic&id=" + a,
               {
                  method : "POST", params : "subject=" + urlencode(c)
               }
               );
               alert(LANG.message_topicrenamed + "\n\n" + LANG.message_allow5min);
               return c
            }
         }
      }
   }
   return""
}
function fo_LockTopic(a)
{
   a = a ? 0 : 1;
   if(confirm(a ? "Are you sure you want to lock this topic?" : "Are you sure you want to unlock this topic?"))
   {
      new Ajax("/forums=locktopic&locked=" + a + "&id=" + g_pageInfo.topic);
      alert((a ? LANG.message_topiclocked : LANG.message_topicunlocked) + "\n\n" + LANG.message_allow5min)
   }
}
function fo_DeleteTopic(a)
{
   a = a ? 0 : 1;
   if(confirm(a ? "Are you sure you want to delete this topic?" : "Are you sure you want to undelete this topic?"))
   {
      new Ajax("/forums=deletetopic&deleted=" + a + "&id=" + g_pageInfo.topic);
      alert((a ? LANG.message_topicdeleted : LANG.message_topicundeleted) + "\n\n" + LANG.message_allow5min)
   }
}
function fo_StickyTopic(a)
{
   a = a ? 0 : 1;
   if(confirm(a ? "Are you sure you want to stick this topic?" : "Are you sure you want to unstick this topic?"))
   {
      new Ajax("/forums=sticktopic&sticky=" + a + "&id=" + g_pageInfo.topic);
      alert((a ? "This topic is now a sticky." : "This topic is no longer a sticky.") + "\n\n" + LANG.message_allow5min)
   }
}
function fo_MoveTopic(c)
{
   if( ! c.selectedIndex)
   {
      return
   }
   var b = c.options[c.selectedIndex];
   if(confirm("Are you sure you want to move this topic to " + b.text + "?"))
   {
      new Ajax("/forums=movetopic&board=" + b.value + "&id=" + g_pageInfo.topic);
      alert("This topic has been moved to " + b.text + ".\n\n" + LANG.message_allow5min);
      PageTemplate.set(
      {
         breadcrumb : fo_getForumPath(mn_forums, b.value).split(",")
      }
      );
      ee(c);
      var a = ce("option");
      ae(a, ct("Move to..."));
      a.style.color = "#bbbbbb";
      ae(c, a);
      fo_addOptBoards(c, mn_forums, b.value)
   }
   c.selectedIndex = 0
}
;

