//Cookies Start function get_cookie(Name) { var search = Name + "=" var returnvalue = ""; if (document.cookie.length > 0) { offset = document.cookie.indexOf(search) if (offset != -1) { offset += search.length end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; returnvalue=unescape(document.cookie.substring(offset, end)) } } return returnvalue; } function set_cookie(cook_name,cook_value) { var exp = new Date(); var cook_time = exp.getTime() + (365*24*60*60*1000); exp.setTime (cook_time); document.cookie=cook_name+'=' + cook_value + '; expires=' + exp.toGMTString() + '; path=/; domain=' + location.host + ';'; } //Cookies End //MChat Start function MChat() { var myname_cook='FPMChat'; myname_value=get_cookie(myname_cook); if(myname_value == '1') window.onload = MChat_open; } MChat(); function MChat_open() { openLayerB('MChat',0,'/mchat.xml','Мини-Чат','270','150','1','','',0,'center'); var scrw=(window.innerWidth ? window.innerWidth : (document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.offsetWidth)); var scrh=(window.innerHeight ? window.innerHeight : (document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.offsetHeight)); document.getElementById('outLayerMChat').style.left = scrw - 270 - 15; //document.getElementById('outLayerMChat').style.top = 0; return false; } //MChat End