function openAlertWindow(sText) {
    
    myP = document.getElementById("odst");
    myP.innerHTML = sText;
    
    //document.getElementByName("odst").innerHTML = sText;
    
    var cover = document.getElementById("cover");
    cover.style.display = "block";

    cover.style.width = parseInt(document.body.clientWidth)+"px";
    cover.style.height = parseInt(document.body.clientHeight)+"px";

    var hidden = document.getElementById("alert");
    hidden.style.display = "block";

    hidden.style.left = parseInt(((winW()/2) - (hidden.clientWidth/2)) + ScrollLeft())+"px";
    hidden.style.top = parseInt(((winH()/2) - (hidden.clientHeight)) + ScrollTop())+"px";
}


function ScrollTop() {
    return (document.body.scrollTop || document.documentElement.scrollTop);
}

function ScrollLeft() {
    return (document.body.scrollLeft || document.documentElement.scrollLeft)
}

function winH() {
   if (window.innerHeight)
      /* NN4 a kompatibilní prohlížeče */
      return window.innerHeight;
   else if
   (document.documentElement &&
   document.documentElement.clientHeight)
      /* MSIE6 v std. režimu - Opera a Mozilla
      již uspěly s window.innerHeight */
      return document.documentElement.clientHeight;
   else if
   (document.body && document.body.clientHeight)
      /* starší MSIE + MSIE6 v quirk režimu */
      return document.body.clientHeight;
   else
      return null;
}

function winW() {
   if (window.innerWidth)
      /* NN4 a kompatibilní prohlížeče */
      return window.innerWidth;
   else if
   (document.documentElement &&
   document.documentElement.clientWidth)
      /* MSIE6 v std. režimu - Opera a Mozilla
      již uspěly s window.innerHeight */
      return document.documentElement.clientWidth;
   else if
   (document.body && document.body.clientWidth)
      /* starší MSIE + MSIE6 v quirk režimu */
      return document.body.clientWidth;
   else
      return null;
}



