function showPic(picfile)
{
    win=window.open("","corsario","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>WhiteSails.Eu</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'>loading...<br />copyright &copy; 2006 WhiteSails.Eu</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) && (form.firma.value.length<1))
    {
        alert("Prosz? wype?ni? pole 'Imi? i nazwisko' lub 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;
    }
    
    return true;
}

function checkValueForm(form)
{
    if ((form.nazwisko.value.length<1) && (form.firma.value.length<1))
    {
        alert("Prosz? wype?ni? pole 'Imi? i nazwisko' lub 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;
}
