function open_image(x){
 with(open('','f','width=494,height=434,left=50,top=50,toolbar=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no')){
document.write('<html><head><meta http-equiv="imagetoolbar" content="no"><title>Bajarka.pl</title>');
document.write('<script type="text/javascript">function L(I){I.parentNode.style.visibility="visible";focus();resizeTo(I.width+6,I.height+45);moveTo((screen.width/2)-I.width/2,(screen.height/2)-I.height/2);}</script></head>');
document.write('<body style="background-color: #fff; height: 100%; padding:0; margin:0;">');
document.write('<div style="font:normal bold 12px Verdana;color:#bbb;position:relative;top:50%;"><center>trwa wczytywanie obrazka, prosze czekać...</center></div>');
document.write('<div style="overflow:hidden;position:absolute;visibility:hidden;left:0px;top:0px;">');
document.write('<img alt="Zamknij okno" onclick="javascript: window.close();" style="cursor: pointer;" onerror="L=parentNode.previousSibling;L.innerHTML='+
'\'Błąd ładowania obrazka...\';L.style.backgroundColor=\'white\'" onload="L(this)" src="'+x+'"></div>');
document.write('</body></html>');
document.close() }
 return false;
}

function pokaz_ukryj(id,id_link) {
	document.getElementById('opis_produktu').style.display='none';
	document.getElementById('opis_produktu_link').className='zakladka_prod_nieaktywna';
	document.getElementById('zawartosc_ksiazki').style.display='none';
	document.getElementById('zawartosc_ksiazki_link').className='zakladka_prod_nieaktywna';
	document.getElementById('recenzje_produktu').style.display='none';
	document.getElementById('recenzje_produktu_link').className='zakladka_prod_nieaktywna';
	document.getElementById('produkty_zwiazane').style.display='none';
	document.getElementById('produkty_zwiazane_link').className='zakladka_prod_nieaktywna';
	
	document.getElementById(id).style.display='block';
	document.getElementById(id_link).className='zakladka_prod_aktywna';
}

function otworzOkno( plik, xxx, yyy, xml)
{o = null;
 if (window.screen) {
  aw = screen.availWidth;
  ah = screen.availHeight;}
 else {
  aw = 640;
  ah = 480;
 }
// xxx += 40;
 if (xxx>screen.availWidth - 15) xxx = screen.availWidth - 15;
 if (yyy>screen.availHeight - 30) yyy = screen.availHeight - 30;
u="width="+xxx+",height="+yyy+",left="+Math.round(((aw-xxx)/2)-5)+",top="+Math.round(((ah-yyy)/2)-14)+",toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no";
 o = window.open( plik+'?xml='+xml, 'zoom', u);
    return false;
}