<!--
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' );
}
var key = new Array();
key['!'] = "cms_admin/";
function getKey(keyStroke) {
isNetscape=(document.layers);
eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
which = String.fromCharCode(eventChooser).toLowerCase();
for (var i in key) if (which == i) window.location = key[i];
}
document.onkeypress = getKey;

function PopupPic(sPicURL) {
window.open("photo.php?"+sPicURL, "", "resizable=1,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){
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 top(id){

tid = 't'+id;
fid = 'f'+id;

if (type=="IE"){
eval("document.all." + tid + ".className = 'mtop'");
eval("document.all." + fid + ".className = 'mtop_font'");
}

if (type=="NN"){
eval("document." + tid + ".className='mtop'");
eval("document." + fid + ".className='mtop_font'");
}

if (type=="MO" || type=="OP"){
eval("document.getElementById('" + tid + "').className='mtop'");
eval("document.getElementById('" + fid + "').className='mtop_font'");
}

}




function top2(id){

tid = 't'+id;
fid = 'f'+id;

if (type=="IE"){
eval("document.all." + tid + ".className = 'mtop2'");
eval("document.all." + fid + ".className = 'mtop2_font'");
}

if (type=="NN"){
eval("document." + tid + ".className='mtop2'");
eval("document." + fid + ".className='mtop2_font'");
}

if (type=="MO" || type=="OP"){
eval("document.getElementById('" + tid + "').className='mtop2'");
eval("document.getElementById('" + fid + "').className='mtop2_font'");
}


}






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 = "http://www.kleczew.pl";
var title = "Miasto i Gmina Kleczew";



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 == "")){
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 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");
}


   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;
}



function wyniki(s_id) {
window.open("cms_inc/cms_sonda_w2_wyniki.php?sonda_id="+s_id,"","width=340,height=280,resizable=0,scrollbars=yes,menubar=no");
}


function licz_watek(max){
var ile_jest = document.w_form.watek.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 licz_komentarz(max){
var ile_jest = document.k_form.komentarz.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>';
}
}


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

* 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=["cms_img/c0.gif", "cms_img/c1.gif", "cms_img/c2.gif", "cms_img/c3.gif", "cms_img/c4.gif", "cms_img/c5.gif", "cms_img/c6.gif", "cms_img/c7.gif", "cms_img/c8.gif", "cms_img/c9.gif", "cms_img/cam.gif", "cms_img/cpm.gif", "cms_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]-12+""
		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]+'<img src="'+imageclock.digits[12]+'" />'+sections[2]
	}

	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 prepareMouseOverImage(image, originalURL)
{

  // Save the original Image URL
  image.mouseOverImage=originalURL;

  // Create the grayscale image
  image.normalImage=grayscale(image, false);


  // Override the old handler (otherwise the onmouse over event handler will

  // call it again).
  image.onload=function(){return true;};



  // Assign onmouseover and onmouseout event handlers
  image.onmouseover=function()
  {
    this.src=this.normalImage;
  }

  image.onmouseout=function()
  {
    this.src=this.normalImage;
  }


  // Set the grayscale as the "normal" state image
  image.src=image.normalImage;
}
-->
