// JavaScript Document
var IE = document.all?true:false;

function showHold() 
{
  if(IE)
  {
    var poz_y = (document.documentElement.scrollTop + 150) + 'px';
  }
  else 
  {
    var poz_y = (window.pageYOffset + 150) +'px';
  }
 
  var poz_x = ((document.body.clientWidth/2)-100) +'px';
  document.getElementById("hold").style.left = poz_x;
  document.getElementById("hold").style.top = poz_y;
  document.getElementById('hold').style.display = "block";
  
  document.getElementById('covering').style.display = "block";
  var wymiary = getPageSize();
  document.getElementById('covering').style.height = wymiary[1] + 'px';
  document.getElementById('covering').style.width = '100%';
  
//  document.getElementById('hold').czas = setTimeout('hideDivTime(\'SystemMessage\', 0)', 10000);

}

function hideHold() 
{
  document.getElementById('hold').style.display = "none";
  document.getElementById('covering').style.display = "none";
}

function getPageSize()
{

  var xScroll, yScroll;

  if (window.innerHeight && window.scrollMaxY) {
     xScroll = document.body.scrollWidth;
     yScroll = window.innerHeight + window.scrollMaxY;
  } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
     xScroll = document.body.scrollWidth;
     yScroll = document.body.scrollHeight;
  } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
     xScroll = document.body.offsetWidth;
     yScroll = document.body.offsetHeight;
  }

  var windowWidth, windowHeight;
  if (self.innerHeight) {   // all except Explorer
     windowWidth = self.innerWidth;
     windowHeight = self.innerHeight;
  } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
     windowWidth = document.documentElement.clientWidth;
     windowHeight = document.documentElement.clientHeight;
  } else if (document.body) { // other Explorers
     windowWidth = document.body.clientWidth;
     windowHeight = document.body.clientHeight;
  }

  // for small pages with total height less then height of the viewport
  if(yScroll < windowHeight){
     pageHeight = windowHeight;
  } else {
     pageHeight = yScroll;
  }

  // for small pages with total width less then width of the viewport
  if(xScroll < windowWidth){
     pageWidth = windowWidth;
  } else {
     pageWidth = xScroll;
  }


  arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
  return arrayPageSize;
}

