 var boxWidth = 990 ;
 var boxHeight = 255 ;
 var fadeInTime = 600;
 var fadeOutTime = 1000;
 var popUpLifeTime = 10000; // time in ms, if 0 then no expire
 var bgColor = '#000';
 var bgOpacity = 85; // range (0~100)
 window.onload = function()
 {
 	 if( _startowa == 1 )
 	 {
		//showPopUpBox();
	 }
 }
function showPopUpBox()
{
	elem = document.getElementById("popUpBox");
	$("#popUpBox").fadeIn(fadeInTime);
	elem.style.left = $(window).width()/2-boxWidth/2+'px';
	elem.style.position = 'fixed';
	elem.focus;
	elem.style.top = $(window).height()/2-boxHeight/2+'px';
	var divTag = document.createElement("div");
	divTag.id = "wholPageBox";
	if(divTag.addEventListener){
	divTag.addEventListener('click',closeBox,false);
	}
	else{
	divTag.attachEvent('onclick', closeBox);
	}
	divTag.style.display = 'none';
	divTag.style.width = $(document).width()+'px';
	divTag.style.height = $(document).height()+'px';
	divTag.style.backgroundColor = bgColor;
	divTag.style.opacity = bgOpacity/100;
	divTag.style.filter = 'alpha(opacity='+bgOpacity+')';
	divTag.style.position = 'absolute';
	divTag.style.left = '0';
	divTag.style.top = '0';
	divTag.style.zIndex = '1000';
	document.body.appendChild(divTag);
	$("#wholPageBox").fadeIn(fadeInTime);
	if(popUpLifeTime>0){
	setTimeout("closeBox()",popUpLifeTime);
	}
}
function closeBox()
{
	elem = document.getElementById("popUpBox");
	$("#popUpBox").fadeOut(fadeOutTime);
	$("#wholPageBox").fadeOut(fadeOutTime, function() {
   	var reElement = document.getElementById('wholPageBox');
	document.body.removeChild(reElement);
  });
}
