
function showPic(picfile)
{
    win=window.open("","masterform","width=500,height=200,scrollbars=no,titlebar=no,toolbar=no,location=no,menubar=no,status=no");
    win.moveTo(0,0);
    win.document.close();
    win.document.open();
    win.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">');
    win.document.write('<html xmlns="http://www.w3.org/1999/xhtml"><head>');
    win.document.write('<meta http-equiv="content-type" content="text/html; charset=ISO-8859-2" />');
    win.document.write("<title>Masterform.pl</title>");
    win.document.write("<style type='text/css'>");
    win.document.write("#ha1 {position: absolute; width: 500px; height: 200px; padding-top: 60px; background-color: #fff; text-align: center; font-size: 18px; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;}");
    win.document.write("body {background-color: #fff; margin: 0; padding: 0; overflow: hidden;}");
    win.document.write("img {position: absolute; left: 10px; top: 10px; border: 0; padding: 0; margin: 0; overflow: hidden; display: block; cursor: pointer;}");
    win.document.write("</style>");
    win.document.write("</head>");
    win.document.write("<body>");
    win.document.write("<img src='"+picfile+"' alt='' onload='this.style.top=\"10px\"; document.getElementById(\"ha1\").style.display=\"none\"; window.self.resizeTo(this.width+30, this.height+70); window.self.moveTo(Math.round((screen.availWidth-this.width)/2), Math.round((screen.availHeight-this.height)/2));' onclick='window.self.close();' />");
    win.document.write("<div id='ha1'>trwa ładowanie zdjęcia...<br />copyright &copy; 2005 Masterform.pl</div>");
    win.document.write("</body></html>");
    win.focus();
    win.document.close();
}

function checkContactForm(form)
{
    if (form.tresc.value.length<1)
    {
        alert("Nie wypełniono pola 'Treść'...");
        return false;
    }

    if (form.nazwisko.value.length<1)
    {
        alert("Proszę wypełnić pole 'Imię i nazwisko'");
        return false;
    }

    if (form.telefon.value.length<1)
    {
        alert("Proszę wypełnić pole 'Telefon'");
        return false;
    }
    if (form.firma.value.length<1)
    {
        alert("Proszę wypełnić pole 'Firma'");
        return false;
    }

    return true;
}

function checkValueForm(form)
{
    if ((form.nazwisko.value.length<1) && (form.firma.value.length<1))
    {
        alert("Proszę wypełnić pole 'Imię i nazwisko' i pole 'Firma'...");
        return false;
    }

    if ((form.telefon.value.length<1) && (form.email.value.length<1))
    {
        alert("Proszę wypełnić pole 'Telefon' lub pole 'Email'...");
        return false;
    }

    if (form.opis_firmy.value.length<1)
    {
        alert("Proszę opisać krótko swoją firmę/organizację ...");
        return false;
    }

    return true;
}
function checkKwestionariuszForm(form)
{
    if (form.kw_nazwisko.value.length<1)
    {
        alert("Nie wypełniono pola 'Nazwisko'...");
        return false;
    }

    if (form.kw_imie.value.length<1)
    {
        alert("Proszę wypełnić pole 'Imię'");
        return false;
    }

    if (form.kw_rodowe_matki.value.length<1)
    {
        alert("Proszę wypełnić pole 'Nazwisko rodowe matki'");
        return false;
    }
    if (form.kw_data_urodzenia.value.length<1)
    {
        alert("Proszę wypełnić pole 'Data urodzenia'");
        return false;
    }

    return true;
}