var click = false; var LOffest = 208; var dlg = new Array ('Cześć!', 'Co słychać?', 'Pogoda paskudna... ;-(','...do dupy z robą
w taki dzień...'); var nrd=0; var mID; function startInterview2() { document.getElementById('dymek1').style.display='block'; document.getElementById('msg1').innerHTML = "Yo!"; mID = window.setInterval("dialog()", 1000); } function dialog2() { t = dlg[nrd]; document.getElementById('msg1').innerHTML = t; nrd++; if (nrd>dlg.length) { nrd=0; window.clearInterval(mID); document.getElementById('dymek1').style.display='none'; } } function hideMsg(){ document.getElementById('messageBox').style.visibility='hidden';} function menuMEvnt(id,img){ if (document.getElementById(id) && img) document.getElementById(id).src = img;} function goToURL(url){ if (url) document.location.href=url;} function sendKForm(){ 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.forms['formFMessage']; if (!f.imienazwisko.value) {if (_lng=='pl') info+='\n- nadawca wiadomości'; else info+='\n- sender';} if (!f.telefon.value) {if (_lng=='pl') info+='\n- numer telefonu'; else info+='\n- empty phone number';} if (!p.test(f.mail.value)) {if (_lng=='pl') info+='\n- poprawny adres e-mail'; else info+='\n- empty or invalid e-mail address';} if (!f.uwagi.value) {if (_lng=='pl') info+='\n- treść wiadomości'; else info+='\n- empty message';} if (info) { if (_lng=='pl') info = "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ść."; else info = "Your message could not be sent because of required fields are not valid:\n" + info + ".\n\nPlease, fill in the mandatory fields and send the form again."; alert (info); } else {click = true; f.submit();}} function scrollBack(){ window.scrollTo(0,0)} function scrollToID(o){ if (o){ obj = document.getElementById(o); x = findPosX(obj)-LOffest; window.scrollTo(x,0) }} function skroluj(){ o = self.document.location.hash.substring(1); if (o){obj = document.getElementById(o); x = findPosX(obj)-LOffest; window.scrollTo(x,0) }} function findPosX(obj){ var curleft = 0; if (obj.offsetParent){ while (1) { curleft += obj.offsetLeft; if (!obj.offsetParent){ break; } obj = obj.offsetParent; } } else if (obj.x){ curleft += obj.x; return curleft; } return curleft; } function findPosY(obj){ var curtop = 0; if(obj.offsetParent) while(1) { curtop += obj.offsetTop; if(!obj.offsetParent) break; obj = obj.offsetParent; } else if(obj.y) curtop += obj.y; return curtop; }