

function OpenPicture( pic_index , wid_x , hei_y )
	{	
	NewWindow=window.open('','','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, fullscreen=no, channelmode=no, width='+wid_x+', height='+hei_y+', left=40, top=40');
	NewWindow.document.open();
	
	NewWindow.document.writeln("<head>");
	NewWindow.document.writeln("<title>Foto</title>");
	
	NewWindow.document.writeln("<style type=\"text/css\">");
	NewWindow.document.writeln("body{font-family: Verdana; font-size:12;}");
	NewWindow.document.writeln("a:link{color:#0000FF;text-decoration:none;}");
	NewWindow.document.writeln("a:visited{color:#0000FF;text-decoration:none;}");
	NewWindow.document.writeln("a:hover{color:#EE0000;text-decoration:underline;}");
	NewWindow.document.writeln("</style>");
		
	NewWindow.document.writeln("</head>");	
	NewWindow.document.writeln("<body leftmargin=\"1\" topmargin=\"1\" rightmargin=\"1\">");
	NewWindow.document.writeln("<a href=\"javascript:window.close();\"><img src=\""+pic_index+"\" style=\"border: solid 0;\" alt=\"Zamknij podgląd\"></a>");
	NewWindow.document.writeln("<center>");
	NewWindow.document.writeln("<br><a href=\"javascript:window.close();\">Zamknij</a><br>");
	NewWindow.document.writeln("</center>");
	NewWindow.document.writeln("</body>");
	NewWindow.document.close();
	NewWindow.focus();
	}
	

function img1(name)
  {
	img=new Image();
    img.src = 'pliki/'+name+'.jpg';
	document.images[name].src=img.src;
  }


function img2(name)
  {
	img=new Image();
    img.src = 'pliki/'+name+'m.jpg';
	document.images[name].src=img.src;
  }



function pytanie( adres )
  {
  odp = window.confirm("Czy usunąć wybraną pozycję?");

  if( odp == true )
    window.location.href = adres;
  }	
  
  
function pokaz(div)
  {
  if(document.getElementById(div).style.display=="block")
    document.getElementById(div).style.display="none";
  else
    document.getElementById(div).style.display="block";
  }
  
  
function p_edit(div)
  {
  document.getElementById(div).style.display="block";
  }
  
  
function u_edit(div)
  {
  document.getElementById(div).style.display="none";
  }

function cytuj(autor)
  {
  if( document.selection? document.selection.createRange().text : document.getSelection() )
    {
    txt = document.selection? document.selection.createRange().text : document.getSelection();
    document.forma.coment.value = '[quote='+autor+']'+txt+'[/quote]';
    }
  else
    alert('Zaznacz najpierw fragment tekstu do zacytowania');
  }
  
 


  

