function focus_input(input_name,message) { document.getElementById(input_name).focus(); window.scrollBy(0,-30); window.alert(message); } function send_rejestracja_form() { var f_user_login=document.getElementById('user_login').value; var f_user_password=document.getElementById('user_password').value; var f_user_password2=document.getElementById('user_password2').value; var f_nazwa=document.getElementById('nazwa').value; var f_miasto=document.getElementById('miasto').value; var f_kod=document.getElementById('kod').value; var f_ulica=document.getElementById('ulica').value; var f_tel=document.getElementById('tel').value; var f_email=document.getElementById('email').value; var f_terms=document.getElementById('terms').checked; var f_fotograf=document.getElementById('fotograf').checked; var f_www=document.getElementById('www').value; if (f_user_login=="") { focus_input("user_login","Wpisz login"); return false; } if (f_user_password=="") { focus_input("user_password","Wpisz hasło"); return false; } if (f_user_password2=="") { focus_input("user_password2","Powtórz hasło"); return false; } if (f_user_password!=f_user_password2) { focus_input("user_password2","Źle powtórzyłeś/aś hasło"); return false; } if (f_nazwa=="") { focus_input("nazwa","Nie wpisałeś/aś nazwy / imienia i nazwiska"); return false; } if (f_miasto=="") { focus_input("miasto","Nie wpisałeś/aś miasta"); return false; } if (f_kod=="") { focus_input("kod","Nie wpisałeś/aś kodu pocztowego"); return false; } if (f_ulica=="") { focus_input("ulica","Nie wpisałeś/aś ulicy"); return false; } if (f_tel=="") { focus_input("tel","Nie wpisałeś/aś telefonu kontaktowego"); return false; } if (f_email=="") { focus_input("email","Nie wpisałeś e-maila"); return false; } if (f_fotograf) { if (f_www=="") { focus_input("www","Wpisz adres swojej strony internetowej w celu weryfikacji"); return false; } } if (!f_terms) { focus_input("terms","Musisz oświadczyć iż zapoznałeś/aś się z warunkami regulaminu atofoto.pl"); return false; } return true; } function send_edytuj_profil_form() { var f_current_password=document.getElementById('current_password').value; var f_new_password=document.getElementById('new_password').value; var f_new_password2=document.getElementById('new_password2').value; var f_nazwa=document.getElementById('nazwa').value; var f_miasto=document.getElementById('miasto').value; var f_kod=document.getElementById('kod').value; var f_ulica=document.getElementById('ulica').value; var f_tel=document.getElementById('tel').value; var f_email=document.getElementById('email').value; if (f_nazwa=="") { focus_input("nazwa","Nie wpisałeś/aś nazwy / imienia i nazwiska"); return false; } if (f_miasto=="") { focus_input("miasto","Nie wpisałeś/aś miasta"); return false; } if (f_kod=="") { focus_input("kod","Nie wpisałeś/aś kodu pocztowego"); return false; } if (f_ulica=="") { focus_input("ulica","Nie wpisałeś/aś ulicy"); return false; } if (f_tel=="") { focus_input("tel","Nie wpisałeś/aś telefonu kontaktowego"); return false; } if (f_email=="") { focus_input("email","Nie wpisałeś/aś e-maila"); return false; } if (f_current_password!="") { if (f_new_password=="") { focus_input("new_password","Wpisz nowe hasło"); return false; } if (f_new_password2=="") { focus_input("new_password2","Powtórz nowe hasło"); return false; } if (f_new_password!=f_new_password2) { focus_input("new_password2","Źle powtórzyłeś/aś nowe hasło"); return false; } } return true; } function send_wyslij_wiadomosc_form() { var f_imie=document.getElementById('imie').value; var f_email=document.getElementById('email').value; var f_temat=document.getElementById('temat').value; var f_tresc=document.getElementById('tresc').value; if (f_imie=="") { focus_input("imie","Nie wpisałeś/aś imienia"); return false; } if (f_email=="") { focus_input("email","Nie wpisałeś/aś adresu e-mail"); return false; } if (f_temat=="") { focus_input("temat","Nie wpisałeś/aś tematu wiadomości"); return false; } if (f_tresc=="") { focus_input("tresc","Nie wpisałeś/aś treści wiadomości"); return false; } return true; } function show_admin_zamowienia(n) { document.getElementById('cbt39').style.display=''; document.getElementById('cbt40').style.display=''; document.getElementById('cbt42').style.display=''; document.getElementById('cbt39b').style.display='none'; document.getElementById('cbt40b').style.display='none'; document.getElementById('cbt42b').style.display='none'; document.getElementById('c39').style.display='none'; document.getElementById('c40').style.display='none'; document.getElementById('c42').style.display='none'; document.getElementById('cbt'+n).style.display='none'; document.getElementById('cbt'+n+'b').style.display=''; document.getElementById('c'+n).style.display=''; } function gotourl(link) { window.location.href=link; }