
function showGsPopup( attributes )
{
	var wnd = $(window), doc = $(document),
	pTop = doc.scrollTop(), pLeft = doc.scrollLeft(),
	minTop = pTop;
	
	$(".gspopup > .top > .title").html( attributes["title"] );
	$(".gspopup > .content").html( attributes["content"] );
	$(".gspopup > .top > .close > .close-btn").hover(
						function () {
							$(this).attr( "src", "/images/gspopup/close_hover.gif" );
						}, 
						function () {
							$(this).attr( "src", "/images/gspopup/close.gif" );
						}
					);
	$(".gspopup > .top > .close > .close-btn").click(function () {
      hideGsPopup();
    });
	
	pLeft += (wnd.width() / 2) - ($(".gspopup").width() / 2);
	pTop += (wnd.height() / 2) - ($(".gspopup").height() / 2);
	pTop = Math.max(pTop, minTop);
	$(".gspopup").css({top: pTop, left: pLeft, display: "block"});
	$(".gspopup").draggable();
}

function hideGsPopup()
{
	$(".gspopup").hide();
}

function displayGsPopup()
{
	$(".gspopup").show();
}
