function currency() { window.open("tools_admin/admcurrency.php",'currency', 'width=550,height=250,status=no,toolbar=no,menubar=no,scrollbars=yes'); } function weather() { window.open("tools_admin/admweather.php",'weather', 'width=650,height=280,status=no,toolbar=no,menubar=no,scrollbars=yes'); } function testeditdata(frm) { if (frm.reg_name.value!='' && frm.reg_login.value!='' && frm.reg_email.value!='' && frm.reg_lastname.value!='') { frm.submit(); } else { alert("Заполните все обязательные поля!"); } } function answer(frm) { answer0 = 'document.getElementById("an'+frm+'").style.display'; answer1 = eval(answer0); if(answer1=="none"){ ans = 'document.getElementById("an'+frm+'").style.display=""'; eval(ans); } else { ans = 'document.getElementById("an'+frm+'").style.display="none"'; eval(ans); } } function testregdata(frm) { if (frm.reg_name.value!='' && frm.reg_login.value!='' && frm.reg_email.value!='' && frm.reg_lastname.value!='' && frm.reg_pwd.value!='' && frm.reg_cppwd.value!='') { if(frm.reg_pwd.value==frm.reg_cppwd.value){ frm.submit(); } else{ alert("Проверьте правильность ввода пароля!"); } }else { alert("Заполните все обязательные поля!"); } } function file(id) { window.open("uploadfilefor"+id+".html",'myFilePlus', 'width=450,height=210,status=no,toolbar=no,menubar=no,scrollbars=no'); } function checkfileupload() { name = document.getElementById('name').value; file = document.getElementById('file').value; if(file=='') { alert('Пожалуйста, выберете файл для загрузки'); return false; } } function testdata() { if(document.getElementById("firstname").value!='' && document.getElementById("email").value!='' && document.getElementById("lastname").value!='' && document.getElementById("txtmes").value!='') { document.getElementById("sendForm").submit(); }else { alert("Заполните все поля!"); } } 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 chk() { if (document.searchForm.keyword.value == "" || document.searchForm.keyword.value == "поиск по сайту...") { alert('Введите ключевое слово или фразу!'); return false; } if (document.searchForm.keyword.value.length<=2) { alert('Введите более 2 символов!'); return false; } return true; } function editsubuser(id) { window.open("tools_admin/editsub.php?action=editsubuser&id="+id,'myWin', 'width=450,height=170,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=190,status=no,toolbar=no,menubar=no,scrollbars=no'); } function addsecmenu(id) { window.open("tools_admin/editsecmenu.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=190,status=no,toolbar=no,menubar=no,scrollbars=no'); } function editsecmenu(id) { window.open("tools_admin/editsecmenu.php?action=editmenu&idmenu="+id,'myWin', 'width=450,height=150,status=no,toolbar=no,menubar=no,scrollbars=no'); } function addanswer(id) { window.open("tools_admin/admguest.php?action=addoneanswer&idquest="+id,'addanswer', 'width=450,height=365,status=no,toolbar=no,menubar=no,scrollbars=no'); } function editanswer(id) { window.open("tools_admin/admguest.php?action=editoneanswer&idquest="+id,'editanswer', 'width=450,height=375,status=no,toolbar=no,menubar=no,scrollbars=no'); } function addcat(id) { window.open("tools_admin/editcat.php?action=addcat&idcat="+id,'myWin', 'width=450,height=150,status=no,toolbar=no,menubar=no,scrollbars=no'); } function editcat(id) { window.open("tools_admin/editcat.php?action=editcat&idcat="+id,'myWin', 'width=450,height=144,status=no,toolbar=no,menubar=no,scrollbars=no'); } function addgoods(id) { window.open("tools_admin/editgoods.php?action=addgoods&idcat="+id,'addgoods', 'width=450,height=235,status=no,toolbar=no,menubar=no,scrollbars=no'); } function info(id) { window.open("infogoods.php?idgoods="+id,'infogoods', 'width=500,height=550,status=no,toolbar=no,menubar=no,scrollbars=no,resizable=yes'); } 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 checkmessage(frm) { if (frm.title.value!='' && frm.message.value!='') { frm.submit(); } else { alert("Заполните все поля!"); } }; function createwin(wname,name,w,h) { myWin= window.open(name, wname, 'location=0,menubar=0,toolbar=0,resizable=0,scrollbars=0,width='+w+',height='+h+''); myWin.focus(); } function checkaddphoto() { name = document.getElementById("name_foto").value; info = document.getElementById("info_foto").value; userfile2 = document.getElementById("userfile_big").value; if(name=='') { alert('Наименование обязательно.'); return false; } if(info=='') { alert('Описание обязательно.'); return false; } if(userfile2=='') { alert('Фотография обязательна.'); return false; } if((name!='') && (info!='') && (userfile2!='')){document.getElementById('addFotoForm').submit();} } function checkeditphoto() { name = document.getElementById("name_foto").value; info = document.getElementById("info_foto").value; if(name=='') { alert('Наименование обязательно.'); return false; } if(info=='') { alert('Описание обязательно.'); return false; } if((name!='') && (info!='')){document.getElementById('editFotoForm').submit();} } function createwinse(wname,name,w,h) { myWin= window.open(name, wname, 'scrollbars=yes,resizable=no,status=no,width='+w+',height='+h+''); myWin.focus(); }