function createPopup(popupMsg, popupMainArea, popupFooterNote)
{
	//$("#js_H1").html(js_H1);
	$("#popupMsg").html(popupMsg);
	$("#popupMainArea").html(popupMainArea);
	$("#popupFooterNote").html(popupFooterNote);
}
function loadPopup()
{
	$("#backgroundPopup").css({"opacity": "0.1"});
	$("#backgroundPopup").fadeIn("fast");
	$("#popupContainer").slideDown("slow");
}
function disablePopup()
{
	$("#backgroundPopup").fadeOut("slow");
	$("#popupContainer").slideUp("slow");
}
function centerPopup()
{
	var scrollTop = $(document).scrollTop();
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#popupContainer").height();
	var popupWidth = $("#popupContainer").width();
	$("#popupContainer").css({"position": "absolute","top": (windowHeight/2-popupHeight/2)+scrollTop,"left": windowWidth/2-popupWidth/2});
	$("#backgroundPopup").css({"height": windowHeight});
}

$(document).ready(function()
{
	/*$("#popupBtn").click(function()	{
		centerPopup();
		loadPopup();
	});*/
	
	$("#popupWindowClose, .popupCancelBtn").click(function() {
		disablePopup();
	});
	
	$(document).keypress(function(e) {
		if(e.keyCode==27)//Disable popup on pressing `ESC`
		{
			disablePopup();
		}
	});
});

