var click = false; var allowclick = false; function naviback(url){ if (history.length>0) history.back(); else goToURL(urlback);} function goToURL(url){ if (url) document.location.href=url;} function focusFForm(){ document.getElementById('imienazwisko').focus();} function hideMsg(){ document.getElementById('messageBox').style.visibility='hidden';} function menuMEvnt(id,img){ if (document.getElementById(id) && img) document.getElementById(id).src = img;} function sendFForm(){ if (click) return false; var info = ""; var p =/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; var f = document.getElementById('formFMessage'); if (!f.imienazwisko.value) info+=lang('\n- imię i nazwisko osoby kontaktowej','\n- name and surname of contact person'); if (!p.test(f.mail.value) && !f.telefon.value) info+=lang('\n- poprawny adres e-mail i/lub telefon','\n- valid e-mail address and/or telephone number'); if (!f.wiadomosc.value) info+=lang('\n- treść wiadomości','\n- message content'); if (!f.message.value) info+=lang('\n- nr klienta lub aktualny rok','\n- client ID or current year'); if (info) { info = lang("Wiadomość nie może zostać wysłana, ponieważ\nnie wszystkie wymagane pola zostały wypełnione.\n\nBrakujące informacje:" + info + ".\n\nProszę uzupełnić dane i ponownie wysłać wiadomość.","The message could not be sent because some required fields were left blank.\n\nMissing information:" + info + ".\n\nPlease fill out the data and send the message again."); alert (info); return false; } else {click = true; return true;}} function lang(pl,en){ if (_lng=='pl') return pl; else return en;} function debug(){ var obj = document.getElementById('debug'); var shd = document.getElementById('shd'); if (obj.style.display=='block'){ shd.innerHTML='Show Debuger'; obj.style.display='none';} else{ shd.innerHTML='Hide Debuger'; obj.style.display='block';}}