<!-- //

function BullStatistic()
{
	var colorDepth = window.screen.colorDepth;
	var res = window.screen.width + "," + window.screen.height;
	var referer = escape(document.referrer);
	document.write('<img src="/statystyka/zlicz.php?colors=' + colorDepth + '&resolution=' + res + '&referer=' + referer + '" style="width:0;height:0;" />');
}

jQuery.preloadImages = function()
{
  for(var i = 0; i<arguments.length; i++)
  {
    jQuery("<img>").attr("src", arguments[i]);
  }
}

function $(id)
{
	return document.getElementById(id);
}

if(jQuery("#portfolio_2"))
{
	jQuery(document).ready(function(){	
			jQuery("#portfolio_2").focus();
	});
}

jQuery(document).ready(function()
{
	jQuery('.scroll-pane').jScrollPane({showArrows:true, scrollbarWidth: 15, arrowSize: 16});
});


jQuery(document).ready(function(){	
		jQuery("#viewer").imageScroller({
			next:"left",
			prev:"right",
			frame:"projekt_img_list_2",
			width:100,
			child:"a",
			auto:false
		});
});

function WyslijEmail(uzytkownik, domena, temat)
{
	var OtworzProgramPocztowy = "mailto:" + uzytkownik + "@" + domena + "?Subject=" + temat;
	window.location = OtworzProgramPocztowy;
}

function mouseOver(id)
{
	jQuery.get('/include/ajax/pokaz_zdjecie_mini.php',{projekt_id: id}, function(data){jQuery('#project_img_mimi').html(data);});
}	

function mouseOut()
{
	jQuery('#project_img_mimi').html('');
}

function mouseOverImg(id)
{
	jQuery.get('/include/ajax/pokaz_nazwe_ptojektu.php',{projekt_id: id}, function(data){jQuery('#project_img_mimi').html(data);});
	jQuery.get('/include/ajax/pokaz_zdjecie_mini.php',{projekt_id: id, link_img: 'tak'}, function(data){jQuery('#img_'+id).html(data);});
}

function mouseOutImg(id)
{
	jQuery.get('/include/ajax/pokaz_zdjecie_mini_gray.php',{projekt_id: id}, function(data){jQuery('#img_'+id).html(data);});
	jQuery('#project_img_mimi').html('');
}

function mouseOverImgList(id)
{
	jQuery.get('/include/ajax/projekt_color.php',{z_id: id}, function(data){jQuery('#img_'+id).html(data);});
}

function mouseOutImgList(id)
{
	jQuery.get('/include/ajax/projekt_szare.php',{z_id: id}, function(data){jQuery('#img_'+id).html(data);});
}

function mouseonclickImgList(id)
{
	jQuery.get('/include/ajax/zdjecie_projekt_duze.php',{z_id: id}, function(data){jQuery('#proj_desc').html(data);});
}

function DescImgList(id, id2)
{
	jQuery.get('/include/ajax/projekt_opis.php',{p_id: id}, function(data){jQuery('#'+id2).html(data);});
}

function pictureChange(id, source)
{
	jQuery('#'+id).attr({
		src: source
	});	
}

function pictureChangeAndDesc(id, source, id2, desc)
{
	jQuery('#'+id).attr({
		src: source
	});	
	jQuery('#'+id2).html(desc);
}

function pictureDesc(id, desc)
{
	jQuery('#'+id).html(desc);
}

function PowiekszZdjecie(url, width, height)
{
	var okno = null;
	if(okno) okno.close();
	if(window.screen)
  	{
   	ScrWidth = window.screen.width;
		ScrHeight = window.screen.height;
  	}
	var PosX = Math.round((ScrWidth - width) / 2);
  	var PosY = Math.round((ScrHeight - height) / 2);
	
	okno = window.open("", "", "menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=" + width + ",height=" + height + ",left=" + PosX + ",top=" + PosY);
  	okno.document.open();
  	okno.document.clear();
  	okno.document.write("<HTML><head><meta http-equiv=\"Content-type\" content=\"text/html; charset=iso-8859-2\"><title>CMS BullDesign - powiększenie zdjęcia</title></HEAD><body leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0 marginwidth=0 marginheight=0><a href='javascript:window.close()'><img src="+url+" alt='Kliknij gdziekolwiek aby zamkn±ć to okno.' border='0'></a></BODY></HTML>");
  	okno.document.close();
  	okno.focus();
}


function Print(content,lang)
{
	var okno = null;
	ScrWidth = 640;
	 width = 700;
	ScrHeight = 480;
	height = 480;
	if(window.screen)
	{
		ScrWidth = window.screen.width;
		ScrHeight = window.screen.height;
	}
	if(okno != null && !document.layers)
	{
		okno.close();
	}
	PosX = Math.round((ScrWidth - width) / 2);
	PosY = Math.round((ScrHeight - height) / 2);
	okno = window.open("/print.php?content="+content+"&lang="+lang, "aktualnosci", "menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width=" + width + ",height=" + height + ",left=" + PosX + ",top=" + PosY);
	okno.focus();
}

function ShowPictures(lang,typ,id,zdjecie,tytul)
{
	var okno = null;
	if(okno) okno.close();
	var ScrWidth = 640;
	var ScrHeight = 480;
	var width = 800;
	var height = 700;
	if(window.screen)
  	{
   	ScrWidth = window.screen.width; 
		ScrHeight = window.screen.height;
  	}
  	PosX = Math.round((ScrWidth - width) / 2);
  	PosY = Math.round((ScrHeight - height) / 2);
  	width = width;
  	height = height;
  	okno = window.open("/show_pictures.php?lang="+lang+"&typ="+typ+"&id="+id+"&zdjecie="+zdjecie+"&tytul="+tytul, "zdjecie", "menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=no,resizable=no,copyhistory=no,width=" + width + ",height=" + height + ",left=" + PosX + ",top=" + PosY);
  	okno.focus();
}

function SprawdzEmail(adres)
{
  a = adres.value.search(/@/i);
  a1 = adres.value.substring(0,a);
  a2 = a1.length;
  a = a + 1;
  b = adres.value.indexOf(".");
  b1 = adres.value.substring(a,b);
  b2 = b1.length;
  b = b + 1;
  c = adres.value.length;
  c1 = adres.value.substring(b,c);
  c2 = c1.length;
  if(adres.value.indexOf("@") != "-1" && adres.value.indexOf(".") != "-1" && a2 >= 1 && b2 >= 1 && c2 >= 1)
  {
	return true;
  }
  else
  {
	return false;
  }
}

function EnlargePic(url,width,height)
{
	var okno = null;
	if(okno) okno.close();
	width = width + 50;
	height = height + 50;
	if(window.screen)
  	{
   	ScrWidth = window.screen.width;
		ScrHeight = window.screen.height;
  	}
	var PosX = Math.round((ScrWidth - width) / 2);
  	var PosY = Math.round((ScrHeight - height) / 2);
	
	okno = window.open("", "", "menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=" + width + ",height=" + height + ",left=" + PosX + ",top=" + PosY);
  	okno.document.open();
  	okno.document.clear();
  	okno.document.write("<HTML><head><meta http-equiv=\"Content-type\" content=\"text/html; charset=iso-8859-2\"><title>ESTA Sp. z o.o.</title></HEAD><body leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0 marginwidth=0 marginheight=0><a href='javascript:window.close()'><img src="+url+" alt='Click to close the window' border='0'></a></BODY></HTML>");
  	okno.document.close();
  	okno.focus();
}

// -->
