var toggleChatFrame=function(){$("#chatwindowframe").toggle();var a=$("#chatwindowframe").is(":visible");$.cookie("chatwindowframe",a,{expires:7,path:webadminPath});if(a){resizeChatWindow()}else{$("#chatwindowPadding").height(40)}return false};var resizeChatWindow=function(){var b=$("#chatwindowframe:visible");if(b.length==0){return}var a=$("#content",b[0].contentWindow.document.body).outerHeight();a=Math.min(a,200);b.height(a);$("#chatwindowPadding").height(a+40)};var chattoggled=false;var initToggleChat=function(){try{$("#chatwindowframe").toggle($.cookie("chatwindowframe")!="false");chattoggled=true}catch(a){}};initToggleChat();$(document).ready(function(){if(!chattoggled){initToggleChat()}$("body").append('<div id="chatwindowPadding"></div>');if(!$("#chatwindowframe").is(":visible")){$("#chatwindowPadding").height(40)}});