
function show_foto(foto, width, height, capt)
{
   if (screen.height <= height) {
     width  = width * 0.70;
     height = height * 0.70;
   }

   var px = (screen.width - width) / 2;
   var py = (screen.height - height - 70) / 2;
   var sx = width + 2;
   var sy = height + 2;

   newwindow=window.open('../strony/page_foto.php?W=' + width + '&H=' + height + '&foto=' + foto + '&capt=' + capt,'thewin','width=' + sx + ',height=' + sy + ',resizable=no,scrollbars=no,menubar=no,left=' + px + ',top=' + py);

}


function show_film(film, width, height)
{

   window.open('film.html?film=' + film, "Zdjêcie",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=no,menubar=no,left=0,top=0');
}

function showWindowN(url, width, height) 
{
   var px = (screen.width - width) / 2;
   var py = (screen.height - height - 70) / 2;

   window.open(url, '', 'width=' + width + ',height=' + height + ',resizable=0,scrollbars=no,menubar=no,left=' + px + ',top=' + py);
}

function showWindowY(url, width, height) 
{
   var px = (screen.width - width) / 2;
   var py = (screen.height - height - 70) / 2;

   window.open(url, '', 'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no,left=' + px + ',top=' + py);
}


function menuInit(txt1, txt2, txt3, txt4)
{
smenu[0] = txt1;
smenu[1] = txt2;
smenu[2] = txt3;
smenu[3] = txt4;
}


function statusInit(itxt)
{
   stScMsg = itxt;
   stScSpeed = 60;
   for (var i=0; i<150; i++) stScMsg = " " + stScMsg;
   statusShow();
}

function statusShow()
{
   window.status = stScMsg;
   stScMsg = stScMsg.substring(1,stScMsg.length) + stScMsg.charAt(0);
   statusTimer = setTimeout("statusShow()",stScSpeed);
}

function bookmarkit(adres, opis)
{
   window.external.addFavorite(adres,opis);
}

function showWndMax()
{
  self.moveTo(0,0);
  self.resizeTo(screen.availWidth,screen.availHeight);
}

function menushow(menuix, menusx)
{
  var smenu;
  var imenu;
  var gmenu;
  smenu = document.getElementById('menus1').style;
  smenu.visibility = "hidden";
  smenu = document.getElementById('menus2').style;
  smenu.visibility = "hidden";
  smenu = document.getElementById('menus3').style;
  smenu.visibility = "hidden";
  smenu = document.getElementById('menus4').style;
  smenu.visibility = "hidden";
  smenu = document.getElementById('menus5').style;
  smenu.visibility = "hidden";

  gmenu = document.getElementById('menug');
  imenu = document.getElementById(menuix);
  smenu = document.getElementById(menusx);
  if (menusx == 'menus5')
  {
    smenu.style.left = gmenu.offsetLeft + imenu.offsetLeft - (smenu.offsetWidth - imenu.offsetWidth);
  }
  else
  {
    smenu.style.left = gmenu.offsetLeft + imenu.offsetLeft;
  }
  smenu.style.visibility = "visible";
}

function showmenu(menusx)
{
  var smenu = document.getElementById(menusx).style;
  smenu.visibility = "visible";
}

function hidemenu(menusx)
{
  var smenu = document.getElementById(menusx).style;
  smenu.visibility = "hidden";
}

function showpage() 
{
  var sstrona = document.getElementById("Strona");

  sstrona.style.width = document.body.clientWidth;
  sstrona.style.visibility = "visible";
 
}
