
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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 = 800;
	  if (wys>600) wys = 600;

	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 powieksz_kb(el, fname, s, w)
{
	wys = w + 25;
	szer = s + 35;

	  if(window.screen){
		aw=screen.availWidth;
		ah=screen.availHeight;
	  }else{
		aw=640;
		ah=450;
	  }

	  if (szer>800) szer = 800;
	  if (wys>600) wys = 600;

	str = "foto_kb.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 film(fname, s, w)
{
	w = w + 45;
	wys = w + 118;
	szer = s + 42;

	  if(window.screen){
		aw=screen.availWidth;
		ah=screen.availHeight;
	  }else{
		aw=640;
		ah=450;
	  }

	  if (szer>800) szer = 800;
	  if (wys>600) wys = 600;

	str = "photo/filmy_wmv/film.php?s="+s+"&w="+w+"&f="+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=no, scrollbars=no, fullscreen=no");
	win.focus();

}


noweOkienko = null;
function wnd(src, nazwa, w, h)
{
  if(window.screen){
	  if (w>800 || h>600)
	  {
	    aw=800;
		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=no, "
    +"location=no, "
    +"directories=no, "
    +"status=no, "
    +"menubar=no, "
    +"scrollbars=yes, "
    +"resizable=yes, "
	+"status=no";
	noweOkienko = window.open(src,nazwa,ustawienia);

  //}
  noweOkienko.focus();
  return noweOkienko;
}

function wnd_lock(src, nazwa, w, h)
{
  if(window.screen != null ){
	  if (w>800 || h>600)
	  {
	    aw=800;
		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=no, "
    +"location=no, "
    +"directories=no, "
    +"menubar=no, "
    +"scrollbars=yes, "
    +"resizable=yes, "
	+"status=no";
	noweOkienko = window.open(src,nazwa,ustawienia);

  //}
  noweOkienko.focus();
  return noweOkienko;
}

function wnd_lock2(src, nazwa, w, h)
{
  if(window.screen != null ){
    aw=screen.availWidth;
	ah=screen.availHeight;
  }else{
    aw=640;
    ah=450;
  }
  
  
  //if(noweOkienko==null || noweOkienko.closed){
  var sleft = (aw-w)/2;
  var stop = (ah-h)/2;
  if( sleft < 0 ) left = 0;
  if( stop < 0 ) top = 0;
  
    ustawienia=
     "left=" + sleft + ", "
    +"top=" + stop + ", "
    +"screenX=" + sleft + ", "
    +"screenY=" + stop + ", "
    +"width=" + w + ", "
    +"height=" + h + ", "
    +"innerWidth=" + w + ", "
    +"innerHeight=" + h + ", "
    +"toolbar=no, "
    +"location=no, "
    +"directories=no, "
    +"menubar=no, "
    +"scrollbars=yes, "
    +"resizable=yes, "
	+"status=no";


	noweOkienko = window.open(src,nazwa,ustawienia);

  //}
  noweOkienko.focus();
  return noweOkienko;
}

function wnd_oferta(src, nazwa, w, h)
{
  if(window.screen){
	  if (w>800 || h>600)
	  {
	    aw=800;
		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=no, "
    +"location=no, "
    +"directories=no, "
    +"status=no, "
    +"menubar=no, "
    +"scrollbars=yes, "
    +"resizable=yes, "
	+"status=no";
	noweOkienko = window.open(src,nazwa,ustawienia);

  //}
  noweOkienko.focus();
  return noweOkienko;
}


function wnd_print(src, nazwa, w, h)
{
  if(window.screen){
	  if (w>800 || h>600)
	  {
	    aw=800;
		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,nazwa,ustawienia);

  //}
  noweOkienko.focus();
  return noweOkienko;
}


		function mySend()
		{
			if (!CheckEMail(news.ml.value))
			{
				alert("Podaj poprawnie adres e-mail...");
				news.ml.focus();
				return;
			}
			news.submit();

			return true;
		}


		function Send()
		{
			if (!CheckEMail(zadaj_pytanie.email.value))
			{
				alert("Podaj poprawnie adres e-mail...");
				zadaj_pytanie.email.focus();
				return;
			}
			zadaj_pytanie.submit();

			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;
		}


function activex(i,e){
 i=document.getElementById(i)
 e=i.innerHTML.replace(/type="application\/x-shockwave-flash" data="[^"]*"/,'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"')
 e=e.replace(/<!\[endif\]-->|<!--\[if IE\]>/g,'')
 i.outerHTML=e
}

function mywritex(t) {
document.write(t);
}


function mp3(plik)
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="275" height="20" id="era_player" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="mp3_player.swf?link='+plik+'" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="mp3_player.swf?link='+plik+'" menu="false" quality="high" bgcolor="#ffffff" width="275" height="20" name="era_player" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
}



// Powiekszanie czcionek

function setActiveStyleSheet(title, reset) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
  if (reset == 1) {
  createCookie("wstyle", title, 365);
  }
}

function setStyle() {
var style = readCookie("wstyle");
if (style != null) {
setActiveStyleSheet(style, 0);
}
}

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+escape(value)+expires+"; path=/;";
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return unescape(c.substring(nameEQ.length,c.length));
  }
  return null;
}