//Otwórz okno z flashem
function flash(URL,szer,wys) {

nowe_okno=window.open("","_blank","toolbar=no,status=no,menu=no,scrollbars,resizable,width="+(szer+20)+",height="+wys+",top=30,left=30");
nowe_okno.document.open();
nowe_okno.document.writeln('<BODY topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>');
nowe_okno.document.writeln('<OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 height='+wys+' width='+szer+' classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000>');
nowe_okno.document.writeln('<PARAM NAME="Movie" VALUE="'+URL+'">');
nowe_okno.document.writeln('<PARAM NAME="Src" VALUE="'+URL+'">');
nowe_okno.document.writeln('<PARAM NAME="Play" VALUE="-1">');
nowe_okno.document.writeln('<PARAM NAME="Loop" VALUE="-1">');
nowe_okno.document.writeln('<PARAM NAME="Quality" VALUE="High">');
nowe_okno.document.writeln('<embed src="'+URL+'" type="application/x-shockwave-flash" width="'+szer+'" height="'+wys+'" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" quality="best" play="true">');
nowe_okno.document.writeln('</OBJECT>');
nowe_okno.document.writeln('</BODY>');
nowe_okno.document.close();
}
function sprawdz_rozmiar_produktu(url,id)
{     
  if (document.getElementById('rozmiar_produktu_'+id).value==0)
      alert('Wybierz rozmiar dla produktu');
  else
  {
   location.href=url+"?p=okno2&s=koszyk&opcja=dodaj&id_prod="+id+"&id_rozm="+document.getElementById('rozmiar_produktu_'+id).value;  
  }//
}
//Otwórz okno ze zdjeciem
function zdjecie(URL,w,h) {

var lastindex = URL.lastIndexOf("duze");

obrazek = new Image();
obrazek.src = URL;

/* w=600;
h=500; */

width=obrazek.width;
height=obrazek.height;

if (lastindex>=0)
{
 nowe_okno=window.open("","_blank","toolbar=no,status=no,menu=no,scrollbars,resizable,top=30,left=30");


}
else if (lastindex==-1)
{
 nowe_okno=window.open("","_blank","toolbar=no,status=no,menu=no,scrollbars,resizable,width="+(w+20)+",height="+h+",top=30,left=30");
}

nowe_okno.document.open();
nowe_okno.document.writeln('<html><head>');
nowe_okno.document.writeln('<meta http-equiv="content-type" content="text/html; charset=UTF-8">');
nowe_okno.document.write('<script type="text/javascript" ');
nowe_okno.document.write('src="javascript/mojozoom.js">');
nowe_okno.document.writeln('<\/script>');
/* nowe_okno.document.writeln('<script type="text/javascript">');
nowe_okno.document.writeln('function wymiary() ');
nowe_okno.document.writeln('{ ');
nowe_okno.document.writeln('w=document.zdjecie.width;');
nowe_okno.document.writeln('h=document.zdjecie.height;'); 
nowe_okno.document.writeln('if(w==600)');
nowe_okno.document.writeln('{');
nowe_okno.document.writeln('w=w+50;');
nowe_okno.document.writeln('h=h+100;');
nowe_okno.document.writeln('}');
nowe_okno.document.writeln('else if (w==400)');
nowe_okno.document.writeln('{');
nowe_okno.document.writeln('w=w+600;');
nowe_okno.document.writeln('h=h+400;');
nowe_okno.document.writeln('}');
nowe_okno.document.writeln('if (h>700) ');
nowe_okno.document.writeln('{');
nowe_okno.document.writeln('w=w+50;');
nowe_okno.document.writeln('h=700;');
nowe_okno.document.writeln('}');
nowe_okno.document.writeln('window.resizeTo(w,h);');
nowe_okno.document.writeln('}');
nowe_okno.document.writeln('</script>'); */

nowe_okno.document.writeln('</head>');
nowe_okno.document.writeln('<body onload="wymiary();" background="http://www.twomark.pl/images/sklep/tlo_twomark_01.jpg" bgcolor="#286979" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">');
nowe_okno.document.writeln('<link type="text/css" href="http://www.twomark.pl/style/mojozoom.css" rel="stylesheet" />');

//nowe_okno.document.writeln('<IMG name="zdjecie" data-zoomsrc="'+URL+'" id="myimage" src='+URL+' width="400">');

if (lastindex>=0)
{
  nowe_okno.document.writeln('<IMG name="zdjecie" data-zoomsrc="'+URL+'" id="myimage" src='+URL+' width="400">');
	nowe_okno.document.writeln('<span id="powiekszenie" class="powiekszenie">Najedź myszką na zdjęcie aby zobaczyć powiększenie.</span>');
	
}
else if (lastindex==-1)
{
  nowe_okno.document.writeln('<IMG name="zdjecie" src='+URL+' border="0">');
}

/*
if (document.zdjecie.width>600)
{
  nowe_okno.document.writeln('<IMG name="zdjecie" data-zoomsrc="'+URL+'" id="myimage" src='+URL+' width="400">');
}
else if (document.zdjecie.width<=600)
{
  nowe_okno.document.writeln('<IMG name="zdjecie" src='+URL+' border="0">');
}
*/

nowe_okno.document.writeln('<br><a class="zamknij" id="zamknij" href="javascript:window.close()">Zamknij okno.</a>');

nowe_okno.document.writeln('</BODY></html>');
nowe_okno.document.close();
}
//Otwórz okno z dokumentem (określ rozmiary)
function okno(URL,szer,wys) {
nowe_okno=window.open(URL,"_blank","toolbar=no,status=no,menus=no,scrollbars,location=no,resizable,width="+szer+",height="+wys+",top=30,left=30");
return;
}
//Otwórz okno z dokumentem (zasymuluj target=_blank)
function url(URL) {
nowe_okno=window.open(URL,"_blank","toolbar,location,status,menubar,scrollbars,resizable,top=30,left=30,width=675,height=450");
return;
}
function okno_blank(URL,szer,wys) {
nowe_okno=window.open(URL,"_blank","toolbar=no,status=no,menus=no,scrollbars=no,resizable,width="+szer+",height="+wys+",top=30,left=30");
return;
}
function Chmurka(T,t){
 T.title=''
 T.parentNode.lastChild.style.display=t?'block':'none'
}
 var kolor_wiersza = '#FFFFFF';
  
  function ustaw_wiersz(wiersz,styl,status) {
    if(status=='over')
      wiersz.className = 'produkty_zaznaczony'; 
    else
      wiersz.className = styl;
  }//function ustaw_wiersz(wiersz,kolor_oryginalny) {
  
  
  
  
  
  
  
  
  
  
  
  
  

  
