function showWindow(div_name)
{
	// Show overlay
	//
	if (typeof document.body.style.maxHeight === "undefined" || typeof document.body.style.scrollHeight === "undefined")
	{
		//if IE6, hide select boxes
		//
		$("select").css("visibility", "hidden");
		$("body", "html").css({height: "100%", width: "100%"});
		$("html").css("overflow", "hidden");
		$("#overlay").css("filter", "alpha(opacity=70)");
	} 

	$("#overlay").show();

	centerWindow(div_name);
	
	$(div_name).slideDown("slow");
}

function hideWindow(div_name)
{

	$(div_name).slideUp("slow");

	// Hide overlay
	//
	$("#overlay").hide("slow");

	if (typeof document.body.style.maxHeight === "undefined")
	{
		// IE6, show select boxes again
		//
		$("select").css("visibility", "visible");
		$("body","html").css({height: "auto", width: "auto"});
		$("html").css("overflow", "");
	}
}

function centerWindow(div_name)
{
	$(div_name).css({marginLeft: '-' + parseInt((parseInt($(div_name).width()) / 2), 10) + 'px'});
	
	if (!(jQuery.browser.msie && typeof XMLHttpRequest == 'function'))
	{
		// If not IE6
		//
		$(div_name).css({marginTop: '-' + parseInt((parseInt($(div_name).height()) / 2), 10) + 'px'});
	}
}
