<!--
function Drukuj(url, width, height) {
Width = screen.availWidth;
Height = screen.availHeight;
x = Width-690;
y = Height-530;
var Win2 = window.open(url,"Drukuj",'width=' + width + ',height=' + height + ',top='+y+',left='+x+',resizable=0,scrollbars=yes,menubar=no' );
}
function displayKal(url, width, height){
var Win2 = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no,top=150,left=150' );
}
function displayWindow(url, width, height){
var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=no,menubar=no' );
}
function displayWindow2(url, width, height){
var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no' );
}
function zoom(url, width, height){
if(width == ''){
image = new Image()
image.src = url;
width = image.width + 20;
height = image.height + 25;
}
var Win3 = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=no,menubar=no' );
}



function PopupPic_temp(sPicURL) {
window.open("photo.php?"+sPicURL, "", "resizable=1,scrollbars=yes,menubar=no,HEIGHT=200,WIDTH=200");
//Popup.show(sPicURL,607,367);
//return false;
}

function PopupPic(sPicURL) {
window.open("photo.php?"+sPicURL, "", "resizable=1,scrollbars=yes,menubar=no,HEIGHT=200,WIDTH=200");
}



function displayFoto(url, width, height) {
var sw = screen.width;
var sh = screen.height;
var Win = window.open(url+'&w='+sw+'&h='+sh,"displayFoto",'width=' + width + ',height=' + height + ',top=40,left=40,resizable=0,scrollbars=yes,menubar=no' );
}


var bw = parseInt(navigator.appVersion);

if (navigator.userAgent.indexOf("Opera")!=-1
&& document.getElementById) type="OP";
if (document.all) type="IE";
if (document.layers) type="NN";
if (!document.all && document.getElementById) type="MO";

function warstwa(id, action){
if (type=="IE"){ eval("document.all." + id + ".style.display='" + action + "'");}
if (type=="NN"){ eval("document." + id + ".display='" + action + "'");}
if (type=="MO" || type=="OP"){
eval("document.getElementById('" + id + "').style.display='" + action + "'");}
}

function menu(id,m){
if (type=="MO" || type=="OP"){
if (document.getElementById([id]).style.display == ''){
document.getElementById([id]).style.display = 'none';
document.getElementById([m]).className = 'unselect_menu';
}
if (document.getElementById([id]).style.display == 'block'){
document.getElementById([id]).style.display = 'none';
document.getElementById([m]).className = 'unselect_menu';
}
else{
document.getElementById([id]).style.display = 'block';
document.getElementById([m]).className = 'select_menu';
}
}

if (type=="IE"){
if (document.all[id].style.display == 'block'){
document.all[id].style.display = 'none';
document.all[m].className = 'unselect_menu';
}
else{
document.all[id].style.display = 'block';
document.all[m].className = 'select_menu';
}
}
if (type=="NN"){
if (document[id].style.display == 'block'){
document[id].style.display = 'none';
document[m].className = 'unselect_menu';
}
else{
document[id].style.display = 'block';
document[m].className = 'select_menu';
}
}
}



function PopupPic2(sPicURL) {
//window.open("photo.php?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200");
var id = 'tab_h1';

if (type=="MO" || type=="OP"){
if (document.getElementById([id]).style.display == ''){
document.getElementById([id]).style.display = 'none';;
}
if (document.getElementById([id]).style.display == 'block'){
document.getElementById([id]).style.display = 'none';;
}
else{
document.getElementById([id]).style.display = 'block';;
}
}

if (type=="IE"){
if (document.all[id].style.display == 'block'){
document.all[id].style.display = 'none';
}
else{
document.all[id].style.display = 'block';
}
}
if (type=="NN"){
if (document[id].style.display == 'block'){
document[id].style.display = 'none';;
}
else{
document[id].style.display = 'block';;
}
}
}



function menu_p(id,obr,ip,np){
if (type=="MO" || type=="OP"){
if (document.getElementById([id]).style.display == ''){
document.getElementById([id]).style.display = 'none';
document.getElementById([ip]).style.display = 'none';
document.getElementById([np]).style.display = '';
}

if (document.getElementById([id]).style.display == 'block'){
document.getElementById([id]).style.display = 'none';
}
else{
document.getElementById([id]).style.display = 'block';
}
}



if (type=="IE"){
if (document.all[id].style.display == 'block'){
document.all[id].style.display = 'none';
document.all[ip].style.display = 'block';
document.all[np].style.display = 'none';

if(id == "ml_0"){
//document.all['ml_1'].style.display = 'none';
//document.all['il_1'].style.display = 'none';
//document.all['nl_1'].style.display = 'block';
}

}
else{
document.all[id].style.display = 'block';
document.all[ip].style.display = 'none';
document.all[np].style.display = 'block';


if(id == "ml_0"){
//document.all['ml_1'].style.display = 'none';
//document.all['il_1'].style.display = 'block';
//document.all['nl_1'].style.display = 'none';
}



}
}
if (type=="NN"){
if (document[id].style.display == 'block'){
document[id].style.display = 'none';
document.all[ip].style.display = 'block';
document.all[np].style.display = 'none';
}
else{
document[id].style.display = 'block';
document.all[ip].style.display = 'none';
document.all[np].style.display = 'block';
}
}
}





function handler(e) {
var key = (navigator.appName == "Netscape") ? e.which : e.keyCode;
if (key == 13) return false;
}
function search(){
if((search_form.q.value != '') && (search_form.q.value != '...')){ search_form.submit(); }
}


var link = "<? echo $url; ?>";
var title = "<? echo $site_title; ?>";



function ulubione()
{
if(document.all)
window.external.AddFavorite(link,title)
}
function licz_znaki(max){
var ile_jest = document.form.wpis.value.length;
var znakow = max - ile_jest;
if(znakow > 0){
znak.innerHTML = znakow;
}
if(znakow < 0){
znak.innerHTML = '<font color=#FF0000>tekst zostanie obcięty !</font>';
}
}
function zapisz(){
var a = document.form.imie.value;
var b = document.form.wpis.value;
if((a == '') && (b == '')){
alert('Nie wypełniłeś podstawowych pól formularza');
}
else{
document.form.submit();
}}

function katalog_dodaj(){
var fnazwa = document.form.nazwa.value;
var fulica = document.form.ulica.value;
var fmiasto = document.form.miasto.value;
var fkod_txt = document.form.kod_txt.value;


if((fnazwa == "") || (fulica == "") || (fmiasto == "") || (fkod_txt == "")){
alert('Nie wypełniłeś obowiązkowych pól formularza !');
}
else { document.form.submit(); }
}

function ogloszenia_dodaj(){
var fnazwa = document.form.nazwa.value;
var fdzial = document.form.dzial.value;
var fwpis = document.form.wpis.value;
if((fnazwa == "") || (fdzial == "") || (fwpis == "")){
alert('Nie wypełniłeś obowiązkowych pól formularza !');
}
else { document.form.submit(); }
}

<!-- Begin
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = "" + ((hours >12) ? hours -0 :hours)
//if (timeValue == "0") timeValue = 12;
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
//timeValue += (hours >= 12) ? " P.M." : " A.M."
document.clock.face.value = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
function startclock() {
stopclock();
showtime();
}
function fullScreen(theURL) {
window.open(theURL, '', 'fullscreen=yes, scrollbars=auto');
}



function error(elem, text) {
   if (errfound) return;
   window.alert(text);
   elem.select();
   elem.focus();
   errfound = true;
}
function Validate_w() {
   errfound = false;
//   if (document.w_form.ftemat.value == ""){
//      error(document.w_form.ftemat,"Uzupełnij temat wątku");
//}
   if (document.w_form.watek.value == ""){
      error(document.w_form.watek,"Nic nie wpisałeś/aś");
}
//   if (document.w_form.podpis.value == ""){
//      error(document.w_form.podpis,"Uzupełnij podpis");
//}
//   if (document.w_form.ulica.value == ""){
//      error(document.w_form.ulica,"Uzupełnij ulicę");////
//}
//   if (document.w_form.miejscowosc.value == ""){
//      error(document.w_form.miejscowosc,"Uzupełnij miejscowość");
//}

   return !errfound;
}
function Validate_k() {
   errfound = false;
   if (document.k_form.komentarz.value == ""){
      error(document.k_form.komentarz,"Nic nie wpisałeś/aś");
}
   if (document.k_form.podpis.value == ""){
      error(document.k_form.podpis,"Uzupełnij podpis");
}
   return !errfound;
}




/***********************************************

* JavaScript Image Clock- by JavaScript Kit (www.javascriptkit.com)
* This notice must stay intact for usage
* Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and 100s more

***********************************************/

var imageclock=new Object()
	//Enter path to clock digit images here, in order of 0-9, then "am/pm", then colon image:
	imageclock.digits=["site_img/c0.gif", "site_img/c1.gif", "site_img/c2.gif", "site_img/c3.gif", "site_img/c4.gif", "site_img/c5.gif", "site_img/c6.gif", "site_img/c7.gif", "site_img/c8.gif", "site_img/c9.gif", "site_img/cam.gif", "site_img/cpm.gif", "site_img/colon.gif"]
	imageclock.instances=0
	var preloadimages=[]
	for (var i=0; i<imageclock.digits.length; i++){ //preload images
		preloadimages[i]=new Image()
		preloadimages[i].src=imageclock.digits[i]
	}

	imageclock.imageHTML=function(timestring){ //return timestring (ie: 1:56:38) into string of images instead
		var sections=timestring.split(":")
		if (sections[0]=="0") //If hour field is 0 (aka 12 AM)
			sections[0]="12"
		else if (sections[0]>=13)
			sections[0]=sections[0]+""
		for (var i=0; i<sections.length; i++){
			if (sections[i].length==1)
				sections[i]='<img src="'+imageclock.digits[0]+'" />'+'<img src="'+imageclock.digits[parseInt(sections[i])]+'" />'
			else
				sections[i]='<img src="'+imageclock.digits[parseInt(sections[i].charAt(0))]+'" />'+'<img src="'+imageclock.digits[parseInt(sections[i].charAt(1))]+'" />'
		}
		return sections[0]+'<img src="'+imageclock.digits[12]+'" />'+sections[1]
	}

	imageclock.display=function(){
		var clockinstance=this
		this.spanid="clockspan"+(imageclock.instances++)
		document.write('<span id="'+this.spanid+'"></span>')
		this.update()
		setInterval(function(){clockinstance.update()}, 1000)
	}

	imageclock.display.prototype.update=function(){
		var dateobj=new Date()
		var currenttime=dateobj.getHours()+":"+dateobj.getMinutes()+":"+dateobj.getSeconds() //create time string
		var currenttimeHTML=imageclock.imageHTML(currenttime)+'<img src="'+((dateobj.getHours()>=12)? imageclock.digits[11] : imageclock.digits[10])+'" />'
		document.getElementById(this.spanid).innerHTML=currenttimeHTML

	}


function resize(size) {
var td1, td2, td3, td4, td5, td6, listing2, i;
listing2 = document.getElementById('content');


	if (listing2)
	{
		td1 = listing2.getElementsByTagName('p');
		for(i=0;i<td1.length;i++)
		{
			td1[i].style.fontSize = size+'pt';
		}
		
		td2 = listing2.getElementsByTagName('li');
		for(i=0;i<td2.length;i++)
		{
			td2[i].style.fontSize = size+'pt';
		}
		
		td3 = listing2.getElementsByTagName('div');
		for(i=0;i<td3.length;i++)
		{
			td3[i].style.fontSize = size+'pt';
		}
		td4 = listing2.getElementsByTagName('a');
		for(i=0;i<td4.length;i++)
		{
			td4[i].style.fontSize = size+'pt';
		}

		td5 = listing2.getElementsByTagName('span');
		for(i=0;i<td5.length;i++)
		{
			td5[i].style.fontSize = size+'pt';
		}

		td6 = listing2.getElementsByTagName('td');
		for(i=0;i<td6.length;i++)
		{
			td6[i].style.fontSize = size+'pt';
		}

	}

	document.cookie = 'font_size=' + size + '; path=/';
}
-->
