/**
 * @author maciek
 */
function newsPopup(imageFile,w,h){
	var pop = $("#newsPopup");
	h = h+20; //20 px for bottom bar
	//w = w+10; //2x5px for padding
	//center popup
	var screenW = screen.width;
    var screenH = screen.height;  
    if (window.scrollY>=0) { // przesunięcie okna dla Netscape
	    y = window.scrollY;
	  } else { // dla IE, Opery, Firefox
	    y = document.body.scrollTop;
	  }
    var popTop = parseInt((((screenH / 2) - (h/2))-100)+y);
    var popLeft = parseInt((screenW / 2) - (w/2));
 	pop.css({width:w, height:h, top:popTop, left:popLeft});
	pop.html("<a class='newsPopupTopbar' href='javascript:closeNewsPopup()'>Zamknij</a><img onclick='closeNewsPopup()' src='"+imageFile+"' alt='Popup - kliknij aby zamknąć' />");
	
	pop.slideDown();
	return false;	
}
function closeNewsPopup() {
	$("#newsPopup").fadeOut();
}

