<!-- //

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;" />');
}

function PokazPrzedstawicieli(id)
{
	alert(id);
}

function SendForm(form,send)
{
	$("#send").val($("#"+send).val());
	$("#"+form).submit();
}

function OtworzEdytor(pole)
{
	var oknoEdytor = null;
  	oknoEdytor = window.open("edytor.php?pole="+pole, "edytor", "menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=no,resizable=no,copyhistory=no,width=800,height=600,left=0,top=0");
	oknoEdytor.focus();
}

function PowiekszZdjecie(url)
{
	var okno = null;
	if(okno) okno.close();
	var width = 800;
	var height = 600;
	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 keepMeAlive(imgName)
{
   myImg = document.getElementById(imgName);
   if (myImg) myImg.src = myImg.src.replace(/\?.*$/, '?' + Math.random());
}

function selectAll(box)
{
	for(var i=0; i<box.length; i++) {
		box.options[i].selected = true;
	}
}

function sprawdz(wiadomosc)
{
	var czy_potwierdzony = confirm(wiadomosc);
   if(czy_potwierdzony) { return true; }
	else { return false; }
}

function SetActive(obj)
{
	var data = obj.id.split("_");
	jQuery.post("ajax.php?m=ustaw-aktywnosc", { id: data[2], value: obj.checked, lang: data[1], module: data[3] },	
	  	function(data){
			if(data != "OK") alert("Błąd: " + data);
	});
}

function ZaznaczOdznaczWszystkie(f,pole,akcja)
{
	var checkboxy = document.getElementById(f).getElementsByTagName('input');
	for(i = 0; i < checkboxy.length; i++)
	if(checkboxy[i].type == 'checkbox' && checkboxy[i].name.substr(0,3) == pole)
	{
		checkboxy[i].checked = akcja;
	}
}

// -->