var popupBackground = null;

function createPopupBackground()
{
	if (popupBackground == null)
	{
		popupBackground = document.createElement("div");
		popupBackground.setAttribute('id', 'popupBackground');
		popupBackground.innerHTML = "&nbsp;";
		document.body.appendChild(popupBackground);
	}
	
	return popupBackground;
}

function showPopup(name, name2)
{
	$(name).style.display = "block";
	$(name2).style.display = "block";

/*
	$(name).style.position = "absolute";

	//IE nie kuma jak się go pyta o rozmiary strony...
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		$(name).style.left = 200;
		$(name).style.top = 200;
	}
	else
	{
		$(name).style.left = 'auto';//(document.width / 2) - (GetWidth(name) / 2);
		$(name).style.top = 'auto';//(GetHeight(document.body) / 2) - (GetHeight(name) / 2);
	}
*/
	
	//if (navigator.appName != "Microsoft Internet Explorer")
		//createPopupBackground().style.display = "block";
}

function hidePopup(name)
{
	$(name).style.display = "none";
	//if (navigator.appName != "Microsoft Internet Explorer")
	$(name2).style.display = "none";
}

function popupShow(n) { showPopup(n); }
function popupHide(n) { hidePopup(n); }

function confirmAction(action, message)
{
	if (confirm(message))
	{
		document.location = action;
	}

	return false;
}

