document.write('<style type="text/css">.userNotify{display:none}</style>');




function infoOnScreen ()
{
  
  elements = getElementsByClassName('userNotify');
  if (!elements) return true;
  
  s = '<ul>';
  
  for(i in elements)
  {
    s += '<li>'+elements[i].innerHTML+"</li>\n";
  }
  
  s += '</ul>';
  
  if (s!='<ul></ul>') showAlert(s);
}



function showAlert(s)
{
  iBoxSize = 300; // podle CSS
  iBoxTop = 300; // podle css
  
  iScrollTop = document.documentElement.scrollTop;
  if (iScrollTop == 0) iScrollTop = document.body.scrollTop;
  
  
  baseElm = document.getElementById('page-container-in');
  baseElmWidth = baseElm.offsetWidth;
  
  newDiv = document.createElement('div');
  newDiv.setAttribute('id', 'infoBox');
  newDiv.style.left = ((baseElmWidth/2)-(iBoxSize/2))+'px';
  newDiv.style.top = (iBoxTop + iScrollTop)+'px';
  newDiv.innerHTML = '<h1>&nbsp;</h1>';
  
  
  newButton = document.createElement('a');
  newButton.setAttribute('id', 'infoBox-close');
  newButton.onclick = closeAlert;
  newButton.href='#';
  newButton.innerHTML = '<img src="'+HTTP_PATH+'images/btn-close.png"/>';
  
  
  s = s.replace('\n', '<br/>');
  
  newDivIn = document.createElement('div');
  newDivIn.setAttribute('id', 'infoBox-in');
  newDivIn.innerHTML = s;
  
  newDiv.appendChild(newDivIn);
  newDiv.appendChild(newButton);
  
  baseElm.appendChild(newDiv);
  
  window.setTimeout(closeAlert, 6000);
}


function closeAlert()
{
  //baseElm = document.getElementById('page-container-in');
  elm = document.getElementById('infoBox');
  elm.parentNode.removeChild(elm);
  return false;
}


window.onload=function () {infoOnScreen();};
