
	 noweOkienko = null;
 function galeria(src, w, h, podpis){
	 if(window.screen){ aw=screen.availWidth;ah=screen.availHeight; }else{ aw=320; ah=450;	}
	 if(noweOkienko==null || noweOkienko.closed){
	  ustawienia=
	  "left=" + (w)/2 + ","	  +"top=" + (h)/2 + ","	  +"screenX=" + (aw-w)/2 + ","	  +"screenY=" + (ah-h)/2 + ","	  +"width=" + w + ","
	  +"height=" + h + ","	  +"innerWidth=" + w + ","	  +"innerHeight=" + h + ","	  +"toolbar=0,"	  +"location=0,"
	  +"directories=0,"	  +"status=0,"	  +"menubar=0,"	  +"scrollbars=0,"	  +"resizable=0"
	  noweOkienko = window.open("",'obrazek',ustawienia);
	 }
	 noweOkienko.document.open();
	 noweOkienko.document.clear();
	 noweOkienko.document.write(
	 "<html><head>\n"
	 +" <Title> - "+podpis+" - </title>"
	 +" <SCRIPT>"	 +"function na_dol(){"+"new_window = window.resizeTo(width=galeria.width, height=galeria.height+100);"
	 +"}" +"</SCRIPT>" + "</HEAD><BODY topmargin=0 leftmargin=0 onload=na_dol(); ggColor=#ffffff>"
	 +"\n"	 +"\n"	 + "<img name=galeria src=" + src + " onmousedown ='window.close;'>");
	 noweOkienko.document.close();
	 noweOkienko.focus();
 	}

//---------------------------------
	 noweOkienko1 = null;
function openW(strona,width_,height_){
		noweOkienko1 = window.open(strona,'strona','width='+width_+',height='+height_+',toolbars=no,resizeble="yes",scrollbars=yes');
		noweOkienko1.focus();
}
//---------------------------------
	 noweOkienko2 = null;
function openZ(strona,width_,height_){
		noweOkienko2 = window.open(strona,'strona','width='+width_+',height='+height_+',toolbars=no,resizeble="yes",scrollbars=yes');
		noweOkienko2.focus();
}
//---------------------------------
function selecturl(s) {
	var gourl = s.options[s.selectedIndex].value;	
	window.top.location.href = gourl;
}
//wstaw obrazek funkcje obsługujace wstawianie obrazka tablica
function wstawdate(zmienna){
	var zmienna;
    var dataw=showModalDialog("popups/insert_data.php",window,"resizable: yes; help: no; status: no; scroll: no; ");
	
	if (dataw!=null){
		document.getElementById(zmienna).focus();
		document.getElementById(zmienna).value=dataw; 

//		document.form1.elements[zmienna].focus();
//		document.form1.elements[zmienna].value=dataw; 
	}
}
//wstaw obrazek funkcje obsługujace wstawianie obrazka tablica
function wstawdate2(form,zmienna){
	var zmienna;
    var dataw=showModalDialog("popups/insert_data.php",window,"resizable: yes; help: no; status: no; scroll: no; ");
	
	if (dataw!=null){
		document.getElementById(zmienna).focus();
		document.getElementById(zmienna).value=dataw; 
		}
}
//-------------------------
function selectCheckboxes(what,pref,stan){  
	for(i=0;i<what.elements.length;i++){    
		if(what.elements[i].type == "checkbox" && what.elements[i].name.substring(0,pref.length) == pref){     
			what.elements[i].checked=stan;    
			}  
		}
}
//-------------------------
function suma(cena){  
	for(i=0;i<cena.length;i++){    
			suma+=cena[$i];
		}
	return suma;
}

