function loguj_u(podstrona) {
			
			var pole = document.getElementById('login').value;
			var pole2 = document.getElementById('haslo').value;
			
			if ( pole == '' || pole == 0 || pole == 'Login' || pole2 == 'Haslo' || pole2 == ''  || pole2 == 0){
			
			alert('Pola "Login" i "Hasło" nie mogą pozostać puste.');
			
			}else{

			document.getElementById("loguj_us").action= (podstrona);
		    document.getElementById("loguj_us").submit();
			  
} 
}

function wyslij_f(podstrona) {
			
			var pole = document.getElementById('email').value;
			var wzor = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
			
			if ( pole == '' || pole == 0 || pole == 'E-mail' ){
			
			alert('Pole "E-mail" nie może pozostać puste.');
			
			}else if (wzor.test(pole) == false){
			
			alert('Podany adres e-mail jest błędny.');
			
            }else{
			
			document.getElementById("kontakt").action= (podstrona)+'&wyslij_f=wyslij_f';
		    document.getElementById("kontakt").submit();
			  
} 
}	

function wyslij_r(podstrona) {
			
			var pole = document.getElementById('email2').value;
			var pole2 = document.getElementById('imie2').value;
			var wzor = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
			
			if ( pole == '' || pole == 0 || pole == 'E-mail' ){
			
			alert('Pole "E-mail" nie może pozostać puste.');
			
			}else if (wzor.test(pole) == false){
			
			alert('Podany adres e-mail jest błędny.');
			
            }else if ( pole2 == '' || pole2 == 0 || pole2 == 'Imię i nazwisko' ){
			
			alert('Pole "Imię i nazwisko" nie może pozostać puste.');
			
            }else{
			
			document.getElementById("mini_rejestracja").action= (podstrona)+'&wyslij_r=wyslij_r';
		    document.getElementById("mini_rejestracja").submit();
			  
} 
}	

function dodaj_n(podstrona) {
			
			var pole = document.getElementById('email_n').value;
			var wzor = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
			
			if ( pole == '' || pole == 0 || pole == 'wpisz swój adres e-mail' ){
			
			alert('Pole "E-mail" nie może pozostać puste.');
			
			}else if (wzor.test(pole) == false){
			
			alert('Podany adres e-mail jest błędny.');
			
            }else{
			
			document.getElementById("newsletter").action=(podstrona)+'&dodaj_n=dodaj_n';
		    document.getElementById("newsletter").submit();
			  
} 
}	

function  wyczysc_input(ide,wartosc) {

	var pole = document.getElementById(ide).value;
	
	if(pole == wartosc) {
		
	document.getElementById(ide).value = '';
		
	}
	
	
	
}
function  sprawdz_input(ide,wartosc) {
	
	var pole = document.getElementById(ide).value;
	
	if(pole == '' || pole == 0) {
		
		document.getElementById(ide).value = wartosc;
		
	}
	
	
	
}

function rejestracja() {

yScroll = document.body.scrollTop ||document.documentElement.scrollTop;
yScroll2 = document.body.scrollHeight ||document.documentElement.scrollHeight;

var w = 500;
var h= 540;

if((yScroll+h)>=yScroll2) {
	
var sc= (yScroll-((yScroll+h)-yScroll2))-80;
var yScroll= sc;
scroll(0,sc);

}
  
document.getElementById("zaslona").style.width =  100+"%";
document.getElementById("zaslona").style.height = yScroll2+"px";
document.getElementById("zaslona").style.top = 0;
document.getElementById("zaslona").style.left = 0;
document.getElementById("zaslona").style.display = 'block';

var width  = w;
var height = h;
var left = (document.documentElement.clientWidth  - width)/2;
var top = 30+ yScroll;

document.getElementById("okno").style.top = top+"px";
document.getElementById("okno").style.left = left+"px";
document.getElementById("okno").style.display = 'block';

if (document.getElementById){

document.getElementById("zaslona").innerHTML ="<a href='javascript:zamknij();'><div style='width:100%; height:100%;'> </div></a>";
document.getElementById("okno").innerHTML ="<table width='500' height='40' border='0' cellpadding='0' cellspacing='0' background='bib/img/bg_okno2.png'><tr><td align='right' valign='top'><div style='outline:none'><a href='javascript:zamknij();'><img src='bib/img/b_x2.png' width='45' height='40' style  border='0' /></a></div></td></tr></table><iframe id='ramka_foto1' src='bib/tabele/rejestracja01.php'  frameborder='0' width='500' height='540'></iframe>" ;

}else{

alert("Wystapil blad w systemie CMS");

}
	
}

function rejestruj(u,hs) {

yScroll = document.body.scrollTop ||document.documentElement.scrollTop;
yScroll2 = document.body.scrollHeight ||document.documentElement.scrollHeight;

var w = 500;
var h= 200;

if((yScroll+h)>=yScroll2) {
	
var sc= (yScroll-((yScroll+h)-yScroll2))-80;
var yScroll= sc;
scroll(0,sc);

}
  
document.getElementById("zaslona").style.width =  100+"%";
document.getElementById("zaslona").style.height = yScroll2+"px";
document.getElementById("zaslona").style.top = 0;
document.getElementById("zaslona").style.left = 0;
document.getElementById("zaslona").style.display = 'block';

var width  = w;
var height = h;
var left = (document.documentElement.clientWidth  - width)/2;
var top = 30+ yScroll;

document.getElementById("okno").style.top = top+"px";
document.getElementById("okno").style.left = left+"px";
document.getElementById("okno").style.display = 'block';

if (document.getElementById){

document.getElementById("zaslona").innerHTML ="<a href='javascript:zamknij();'><div style='width:100%; height:100%;'> </div></a>";
document.getElementById("okno").innerHTML ="<table width='500' height='40' border='0' cellpadding='0' cellspacing='0' background='bib/img/bg_okno2.png'><tr><td align='right' valign='top'><div style='outline:none'><a href='javascript:zamknij();'><img src='bib/img/b_x2.png' width='45' height='40' style  border='0' /></a></div></td></tr></table><iframe id='ramka_foto1' src='bib/tabele/rejestracja01b.php?u="+(u)+"&h="+(hs)+"'  frameborder='0' width='500' height='200'></iframe>" ;

}else{

alert("Wystapil blad w systemie CMS");

}
	
}

function przypomnij() {

yScroll = document.body.scrollTop ||document.documentElement.scrollTop;
yScroll2 = document.body.scrollHeight ||document.documentElement.scrollHeight;

var w = 500;
var h= 300;

if((yScroll+h)>=yScroll2) {
	
var sc= (yScroll-((yScroll+h)-yScroll2))-80;
var yScroll= sc;
scroll(0,sc);

}
  
document.getElementById("zaslona").style.width =  100+"%";
document.getElementById("zaslona").style.height = yScroll2+"px";
document.getElementById("zaslona").style.top = 0;
document.getElementById("zaslona").style.left = 0;
document.getElementById("zaslona").style.display = 'block';

var width  = w;
var height = h;
var left = (document.documentElement.clientWidth  - width)/2;
var top = 30+ yScroll;

document.getElementById("okno").style.top = top+"px";
document.getElementById("okno").style.left = left+"px";
document.getElementById("okno").style.display = 'block';

if (document.getElementById){

document.getElementById("zaslona").innerHTML ="<a href='javascript:zamknij();'><div style='width:100%; height:100%;'> </div></a>";
document.getElementById("okno").innerHTML ="<table width='500' height='40' border='0' cellpadding='0' cellspacing='0' background='bib/img/bg_okno2.png'><tr><td align='right' valign='top'><div style='outline:none'><a href='javascript:zamknij();'><img src='bib/img/b_x2.png' width='45' height='40' style  border='0' /></a></div></td></tr></table><iframe id='ramka_foto1' src='bib/tabele/przypomnij01.php'  frameborder='0' width='500' height='300'></iframe>" ;

}else{

alert("Wystapil blad w systemie CMS");

}
	
}

function loguj_p(us,ha) {

yScroll = document.body.scrollTop ||document.documentElement.scrollTop;
yScroll2 = document.body.scrollHeight ||document.documentElement.scrollHeight;

var w = 500;
var h= 690;

if((yScroll+h)>=yScroll2) {
	
var sc= (yScroll-((yScroll+h)-yScroll2))-80;
var yScroll= sc;
scroll(0,sc);

}
  
document.getElementById("zaslona").style.width =  100+"%";
document.getElementById("zaslona").style.height = yScroll2+"px";
document.getElementById("zaslona").style.top = 0;
document.getElementById("zaslona").style.left = 0;
document.getElementById("zaslona").style.display = 'block';

var width  = w;
var height = h;
var left = (document.documentElement.clientWidth  - width)/2;
var top = 30+ yScroll;

document.getElementById("okno").style.top = top+"px";
document.getElementById("okno").style.left = left+"px";
document.getElementById("okno").style.display = 'block';

if (document.getElementById){

document.getElementById("zaslona").innerHTML ="<a href='javascript:zamknij();'><div style='width:100%; height:100%;'> </div></a>";
document.getElementById("okno").innerHTML ="<table width='500' height='40' border='0' cellpadding='0' cellspacing='0' background='bib/img/bg_okno2.png'><tr><td align='right' valign='top'><div style='outline:none'><a href='javascript:zamknij();'><img src='bib/img/b_x2.png' width='45' height='40' style  border='0' /></a></div></td></tr></table><iframe id='ramka_foto1' src='bib/tabele/konto01.php?u="+(us)+"&h="+(ha)+"'  frameborder='0' width='500' height='690'></iframe>" ;

}else{

alert("Wystapil blad w systemie CMS");

}
	
}

function konto() {

yScroll = document.body.scrollTop ||document.documentElement.scrollTop;
yScroll2 = document.body.scrollHeight ||document.documentElement.scrollHeight;

var w = 500;
var h= 690;

if((yScroll+h)>=yScroll2) {
	
var sc= (yScroll-((yScroll+h)-yScroll2))-80;
var yScroll= sc;
scroll(0,sc);

}
  
document.getElementById("zaslona").style.width =  100+"%";
document.getElementById("zaslona").style.height = yScroll2+"px";
document.getElementById("zaslona").style.top = 0;
document.getElementById("zaslona").style.left = 0;
document.getElementById("zaslona").style.display = 'block';

var width  = w;
var height = h;
var left = (document.documentElement.clientWidth  - width)/2;
var top = 30+ yScroll;

document.getElementById("okno").style.top = top+"px";
document.getElementById("okno").style.left = left+"px";
document.getElementById("okno").style.display = 'block';

if (document.getElementById){

document.getElementById("zaslona").innerHTML ="<a href='javascript:zamknij();'><div style='width:100%; height:100%;'> </div></a>";
document.getElementById("okno").innerHTML ="<table width='500' height='40' border='0' cellpadding='0' cellspacing='0' background='bib/img/bg_okno2.png'><tr><td align='right' valign='top'><div style='outline:none'><a href='javascript:zamknij();'><img src='bib/img/b_x2.png' width='45' height='40' style  border='0' /></a></div></td></tr></table><iframe id='ramka_foto1' src='bib/tabele/konto01.php'  frameborder='0' width='500' height='690'></iframe>" ;

}else{

alert("Wystapil blad w systemie CMS");

}
	
}

function foto_on(idf,w2,h2) {

yScroll = document.body.scrollTop ||document.documentElement.scrollTop;
yScroll2 = document.body.scrollHeight ||document.documentElement.scrollHeight;

var w = w2+40;
var h= h2+40;

if((yScroll+h)>=yScroll2) {
	
var sc= (yScroll-((yScroll+h)-yScroll2))-80;
var yScroll= sc;
scroll(0,sc);

}
  
document.getElementById("zaslona").style.width =  100+"%";
document.getElementById("zaslona").style.height = yScroll2+"px";
document.getElementById("zaslona").style.top = 0;
document.getElementById("zaslona").style.left = 0;
document.getElementById("zaslona").style.display = 'block';

var width  = w;
var height = h;
var left = (document.documentElement.clientWidth  - width)/2;
var top = 30+ yScroll;

document.getElementById("okno").style.top = top+"px";
document.getElementById("okno").style.left = left+"px";
document.getElementById("okno").style.display = 'block';

if (document.getElementById){

document.getElementById("zaslona").innerHTML ="<a href='javascript:zamknij();'><div style='width:100%; height:100%;'> </div></a>";
document.getElementById("okno").innerHTML ="<table width='"+(w)+"' height='40' border='0' cellpadding='0' cellspacing='0' background='bib/img/bg_okno.png'><tr><td align='right' valign='top'><div style='outline:none'><a href='javascript:zamknij();'><img src='bib/img/b_x.png' width='45' height='40' style  border='0' /></a></div></td></tr></table><iframe id='ramka_foto1' src='bib/tabele/foto02.php?idf="+(idf)+"'  frameborder='0' width='"+(w)+"' height='"+(h)+"'></iframe>" ;

}else{

alert("Wystapil blad w systemie CMS");

}
	
}


function foto_on2(id_p,id_z,w2,h2) {

yScroll = document.body.scrollTop ||document.documentElement.scrollTop;
yScroll2 = document.body.scrollHeight ||document.documentElement.scrollHeight;

var w = w2+40;
var h= h2+40;

if((yScroll+h)>=yScroll2) {
	
var sc= (yScroll-((yScroll+h)-yScroll2))-80;
var yScroll= sc;
scroll(0,sc);

}
  
document.getElementById("zaslona").style.width =  100+"%";
document.getElementById("zaslona").style.height = yScroll2+"px";
document.getElementById("zaslona").style.top = 0;
document.getElementById("zaslona").style.left = 0;
document.getElementById("zaslona").style.display = 'block';

var width  = w;
var height = h;
var left = (document.documentElement.clientWidth  - width)/2;
var top = 30+ yScroll;

document.getElementById("okno").style.top = top+"px";
document.getElementById("okno").style.left = left+"px";
document.getElementById("okno").style.display = 'block';

if (document.getElementById){

document.getElementById("zaslona").innerHTML ="<a href='javascript:zamknij();'><div style='width:100%; height:100%;'> </div></a>";
document.getElementById("okno").innerHTML ="<table width='"+(w)+"' height='40' border='0' cellpadding='0' cellspacing='0' background='bib/img/bg_okno.png'><tr><td align='right' valign='top'><div style='outline:none'><a href='javascript:zamknij();'><img src='bib/img/b_x.png' width='45' height='40' style  border='0' /></a></div></td></tr></table><iframe id='ramka_foto2' src='bib/tabele/foto01.php?id_p="+(id_p)+"&id_z="+(id_z)+"'  frameborder='0' width='"+(w)+"' height='"+(h)+"'></iframe>" ;

}else{

alert("Wystapil blad w systemie CMS");

}
	
}


function zamknij() { 

document.getElementById("zaslona").style.display = 'none';
document.getElementById("okno").style.display = 'none';

if (document.getElementById){

document.getElementById("okno").innerHTML ="" ;

}else{

alert("Wystapil blad w systemie CMS");

}
}

function zamknij2() { 

window.location = location.href;

}
function zamknij3() { 

window.location.href='http://www.dobrzemi.pl'; 

}

function dodaj_t() {

yScroll = document.body.scrollTop ||document.documentElement.scrollTop;
yScroll2 = document.body.scrollHeight ||document.documentElement.scrollHeight;

var w = 500;
var h= 300;

if((yScroll+h)>=yScroll2) {
	
var sc= (yScroll-((yScroll+h)-yScroll2))-80;
var yScroll= sc;
scroll(0,sc);

}
  
document.getElementById("zaslona").style.width =  100+"%";
document.getElementById("zaslona").style.height = yScroll2+"px";
document.getElementById("zaslona").style.top = 0;
document.getElementById("zaslona").style.left = 0;
document.getElementById("zaslona").style.display = 'block';

var width  = w;
var height = h;
var left = (document.documentElement.clientWidth  - width)/2;
var top = 30+ yScroll;

document.getElementById("okno").style.top = top+"px";
document.getElementById("okno").style.left = left+"px";
document.getElementById("okno").style.display = 'block';

if (document.getElementById){

document.getElementById("zaslona").innerHTML ="<a href='javascript:zamknij();'><div style='width:100%; height:100%;'> </div></a>";
document.getElementById("okno").innerHTML ="<table width='500' height='40' border='0' cellpadding='0' cellspacing='0' background='bib/img/bg_okno2.png'><tr><td align='right' valign='top'><div style='outline:none'><a href='javascript:zamknij();'><img src='bib/img/b_x2.png' width='45' height='40' style  border='0' /></a></div></td></tr></table><iframe id='ramka_foto1' src='bib/tabele/nowytemat01.php'  frameborder='0' width='500' height='300'></iframe>" ;

}else{

alert("Wystapil blad w systemie CMS");

}
	
}

function dodaj_p(id_t,id_p) {

yScroll = document.body.scrollTop ||document.documentElement.scrollTop;
yScroll2 = document.body.scrollHeight ||document.documentElement.scrollHeight;

var w = 500;
var h= 400;

if((yScroll+h)>=yScroll2) {
	
var sc= (yScroll-((yScroll+h)-yScroll2))-80;
var yScroll= sc;
scroll(0,sc);

}
  
document.getElementById("zaslona").style.width =  100+"%";
document.getElementById("zaslona").style.height = yScroll2+"px";
document.getElementById("zaslona").style.top = 0;
document.getElementById("zaslona").style.left = 0;
document.getElementById("zaslona").style.display = 'block';

var width  = w;
var height = h;
var left = (document.documentElement.clientWidth  - width)/2;
var top = 30+ yScroll;

document.getElementById("okno").style.top = top+"px";
document.getElementById("okno").style.left = left+"px";
document.getElementById("okno").style.display = 'block';

if (document.getElementById){

document.getElementById("zaslona").innerHTML ="<a href='javascript:zamknij();'><div style='width:100%; height:100%;'> </div></a>";
document.getElementById("okno").innerHTML ="<table width='500' height='40' border='0' cellpadding='0' cellspacing='0' background='bib/img/bg_okno2.png'><tr><td align='right' valign='top'><div style='outline:none'><a href='javascript:zamknij();'><img src='bib/img/b_x2.png' width='45' height='40' style  border='0' /></a></div></td></tr></table><iframe id='ramka_foto1' src='bib/tabele/nowypost01.php?id_t="+(id_t)+"&id_p="+(id_p)+"'  frameborder='0' width='500' height='400'></iframe>" ;

}else{

alert("Wystapil blad w systemie CMS");

}
	
}

//

function edytuj_p(id_e) {

yScroll = document.body.scrollTop ||document.documentElement.scrollTop;
yScroll2 = document.body.scrollHeight ||document.documentElement.scrollHeight;

var w = 500;
var h= 400;

if((yScroll+h)>=yScroll2) {
	
var sc= (yScroll-((yScroll+h)-yScroll2))-80;
var yScroll= sc;
scroll(0,sc);

}
  
document.getElementById("zaslona").style.width =  100+"%";
document.getElementById("zaslona").style.height = yScroll2+"px";
document.getElementById("zaslona").style.top = 0;
document.getElementById("zaslona").style.left = 0;
document.getElementById("zaslona").style.display = 'block';

var width  = w;
var height = h;
var left = (document.documentElement.clientWidth  - width)/2;
var top = 30+ yScroll;

document.getElementById("okno").style.top = top+"px";
document.getElementById("okno").style.left = left+"px";
document.getElementById("okno").style.display = 'block';

if (document.getElementById){

document.getElementById("zaslona").innerHTML ="<a href='javascript:zamknij();'><div style='width:100%; height:100%;'> </div></a>";
document.getElementById("okno").innerHTML ="<table width='500' height='40' border='0' cellpadding='0' cellspacing='0' background='bib/img/bg_okno2.png'><tr><td align='right' valign='top'><div style='outline:none'><a href='javascript:zamknij();'><img src='bib/img/b_x2.png' width='45' height='40' style  border='0' /></a></div></td></tr></table><iframe id='ramka_foto1' src='bib/tabele/edytujpost01.php?id_e="+(id_e)+"'  frameborder='0' width='500' height='400'></iframe>" ;

}else{

alert("Wystapil blad w systemie CMS");

}
	
}






