$.id=function(id){return document.getElementById(id)};function $E(tagName){return document.createElement(tagName)}
function errHighlight(el){el.style['border'] = '1px solid red';}
function errUnHighlight(el){el.style['border'] = '';}
function isInt(x){var y=parseInt(x);if(isNaN(y)) return false;return x==y && x.toString()==y.toString();}
function show(id){$('#' +id).show();if($.id(id).className.indexOf('hidden')>-1)
$.id(id).className = $.id(id).className.replace('hidden','');}
function hide(id){$('#' +id).hide();}
function pleasewait(add2element){$(add2element).append($('<span>Please wait</span>').addClass('pleasewait'));}
jQuery.preloadImages=function(){for(var i=0;i<arguments.length; i++){jQuery("<img>").attr("src", arguments[i]);}}
var update_wait_seconds=20;function _loopUpdateMessageAlert(){if(typeof uidh == 'undefined')
uidh=null;$('#messagealertwrapper').load('getLatestMessageAlert', {uidh:uidh});uidh=null;setTimeout(function(){_loopUpdateMessageAlert()}, update_wait_seconds*1000);update_wait_seconds+=3;}
function __hide_utility_menu(event){$('#utility').hide(500);setTimeout(function(){$('#content-wrap').css('background','white');$('#content').css('margin','0 23px 0 23px');}, 500);return false;}
$(function(){if($('#messagealertwrapper').size()){setTimeout(function(){_loopUpdateMessageAlert()}, 200);}
$('form.pleasewait').bind('submit', function(){pleasewait(this);});
$('input.inputerror').bind('change', function(){$(this).removeClass('inputerror');});
$('#utility').append($('<a href="./?DONT_SHOW_UTILITY_MENU=1">&lt;&lt;&lt;hide menu</a>').
attr('id','utility-menu-hider').
click(__hide_utility_menu).
attr('title',"Reload to get the menu back"));$('input[name="title"]','#page-feedback-form').val(document.title);
$('form#page-feedback-form').bind('submit', function(){if(!$('textarea', this).val()){alert("Comment missing");return false;}
pleasewait(this);return true;});
$('a#feedback-form-opener').click(function(){$('form#page-feedback-form:hidden').show();$(this).hide();
$('a#feedback-form-closer').show();window.scrollTo(0, parseInt($('form#page-feedback-form').position().top));return false;});
$('a#feedback-form-closer').click(function(){$('form#page-feedback-form:visible').hide();$(this).hide();
$('a#feedback-form-opener').show();return false;});
$('abbr.date').bind('mouseover', function(){var e=$(this);var t=e.text();var i=e.attr('title');e.attr('title', t).text(i);}).bind('mouseout', function(){var e=$(this);var t=e.text();var i=e.attr('title');e.attr('title', t).text(i);});});