function webexperiencePopupLayer(windowWidth,windowHeight,shadeColor)
{
	$(document).ready(function(){
	   $("body").append('<div id="webexperiencePopupLayerBackground" style="display:none;position:fixed; _position:fixed;height:100%;width:100%;top:0;left:0;background:'+shadeColor+';border:1px solid #cecece;z-index:1;"></div>');
	   $("body").append('<div id="webexperiencePopupLayer";"><div id="webexperiencePopupLayer_close" style="text-align:right; border-bottom:1px black solid;;"><img src="http://www.citysport.com.pl/cms/datastore/images/x.gif" alt="Zamknij" onclick="var popup=webexperiencePopupLayer.getInstance();popup.hide();" style="cursor:pointer;"/></div><div id="webexperiencePopupLayer_content" style="text-align:left; overflow:auto;height: '+(windowHeight-30)+'px;"></div></div>');
	   $("#webexperiencePopupLayer").css({'display':'none','position' : 'fixed', 'background-color' : 'white', 'width':windowWidth+'px', 'height':windowHeight+'px', 'left':'50%','top':'50%','z-index':'10000','margin-left':(-1*windowWidth/2)+'px','margin-top':(-1*windowHeight/2)+'px'});
	   
	   /*$(window).scroll(function () {
	   		webexperiencePopupLayer.reposition(); 
	    });
		 */   
	 });
}
	
webexperiencePopupLayer.instance = null;

webexperiencePopupLayer.getInstance = function(windowWidth,windowHeight,shadeColor) {
	if (webexperiencePopupLayer.instance == null) {
		webexperiencePopupLayer.instance = new webexperiencePopupLayer(windowWidth,windowHeight,shadeColor);
		//webexperiencePopupLayer.reposition();
	}
	return webexperiencePopupLayer.instance;
}

webexperiencePopupLayer.prototype.constructor=webexperiencePopupLayer;

webexperiencePopupLayer.prototype.show = function (url)
{
	   $("#webexperiencePopupLayer_content").load(url);
	   $("#webexperiencePopupLayerBackground").css('opacity','0.7').fadeIn("slow");
	   $("#webexperiencePopupLayer").fadeIn("slow");
}

webexperiencePopupLayer.prototype.hide = function ()
{
	$('#webexperiencePopupLayer').fadeOut('slow').remove();
	$('#webexperiencePopupLayerBackground').fadeOut('backgroundPopup').remove();
	webexperiencePopupLayer.instance=null;
}
/*
webexperiencePopupLayer.reposition = function ()
{
	if(webexperiencePopupLayer.instance==null)
		return;
		
	$("#webexperiencePopupLayerBackground").css('top',window.pageYOffset);
}
*/