function powieksz(el, fname, s, w)
{

	wys = w + 5;
	szer = s + 25;

	  if(window.screen){
		aw=screen.availWidth;
		ah=screen.availHeight;
	  }else{
		aw=640;
		ah=450;
	  }

	  if (szer>800) szer = 830;
	  if (wys>600) wys = 630;

	str = "foto.php?id="+escape(el)+"&ph="+escape(fname);
	var win = window.open(str,"zoom","width="+szer+", height="+wys+", left="+(aw-szer)/2+", top="+ (ah-wys)/2+", titlebar=no, status=no, toolbar=no, menubar=no, location=no, resizable=yes, scrollbars=yes, fullscreen=no");
	win.focus();
}

function wnd_print(src)
{
	w = 678;
	h = 400;
  if(window.screen){
	  if (w>900 || h>600)
	  {
	    aw=900;
		ah=600;
	  }
	  else
	  {
	    aw=screen.availWidth;
		ah=screen.availHeight;
	  }
  }else{
    aw=640;
    ah=450;
  }
  //if(noweOkienko==null || noweOkienko.closed){
    ustawienia=
     "left=" + (aw-w)/2 + ", "
    +"top=" + (ah-h)/2 + ", "
    +"screenX=" + (aw-w)/2 + ", "
    +"screenY=" + (ah-h)/2 + ", "
    +"width=" + w + ", "
    +"height=" + h + ", "
    +"innerWidth=" + w + ", "
    +"innerHeight=" + h + ", "
    +"toolbar=yes, "
    +"location=no, "
    +"directories=no, "
    +"status=no, "
    +"menubar=yes, "
    +"scrollbars=yes, "
    +"resizable=yes, "
	+"status=no";
	noweOkienko = window.open(src,'printwww',ustawienia);

  //}
  noweOkienko.focus();
  return noweOkienko;
}


		function mySend(f)
		{
			if (!CheckEMail(f.ml.value))
			{
				alert("Podaj poprawnie adres e-mail...");
				f.ml.focus();
				return;
			}
			return true;
		}

		function CheckEMail(adres)
		{
			if (adres.indexOf('@') == -1)
				return false;
			if (adres.length < 4)
				return false;
			if (adres.indexOf('@') != adres.lastIndexOf('@'))
				return false;
			if (adres.indexOf(' ') != -1)
				return false;
			return true;
		}

