var tipsEnabled=true;var passInputWasFocused=false;var UNDEF="undefined";function getActiveNode(){return tipsEnabled?$("tips_hide"):$("tips_show")}function $(a){return document.getElementById(a)}function checkSession(){var e=Math.round(Math.random()*1000000);var d="r="+e;if(window.pass_login){var d="r="+Math.round(Math.random()*1000000);var b=new Image();b.src=["monitoring.txt?fromMail=",fromMail,"&plogin=",window.pass_login,"&",d].join("");var c=document.location.href;var a=/\?/.test(c);if(!a){document.location.href=c+"?"+d}}return}function init(a){checkSession();tipsEnabled=(document.cookie.indexOf("mail-tips-disable")==-1);if(!a&&!passInputWasFocused){document.forms.MainLogin.login.focus()}var b=$("tuning");if(!b){return}b.className="tuning sys-font";getActiveNode().className="pseudo-link";if(!tipsEnabled){$("featuresCell").className="hidden";$("dignityCell").className="hidden"}$("tips_hide").onkeypress=switchTips;$("tips_hide").onclick=switchTips;$("tips_show").onkeypress=switchTips;$("tips_show").onclick=switchTips;return true}function inputPasswordFocus(){passInputWasFocused=true}function switchTips(a){if(tipsEnabled){$("featuresCell").className="hidden";$("dignityCell").className="hidden"}else{$("featuresCell").className="";$("dignityCell").className=""}getActiveNode().className="hidden";tipsEnabled=!tipsEnabled;if(!tipsEnabled){setCookie("mail-tips-disable",true,24*365*10)}else{delCookie("mail-tips-disable")}getActiveNode().className="pseudo-link";return true}function setCookie(b,d,e){if(d!=null&&d!=""){var c=b+"="+EncodeURIComponent(d)+";path=/";if(typeof(e)!=UNDEF){var a=new Date();a.setTime(a.getTime()+e*3600000);c+=";expires="+a.toGMTString()}document.cookie=c}}function getCookie(b){var c=document.cookie;var a=c.indexOf(b+"=");if(a==-1){return null}a=c.indexOf("=",a)+1;var d=c.indexOf(";",a);if(d==-1){d=c.length}return decodeURIComponent(c.substring(a,d))}function delCookie(b){var a=new Date();a.setTime(a.getTime()-3600000*24*365);document.cookie=b+"=value=;expires="+a.toGMTString()+";path=/"}function EncodeURIComponent(a){try{return encodeURIComponent(a)}catch(b){return escape(a)}}function r(c,b){var e=new Image();if(typeof c==="string"){e.src=c}else{var f=new Date().getTime();var d=c?c.href:document.location;e.src="http://clck.yandex.ru/click/dtype="+b+"/u="+f+"/*"+d}};