// $Id: func.js 1004 2007-05-21 13:41:40Z aolejczuk $ // nowe okienko function noweOkno(url, nazwa, szerokosc, wysokosc) { x = (screen.width) ? (screen.width - szerokosc) / 2 : 0; y = (screen.height) ? (screen.height - wysokosc) / 2 : 0; window.open(url, nazwa, 'toolbar=0,location=0,directories=0,menubar=0,status=0,scrollbars=1,resizable=1,left=' + x + ',top=' + y + ',width=' + szerokosc + ',height=' + wysokosc); } function urlDodajSID(url) { if (nm_sid != '') url += (url.indexOf('?') == -1 ? '?' : '&') + nm_sid; return url; } // nowe okienko używane w kinach i sztukach function popWin(url, nazwa) { noweOkno(url, nazwa, 400, 400); } // nowe okienko ze zdjęciem function noweOknoZdjecie(dane, nazwa, szerokosc, wysokosc) { noweOkno('/zdjecie/' + dane + '.html', nazwa, szerokosc + 80, wysokosc + 140); } // nowe okienko z sądą function noweOknoSonda(id) { noweOkno(urlDodajSID('/sonda/okno/' + id + '.html') , 'kod', 300, 200); } // nowe okienko z kalendarzem function noweOknoKalendarz(formularz, pole, zmienne) { var adres = '/kalendarz/?formularz=' + formularz + '&pole=' + pole + '&' + zmienne; // pobieramy date z formularza adres += '&data=' + eval('document.' + formularz + '.' + pole + '_r.value') + '-' + eval('document.' + formularz + '.' + pole + '_m.value') + '-' + eval('document.' + formularz + '.' + pole + '_d.value'); noweOkno(adres, 'kalendarz', 250, 220); } // pokazywanie się nowego kienka zawsze na wierzchu function loadOnTop() { window.focus(); document.fidane.mfn.value = opener.document.sub_form.mfn.value; // document.fidane.lang.value = opener.document.sub_form.lang.value; document.fidane.polchrs.value = opener.document.sub_form.polchrs.value; } // do głosowania w sondach function sprawdzGlos(formularz, oknoKod) { var glos; for (var i = 0; i < formularz.glos.length; i++) if (formularz.glos[i].checked) { glos = formularz.glos[i].value; break; } if (glos == null) { alert('wybierz jedną z opcji'); } else if (oknoKod == 1) { noweOkno(urlDodajSID('/kod/?id=' + formularz.id.value + '&glos=' + glos), 'kod', 300, 200); } else { formularz.submit(); } } //dynamiczne zmiany na stronie function InfoKlient() { var userAgent; var przegladarki = new Array('opera','firefox','msie'); var nazwa,wersja,so; userAgent = navigator.userAgent; userAgent = userAgent.toLowerCase(); so = (userAgent.indexOf('windows') != -1) ? 'win' : 'other'; p_ix = -1; for(ix=0;ix 0) { for (lsi = 0; lsi < warstwy.length; lsi++) { this.listyRozwijalne(warstwy[lsi]); } } } this.listyRozwijalne = function(nazwa) { navRoot = document.getElementById(nazwa); for (i=0; i -1) { set_ad(); } }