function checkmailnews() { if (!(/^[a-zA-Z][a-z0-9\-\_\.]{1,20}@[a-z0-9\-\_\.]{5,30}$/.test(document.getElementById("sendasknews").value))) { alert("Проверьте E-mail адрес!"); return false; } return true; } function currency() { window.open("tools_admin/admcurrency.php",'currency', 'width=550,height=200,status=no,toolbar=no,menubar=no,scrollbars=no'); } function chk() { if (document.getElementById("keyword").value == "") { alert('Введите ключевое слово!'); return false; } if (document.getElementById("keyword").value.length<=3) { alert('Введите более 3 символов!'); return false; } document.getElementById('searchForm').submit(); } function addservice(id) { window.open("tools_admin/admservice.php?action=addser&idpm="+id,'myWin', 'width=430,height=130,status=no,toolbar=no,menubar=no,scrollbars=no'); } function editservice(id) { window.open("tools_admin/admservice.php?action=editser&idmenu="+id,'myWin', 'width=430,height=130,status=no,toolbar=no,menubar=no,scrollbars=no'); } function addbranch(id) { window.open("tools_admin/admbranch.php?action=addbr&idpm="+id,'myWin', 'width=430,height=130,status=no,toolbar=no,menubar=no,scrollbars=no'); } function editbranch(id) { window.open("tools_admin/admbranch.php?action=editbr&idmenu="+id,'myWin', 'width=430,height=130,status=no,toolbar=no,menubar=no,scrollbars=no'); } function addpmenu(id) { window.open("tools_admin/editmenu.php?action=addme&idpm="+id,'myWin', 'width=450,height=150,status=no,toolbar=no,menubar=no,scrollbars=no'); } function editmenu(id) { window.open("tools_admin/editmenu.php?action=editmenu&idmenu="+id,'myWin', 'width=450,height=150,status=no,toolbar=no,menubar=no,scrollbars=no'); } function big(id) { window.open("building.php?id="+id,'building'+id, 'width=750,height=520,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes'); } function getAbsolutePos(el) { var r = { x: el.offsetLeft, y: el.offsetTop }; if (el.offsetParent) { var tmp = getAbsolutePos(el.offsetParent); r.x += tmp.x; r.y += tmp.y; } return r; }; function __dlg_init(bottom) { var body = document.body; var body_height = 0; if (typeof bottom == "undefined") { var div = document.createElement("div"); body.appendChild(div); var pos = getAbsolutePos(div); body_height = pos.y; } else { var pos = getAbsolutePos(bottom); body_height = pos.y + bottom.offsetHeight; } if (!document.all) { var x = opener.screenX + (opener.outerWidth - window.outerWidth) / 2; var y = opener.screenY + (opener.outerHeight - window.outerHeight) / 2; window.moveTo(x, y); window.innerWidth = body.offsetWidth + 5; window.innerHeight = body_height + 2; } else { var ch = body.clientHeight; var cw = body.clientWidth; var W = body.offsetWidth; var H = 2 * body_height - ch; var x = (screen.availWidth - W) / 2; var y = (screen.availHeight - H) / 2; window.moveTo(x, y); } }; setInterval("window.status='.:Silk Way Group:.'",10);