/* Poup Window modul - cleanweb.hu 2006.11.06. 15:52:02 */
function cwPopShow(X,Y,Center,id)
{
  // a box a stilusra az obj a div-re mutat majd
  var box = document.getElementById(id).style;
  var obj = document.getElementById(id);
  
  // absolute pozicionalas es az ertekek felvitele a stilusba
  box.position   = "absolute";
  box.left       = X+"px";
  box.top        = Y+"px";
  box.visibility = "visible";
  
  // kozepreigazitas
  if (Center > 0)
  {
    var width = 0;
    var height = 0;
    // az explorer megint feketet mond a feherre :S
    if (AppType() == "FF")
    {
      width = window.innerWidth;
      height = window.innerHeight;
    }
    else
    {
      width  = document.body.offsetWidth;
      height = document.body.offsetHeight;
    }
    // a pozicio kiszamitasa
    var top  = (height-obj.offsetHeight) / 2;
    var left = (width-obj.offsetWidth) / 2;
    box.top  = top+"px";
    box.left = left+"px";
  }
}

function cwPopHide(id)
{
  var box = document.getElementById(id).style;
  box.visibility = "hidden";
}

