function open_window(link,w,h) {
                var win = "width="+w+",height="+h+",menubar=no,location=no,resizable=yes,scrollbars=yes";
                newWin = window.open(link,'newWin',win);
                newWin.focus();
        }
        function confirmDelete() { //подтверждение удаления пользователя
                temp = window.confirm('Are you sure you want to unsubscribe?');
                if (temp) { //удалить
                        window.location="index.phtml?killuser=yes";
                };
        }
        function validate() { // новости
                if (document.form1.email.value.length<1) {
                        alert("Please input your e-mail");
                        return false;
                };
                if (document.form1.email.value == 'Email') {
                        alert("Please input your e-mail");
                        return false;
                };
                return true;
        }
        function validate_disc() { // форма ввода сообщения
                if (document.formD.nick.value.length<1) {
                        alert("Please input your nickname");
                        return false;
                };

                if (document.formD.topic.value.length<1) {
                        alert("Please input post subject");
                        return false;
                };

                return true;
        }
        function validate_search() {

                if (document.Sform.price1.value!="" && ((document.Sform.price1.value < 0) || isNaN(document.Sform.price1.value))) {
                        alert("Price should be a positive number");
                        return false;
                };
                if (document.Sform.price2.value!="" && ((document.Sform.price2.value < 0) || isNaN(document.Sform.price2.value))) {
                        alert("Price should be a positive number");
                        return false;
                };

                return true;
        }

