function openAlertWindow(sText) {

    myP1 = document.getElementById("paragkos");
    myP1.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 openAlertLite(sText2) {

    myP2 = document.getElementById("paraglite");
    myP2.innerHTML = sText2;

    var cover2 = document.getElementById("cover");
    cover2.style.display = "block";

    cover2.style.width = parseInt(document.body.clientWidth) + "px";
    cover2.style.height = parseInt(document.body.clientHeight) + "px";

    var hidden2 = document.getElementById("alertlite");
    hidden2.style.display = "block";
    
    hidden2.style.left = parseInt(((winW()/2) - (hidden2.clientWidth/2)) + ScrollLeft())+"px";
    hidden2.style.top = parseInt(((winH()/2) - (hidden2.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;
}
