function validateNS() {
        el = document.newsletter.elements["nlEmail"];
        if (el.value != "" && el.value.indexOf('@', 0) == -1 || el.value == "") {
                                alert ("Nieprawidłowy adres e-mail");
                                  return false;
        }
}

function openWindow(file,name,width,height) {
        t=window.open(file,name, 'toolbar=no,menubar=no,scrollbars=no,resizable=yes,status=no,location=no,directories=no,top=60, left=100,width='+width+',height='+height+'');
        t.focus();
}

function openWindowPrint(file,name,width,height) {
        t=window.open(file,name, 'toolbar=no,menubar=yes,scrollbars=yes, resizable=no,status=no,location=no,directories=no,top=60, left=100,width='+width+',height='+height+'');
        t.focus();
}

function dist(woj_id){
        document.forms.form1.elements.district.value=woj_id;
        document.forms.form1.elements.step.value='2';
        document.forms.form1.submit();
        document.forms.form1.elements.step.value='3';
}
function pla(place_id){
        document.forms.form2.elements.place.value=place_id;
        document.forms.form2.submit();
}

noweOkienko = null;

function openimage(src, w, h){
if(window.screen){
 aw=screen.availWidth;
 ah=screen.availHeight;
}else{
 aw=640;
 ah=450;
}
if(noweOkienko==null || noweOkienko.closed){
 ustawienia=
 "left=" + (aw-w)/2 + ","
 +"top=" + (ah-h)/2 + ","
 +"screenX=" + (aw-w)/2 + ","
 +"screenY=" + (ah-h)/2 + ","
 +"width=" + w + ","
 +"height=" + h + ","
 +"innerWidth=" + w + ","
 +"innerHeight=" + h + ","
 +"toolbar=no,"
 +"location=no,"
 +"directories=no,"
 +"status=no,"
 +"menubar=no,"
 +"scrollbars=no,"
 +"resizable=no"
 noweOkienko = window.open("",'obrazek',ustawienia);
}
noweOkienko.document.open();
noweOkienko.document.clear();
noweOkienko.document.write(
"<html><head>\n"
+"<style><!--\n"
+"body{background-repeat:no-repeat}\n"
+"--></style>\n"
+"<Title>[ Pamet ]</Title>"
+"</head>\n"
+"<body background=" + src + "></body>\n"
+"</html>"
);
noweOkienko.document.close();
noweOkienko.focus();
}
