function newWin(url, w, h, prozor) {
	var l = (screen.width - w) / 2; 
	var g = (screen.height - h) / 2;
	opcii = "width="+w+",height="+h+",left="+l+",top="+g+",screenX="+l+",screenY="+g;
	otvori=window.open(url, prozor, opcii);
	otvori.focus();
}
function toggle( targetId ){
	if (document.getElementById){
		target = document.getElementById( targetId );
			if (target.style.display == "none"){
				target.style.display = "";
  			} else {
  				target.style.display = "none";
				}
	}
}
function showPic (whichpic) {
	if (document.getElementById) {
		document.getElementById('displayedimg').src = whichpic.href;
		if (whichpic.title) {
			document.getElementById('caption').childNodes[0].nodeValue = whichpic.title;
		}
		else {
			document.getElementById('caption').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
		}
	return false;
	} 
	else {
		return true;
	}
}
