// vote by maxiu
function vote(file, point, galleryId) {
	new Ajax.Updater('voting_' + file, 'vote.php', {
		parameters: {
			picture_file: file,
			point: point,
			gallery_id: galleryId
		},
		evalScripts: true
	});
}


function displayWindow(url, width, height) 
{var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no' );}


function popUp(url,windowName,windowTitle,closeOnClick,width,height,t)
{
	if (!url) {
		return
	}
	function readSize(){if(t.complete)showPopup(t.width,t.height);else setTimeout(readSize,1e2)}
	function showPopup(w,h){with(window.open('',windowName||'','width='+(width||w)+',height='+(height||h)).document){open();write('<html><head><title>'+(windowTitle||'')+'</title></head><body style="margin:0;padding:0"><img src="'+url+'" style="display:block'+(closeOnClick?';cursor: pointer" onclick="self.close()" title="Zamknij okno"':'"')+'></body></html>');close()}}
	if(!width||!height)t=new Image(),t.src=url,readSize()
	else showPopup(width,height)
}


function Pokaz(secNum)
{
	secNum = document.getElementById(secNum);
  if (secNum.style.display=="") {
    secNum.style.display="none";
  } else {
    secNum.style.display="";
  }
}


