function PopupImage(img,szer,wys) {
    tytul="ADRIA - Impresariat Artystyczny";
    var szer1 = parseInt(szer) + 20;
    var wys1 = parseInt(wys) + 22;
    szer1 = (szer1 < screen.availWidth) ? szer1 : screen.availWidth;
    wys1 = (wys1 < screen.availHeight) ? wys1 : screen.availHeight;
    var winl = (screen.availWidth - szer1) / 2;
    var wint = (screen.availHeight - wys1) / 2;

    w=window.open("","","width="+szer1+",height="+wys1+",top="+wint+",left="+winl+",toolbar=no,scrollbars=yes,resizable=no,status=no,location=no,menubar=no,");

    w.document.write("<HTML><HEAD><meta http-equiv='content-type' content='text/html;  charset=utf-8' /><TITLE>"+tytul+"</TITLE>");
    w.document.write("<style><!-- table { background: url(/img/wait.gif) 50% 50% no-repeat white; margin: 0; padding: 0;color: #aaaaaa; font-family: verdana, sans-serif; font-size: 8pt; } //--> </style></head><body scroll='no' style='margin: 0; padding: 0;' bgcolor='#ffffff'><table cellspacing='0' cellpadding='0' align='center' valign='middle' width='100%' height='100%'><tr><td class='img' width='100%' height='100%' align='center' valign='middle'><div style='border-top: 1px solid #cccccc; border-bottom: 1px solid #cccccc; margin: auto;' ><a href=\"javascript:self.close();\"><img	style='cursor: pointer; cursor: hand; border: 10px solid white;' galleryimg='no' src='"+ img +"' alt=\"click to close\" /></a></div></td></tr></table>");
    w.document.write("</BODY></HTML>");
    w.document.close();
}

function newsletter(which) {
    var pass=true;
    if (which.adres.value=='') {
        alert("W polu ADRES nie został wpisany adres email!!!");
        which.adres.focus();
        return false;
    } else if (mail_check(which.adres.value)==false) {
        alert("Podany adres e-mail jest nieprawidłowy!!!");
        which.adres.value="";
        which.adres.focus();
        return false;
    } else
    return true;
}

function mail_check(str) {
	var re = new RegExp(/^[\w\-\.&]+@([a-z0-9\-]+\.)+[a-z]{2,4}$/);
	if (re.test(str))  { return true; }
	else return false;
}

