function ShowWin(url,x,y,name,isscrollbars) { var cx, cy; x=(x > screen.width * 0.7 ? screen.width * 0.7 : x); y=(y > screen.height * 0.7 ? screen.height * 0.7 : y); cx=screen.width/2-(x / 2); cy=screen.height/2-(y/2); isscrollbars=(isscrollbars=="no")?"no":"yes"; window.open(url,name,"toolbar=no,status=no,directories=no,menubar=no,resizable=yes,width="+x+",height="+y+",scrollbars="+isscrollbars+",top="+cy+",left="+cx); } function ShowWinS(url, x, y, scrl) { x=(x > screen.width * 0.7 ? screen.width * 0.7 : x); y=(y > screen.height * 0.7 ? screen.height * 0.7 : y); if(x == 0 || y == 0) return; var cx, cy, name; cx=screen.width/2 - (x/2); cy=screen.height/2-(y/2); name = getNameByDate(); window.open(url,name,"toolbar=no,status=no,directories=no,menubar=no,resizable=yes,width="+x+",height="+y+",scrollbars="+scrl+",top="+cy+",left="+cx); } function getNameByDate() { var s = ""; var d = new Date(); s += d.getFullYear(); s += (d.getMonth() + 1); s += d.getDate(); s += "_" + d.getHours(); s += d.getMinutes(); s += d.getSeconds(); return s; } var clientPC = navigator.userAgent.toLowerCase(); // Get client info var is_opera = ((clientPC.indexOf("mozilla") != -1) && (clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") != -1)); var is_ffox = ((clientPC.indexOf("mozilla") != -1) && (clientPC.indexOf("firefox") != -1)); var is_ie = ((clientPC.indexOf("mozilla") != -1) && (clientPC.indexOf("msie") != -1) && !is_opera && !is_ffox); var is_moz = ((clientPC.indexOf("mozilla") != -1) && !is_ie && !is_opera && !is_ffox); if(is_moz || is_ffox) { document.write(''); } function MyResize() { var max_with = 900; var tbm = document.getElementById("main"); if(tbm != '' && tbm != null) { var w_main = document.body.clientWidth < max_with ? document.body.clientWidth : max_with; tbm.width = w_main; tbm.style.width = w_main; SetCookie("w_main", w_main); }} function MyOnLoad() { // document.body.clientWidth; // MyResize(); } function SetCookie(sName, sValue) { var expiredays = 1; var todayDate = new Date(); todayDate.setTime(todayDate.getTime() + expiredays * 24 * 60 *60 *1000); document.cookie = sName + "=" + escape(sValue) + "; expires=" + todayDate.toGMTString()+"; path=/"; } var begun_auto_colors = new Array(); var begun_auto_fonts_size = new Array(); begun_auto_limit = 5; // число объявлений выводимых на площадке begun_auto_colors[0]='#6CBF0D'; // цвет ссылки объявлений // begun_auto_colors[0]='#EF6549'; begun_auto_colors[1]='#777777'; // цвет текста объявления begun_auto_colors[2]='#333333'; // цвет домена объявления begun_auto_colors[3]='#f8f8f8'; // цвет фона блока объявлений begun_auto_fonts_size[0]='12px'; // р-мер шрифта ссылки объявлений begun_auto_fonts_size[1]='11px'; // р-мер шрифта текста объявления begun_auto_fonts_size[2]='11px'; // р-мер шрифта домена объявления begun_auto_fonts_size[3]='9px'; // р-мер шрифта заглушки begun_block_type = 'Vertical'; // тип блока function ShowModal_Popup(id) { var obj = document.getElementById("id"+id+"_Popup"); if(obj) { obj.style.top = "-100px"; var sobj = document.getElementById("id"+id+"_Add"); if(sobj) sobj.value = "Y"; obj.style.visibility = 'visible'; } } function HideModal_Popup(id) { var obj = document.getElementById("id"+id+"_Popup"); if(obj) { obj.style.visibility = 'hidden'; } } function CheckFieldsModal_Popup(id) { var s, obj = document.getElementById("id"+id+"_Comments"); if(obj) { s = obj.value; obj.value = s = PrepareFieldsModal_Popup(s); if(s.length < 30) { alert("Укажите более развёрнутый текст сообщения!"); return false; } } obj = document.getElementById("id"+id+"_Name"); if(obj) { s = obj.value; obj.value = s = PrepareFieldsModal_Popup(s); if(s.length < 1) { alert("Укажите подпись (имя) !"); return false; } } return true; } function PrepareFieldsModal_Popup(s) { var re = /\x0A/ig; s = s.replace(re, "|"); re = /(\s*)(.*)(\s*)/ig; s = s.replace(re, "$2"); re = /\|+/ig; s = s.replace(re, "\n"); return s; }