function openwindow(sciezka, tytul, tytul_en, lang)
{   
    var cl;

    if (tytul_en != '' && lang != 'PL')
        tytul = tytul_en;

    if (tytul == '')
        tytul = '';
	
    if (lang == 'pl')
        cl = 'zamknij&nbsp;okno';
    else
        cl = 'close&nbsp;window';


    sciezka = "" + sciezka;
    if (sciezka.search(/\/$/gi) != -1)
        return;
    
    okno = window.open('','okienko','toolbar=no,status=no,menubar=no,scrollbars=no,location=no,directories=no,resizable=yes,width=640,height=480');
	okno.document.open();
	okno.document.write('<html>\n<head>\n<title>' + tytul + '</title>\n' + 
        '<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">\n' +
        '<link rel="stylesheet" href="style.css">\n' +
        '</head>\n<body>\n<center>\n' +
        '<br>\n<img style="border:black 1px solid;" src="' + sciezka + '" name="obrazek" onLoad="javascript:window.resizeTo(obrazek.width + 70, obrazek.height + 150);"><br>\n' +
        '<a href="javascript:window.close();">[' + cl + ']</a>\n' +
        '</center>\n</body>\n</html>');
	okno.document.close();
	okno.focus();
}

function multipleBasket()
{
	var cf = document.forms.length;

	var query = "";
	
	for (i=0;i<cf;i++)
	{
		if (document.forms[i].name=='f' && document.forms[i].quantity.value>0)
		{
			query += "foq["+i+"]="+document.forms[i].quantity.value+"&foc["+i+"]="+document.forms[i].code.value+"&";
		}
	}
	
	//alert(query);
	
	document.forms.tail_p.prod.value = query;
	document.forms.tail_p.submit();
}
