﻿/*function showUsers() {
	var pageId = document.usrForm.map.value;
	var url = "index.php?n=kat&k="+pageId;
	//alert (url);
	window.location.replace(url);
}
*/
function show(what) {
	var active;
	var elem = document.getElementById(what);
	if (elem.active == true) {
	elem.style.display = 'none';
	elem.active = false;
	}
	else {
	if (navigator.appName=='Netscape') {elem.style.display = 'table-cell';}
	else  {elem.style.display ='block';}
	elem.active = true;
	}
	
}

function submitSearch() {
	var f = document.getElementById('searchform');
	if ((f.nazwa.value=='-nazwa-')||(f.nazwa.value=='-название-'))
		f.nazwa.value = '';
	if ((f.opis.value=='-opis-')||(f.opis.value=='-описание-'))
		f.opis.value = '';
	f.submit;
}

function openwindow(target){
		window.open(target, "menu", "toolbar=yes, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=700, height=600");
}
function openimg(imagename){
<!-- 
	nw = window.open("about:blank","",'left=100, top=100, location=no, directories=no, width=540, height=540, resizable=0, scrollbars=no, menubar=no')
	doc = nw.document;
	doc.open('text/html');
	doc.write('<html><head><title>Ślub jak marzenie<\/title>');
	doc.write('<style type="text/css">body {background: #f0f0f0 url(imgs/back.gif) left top repeat;height:400px;padding-top:10px;}img {border:0px;}.big_img {border:0}a {color : #ffffff;text-decoration : none;}</style>');
	doc.write('<\/head><body><table width="520" height="540" valign="middle" border="0"><tr><td><center>');
	doc.write('<a href=# onclick=self.close()><img src=' + imagename + ' alt="Zamknij okno" class="big_img" style="vertical-align:middle;"><\/a><\/center><\/td><\/tr><\/table>');
	doc.write('<\/body><\/html>');
	doc.close();
}

function addIndicator(where) {
	var div = document.getElementById(where);
	var ind = document.createElement("img");
	ind.setAttribute("src", "imgs/indicator.gif");
	ind.setAttribute("alt", "Proszę czekać");
	ind.setAttribute("title", "Proszę czekać");
	
	ind.setAttribute("style", "position : absolute; top : 10px;");
	ind.style.position = 'static';
	ind.style.top = '10px';
	ind.style.left = '10px';
	/*
	skrypt poniżej
	niezgodny z IE
	*/
	/*div.insertBefore(ind, div.childNodes[1]);
	div.appendChild(ind);*/
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
