function ctrl_enter(B,A){if(((B.keyCode==13)||(B.keyCode==10))&&(B.ctrlKey)){window.onbeforeunload=null;A.submit();return false}}function addTag(A){var B=document.getElementById("tags");if(B.value!=""){B.value+=","}B.value+=A}var highLighted;function highLight(A){if(highLighted==A){return }if(highLighted){highLighted.className="msg"}highLighted=A;highLighted.className="msg highLighted"}function highlightMessage(B){var A=document.getElementById(B);if(A){highLight(A)}}function parseHash(){var A=location.hash.match(/^#([1-9]\d*)$/);if(A){highlightMessage(A[1])}}function jump(A){if(A&&A.href){document.location=A.href}}setInterval(parseHash,1000);$(document).ready(function(){var A={success:function(B){if($(B).find("error").length){alert($(B).find("error").text());window.location="/login.jsp"}else{if($(B).find("ok").length){window.location.reload()}}},dataType:"xml",error:function(B){alert("Error!  Status = "+B.status);window.location="/login.jsp"}};$("#regform").ajaxForm(A);if(navigator.userAgent.indexOf("Opera Mini")==-1){$("#loginbutton").bind("click",function(B){$("#regmenu").fadeOut("fast",function(){$("#regform").fadeIn("fast",function(){$("#regform input[name='nick']").focus()})});return false});$("#hide_loginbutton").bind("click",function(B){$("#regform").fadeOut("fast",function(){$("#regmenu").fadeIn("fast")});return false})}$("textarea").bind("keypress",function(B){ctrl_enter(B,B.target.form)});$("#commentForm").validate({messages:{msg:"Введите сообщение",title:"Введите заголовок"}})});hljs.initHighlightingOnLoad();