function pokaz(ukryj, pokaz){    
	document.getElementById(ukryj).style.display="none";
	document.getElementById(pokaz).style.display="block";    
}
function zmien(aktywny, nieaktywny){    
	document.getElementById(aktywny).style.color="#666";
	document.getElementById(aktywny).style.background="url('./img/kr_zi.jpg') no-repeat 0px 0px";
	document.getElementById(aktywny).style.padding="4px 4px 2px 4px";

	document.getElementById(nieaktywny).style.background="url('./img/kr_bi.jpg')";	
	document.getElementById(nieaktywny).style.padding="4px 4px 0px 4px";
	document.getElementById(nieaktywny).style.height="19px";
	document.getElementById(nieaktywny).style.color="white";
}

function Potwierdz() {
var jest_potw = confirm('Na pewno chcesz usunąć ?');
return jest_potw;
};
function menu(id) 
{
	if (document.getElementById(id).style.display=="none") 
	{
		document.getElementById(id).style.display="inline";
	    window.scrollTo(0,999999);
	} 
	else 
	{
		document.getElementById(id).style.display="none";
	}
}

function addKom(id) 
{
	if (document.getElementById(id).style.display=="none") 
	{
		document.getElementById(id).style.display="inline";
	   
	} 
	else 
	{
		document.getElementById(id).style.display="none";
	}
}


function okno(url, width, height) {
        var win = window.open(url,"okienko",'width=' + width + ',height=' + height + ',resizable=yes,scrollbars=yes,menubar=no' );
}


function FontSize(size, wyb) {
	document.getElementById("srodek").style.fontSize = size;	
	document.getElementById("size1").style.color = "black";
	document.getElementById("size2").style.color = "black";
	document.getElementById("size3").style.color = "black";
	document.getElementById(wyb).style.color = "#FF6805";	
}
/*//////////////////////////////////obrazek w nowym oknie//////////////////////////////////*/
/*
	 Skrypt jest darmowy, poki ten komentarz w nim pozostaje.
	 Released under Creative Commons License
	 http://creativecommons.org/licenses/by/2.0/
	 Original author: Kornel Lesinski
	 http://pornel.net/pups/
*/
var pornpups =
{
	init: function(element)
	{
		if (!element || !element.getElementsByTagName) {return false;}
		var as = element.getElementsByTagName('a');
		for(var i=0;i<as.length;i++)
		{
			if ((as[i].href+'').match(/\.(jpe?g|png|gif)/i))
				as[i].onclick = this.click;
		}
		return true;
	},
	writedoc: function(win,href,title,alt,h)
	{
		var doc = win.document;
		doc.open('text/html;charset=utf-8');
		doc.write(
		'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' +
		'<html>' +
		'<head><title>' + alt + '</title>' +
		'<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2">' +
		'<meta http-equiv="imagetoolbar" content="false">' +
		'<link rel="stylesheet" href="pornpups.css">' +
		(h?'<style type="text/css">html, body {margin:0; padding:0;} .obrazek {min-height: ' + h + 'px} #iesux  .obrazek {height: ' + h + 'px;}</style>':'') +
		'</head><body onclick="window.close();">' +
		'<p class="obrazek"><img src="'+href+'" title="Kliknij aby zamknąć" alt="Kliknij aby zamknąć"></p>' +
		'</body></html>'
		);
		doc.close();
	},
	title2size: function(str)
	{
		if (str)
		{
			var out = str.match(/\(([0-9]+)x([0-9]+)\)/);
			if (out) return new Array(str.replace(/\(([0-9]+)x([0-9]+)\)/g,''),parseInt(out[1]),parseInt(out[2]));
		}
		return new Array(str,550,420);
	},
	click: function()
	{
		try {
			if (this.pp_win && this.pp_win.close && !this.pp_win.closed) {this.pp_win.close(); this.pp_win=false;}
		}
		catch(e){}
		try {
			var imgs = this.getElementsByTagName('img');
			var title = imgs[0].getAttribute('title')?imgs[0].getAttribute('title'):this.getAttribute('title');
			var alt = imgs[0].getAttribute('alt');
			var titleandsize = pornpups.title2size(title);
			var winopts = "dependent=yes,toolbar=no,resizable=yes,width=" + (titleandsize[1]) + ',height=' + (titleandsize[2]);
			var win = window.open(this.href,'_blank',winopts);
			if (win && win.opener)
			{
				this.pp_win = win;
				pornpups.writedoc(win,this.href,titleandsize[0],alt,titleandsize[2]);
				return false;
			}
		}
		catch(e){}
		return true;
	},
	initNow: function()
	{
		this.init(document.body);
	},
	initLoad: function()
	{
		var oldOnload = window.onload;
		var that = this;
		window.onload = function()
		{
			if (oldOnload) try{oldOnload();}catch(e){/*explorer dziwne rzeczy plecie*/}
			that.initNow();
		}
	}
};
pornpups.initLoad();
pornpups.initNow();
/*//////////////////////////////////obrazek w nowym oknie//////////////////////////////////*/


  /*----------------------------------data*/
DayName = new Array(7)
DayName[0] = "<b>niedziela</b> "
DayName[1] = "<b>poniedziałek</b> "
DayName[2] = "<b>wtorek</b> "
DayName[3] = "<b>środa</b> "
DayName[4] = "<b>czwartek</b>"
DayName[5] = "<b>piątek</b>"
DayName[6] = "<b>sobota</b> "

MonthName = new Array(12)
MonthName[0] = "stycznia "
MonthName[1] = "lutego "
MonthName[2] = "marca "
MonthName[3] = "kwietnia "
MonthName[4] = "maja "
MonthName[5] = "czerwca "
MonthName[6] = "lipca "
MonthName[7] = "sierpnia "
MonthName[8] = "września "
MonthName[9] = "października "
MonthName[10] = "listopada "
MonthName[11] = "grudnia "

function getDateStr(){
var Today = new Date()
var WeekDay = Today.getDay()
var Month = Today.getMonth()
var Day = Today.getDate()
var Year = Today.getFullYear()

if(Year <= 99)
Year += 1900

return DayName[WeekDay] + " " + " " + Day + " " + MonthName[Month] + " " + Year + "r"
} 
function antyspam(t) {
  t.spam.value=9;
  return true;
}



function strona(plik) {
  //if (plik!='reklamy_box' && plik!='s2' && plik!='s3') return false; // zabezpieczenie
  var xml = null;
  var wynik = document.getElementById("reklamy");
  //wynik.innerHTML = "<img src=\""+plik+"img/preloader.gif\" />";
 
	if (window.XMLHttpRequest) xml = new XMLHttpRequest();
	else if (window.ActiveXObject) xml = new ActiveXObject("Microsoft.XMLHTTP");
 
  if (xml) {
    xml.onreadystatechange = function() {
      if (xml.readyState==4) {
          wynik.innerHTML = xml.responseText;
      }
    }
    xml.open("GET", plik+"boksy/reklamy_box.php?sid="+Math.random(), true);
    xml.send(null);
  }
  return false;
}




