var poc = 0;
var iwinTitle = "Foto";


function showImage(imgName, imWidth, imHeight, iTitle)  
    { 
      if (poc!==0) { iwin.close(); }; 

      url = imgName;
      resStr = "resizable=0,scrollbars=0";

      // define window oversize
      winPlusWidth = 20;
      winPlusHeight = 40;
      // calculate window size
      winHeight = imHeight + winPlusHeight;
      winWidth = imWidth + winPlusWidth;
      // test if the window is not too large
			heightOK = true;
      if (winHeight > screen.availHeight)
        { winHeight = screen.availHeight-80;
      	  resStr=",resizable=1,scrollbars=1";
    			heightOK = false;
      	}
      if (heightOK==false)
        { winWidth = winWidth+22;
      	}								 
      if (winWidth>screen.width)
        { winWidth = screen.width-80;
      	  resStr=",resizable=1,scrollbars=1";
      	}								 

      // calculate centered window position
      winLeft = Math.round((screen.width-winWidth)/2);
      winTop  = Math.round((screen.availHeight-winHeight)/2);

      iwin = window.open("", "", "left="+winLeft+",top="+winTop+",height="+winHeight+",width="+winWidth+",directories=no,location=no,menubar=no,status=no,toolbar=no"+resStr);
      iwin.document.write("<html><head><title>", iTitle, "</title>");
      iwin.document.write("<link rel='stylesheet' type=\'text/css\' href='/css/solana.css'>");
      iwin.document.write("</head>");
      iwin.document.write("<body style=\"margin:10px; background-image:none; background-color: #411C13;\">");
      iwin.document.write("<img width=", imWidth," height=", imHeight," src=\"", url, "\" border=\"0\" style=\"border: 1px solid #757575;\">");
      iwin.document.write("<table align=\"center\" cellpadding=\"0\" cellspacing=\"0\"><tr><td><img src=\"/images/spacer.gif\" width=\"1\" height=\"3\"></td></tr><tr><td align=\"right\"><a href=\"javascript:window.close();\" class=\"close\">zavřít obrázek</a></td></tr></table>");
      iwin.document.write("</body></html>");
      poc++;
      return true;
    }


function showImageEn(imgName, imWidth, imHeight, iTitle)  
    { 
      if (poc!==0) { iwin.close(); }; 

      url = imgName;
      resStr = "resizable=0,scrollbars=0";

      // define window oversize
      winPlusWidth = 20;
      winPlusHeight = 40;
      // calculate window size
      winHeight = imHeight + winPlusHeight;
      winWidth = imWidth + winPlusWidth;
      // test if the window is not too large
			heightOK = true;
      if (winHeight>screen.availHeight)
        { winHeight = screen.availHeight-80;
      	  resStr=",resizable=1,scrollbars=1";
    			heightOK = false;
      	}
      if (heightOK==false)
        { winWidth = winWidth+22;
      	}								 
      if (winWidth>screen.width)
        { winWidth = screen.width-80;
      	  resStr=",resizable=1,scrollbars=1";
      	}								 

      // calculate centered window position
      winLeft = Math.round((screen.width-winWidth)/2);
      winTop  = Math.round((screen.availHeight-winHeight)/2);

      iwin = window.open("", "", "left="+winLeft+",top="+winTop+",height="+winHeight+",width="+winWidth+",directories=no,location=no,menubar=no,status=no,toolbar=no"+resStr);
      iwin.document.write("<html><head><title>", iTitle, "</title>");
      iwin.document.write("<link rel='stylesheet' type=\'text/css\' href='/css/solana.css'>");
      iwin.document.write("</head>");
      iwin.document.write("<body style=\"margin:10px; background-image:none; background-color: #411C13;\">");
      iwin.document.write("<img width=", imWidth," height=", imHeight," src=\"", url, "\" border=\"0\" style=\"border: 1px solid #757575;\">");
      iwin.document.write("<table align=\"center\" cellpadding=\"0\" cellspacing=\"0\"><tr><td><img src=\"/images/spacer.gif\" width=\"1\" height=\"3\"></td></tr><tr><td align=\"right\"><a href=\"javascript:window.close();\" class=\"close\">close image</a></td></tr></table>");
      iwin.document.write("</body></html>");
      poc++;
      return true;
    }
    
    
    
function showImageDe(imgName, imWidth, imHeight, iTitle)  
    { 
      if (poc!==0) { iwin.close(); }; 

      url = imgName;
      resStr = "resizable=0,scrollbars=0";

      // define window oversize
      winPlusWidth = 20;
      winPlusHeight = 40;
      // calculate window size
      winHeight = imHeight + winPlusHeight;
      winWidth = imWidth + winPlusWidth;
      // test if the window is not too large
			heightOK = true;
      if (winHeight>screen.availHeight)
        { winHeight = screen.availHeight-80;
      	  resStr=",resizable=1,scrollbars=1";
    			heightOK = false;
      	}
      if (heightOK==false)
        { winWidth = winWidth+22;
      	}								 
      if (winWidth>screen.width)
        { winWidth = screen.width-80;
      	  resStr=",resizable=1,scrollbars=1";
      	}								 

      // calculate centered window position
      winLeft = Math.round((screen.width-winWidth)/2);
      winTop  = Math.round((screen.availHeight-winHeight)/2);

      iwin = window.open("", "", "left="+winLeft+",top="+winTop+",height="+winHeight+",width="+winWidth+",directories=no,location=no,menubar=no,status=no,toolbar=no"+resStr);
      iwin.document.write("<html><head><title>", iTitle, "</title>");
      iwin.document.write("<link rel='stylesheet' type=\'text/css\' href='/css/solana.css'>");
      iwin.document.write("</head>");
      iwin.document.write("<body style=\"margin:10px; background-image:none; background-color: #411C13;\">");
      iwin.document.write("<img width=", imWidth," height=", imHeight," src=\"", url, "\" border=\"0\" style=\"border: 1px solid #757575;\">");
      iwin.document.write("<table align=\"center\" cellpadding=\"0\" cellspacing=\"0\"><tr><td><img src=\"/images/spacer.gif\" width=\"1\" height=\"3\"></td></tr><tr><td align=\"right\"><a href=\"javascript:window.close();\" class=\"close\">schließen</a></td></tr></table>");
      iwin.document.write("</body></html>");
      poc++;
      return true;
    }


// fullscreen

function fullscreenImage(imgName, imWidth, imHeight, iTitle)  
    { 
      if (poc!==0) { iwin.close(); }; 

      url = imgName;
      resStr = "resizable=0,scrollbars=0";

      // define window oversize
      winPlusWidth = 0;
      winPlusHeight = 35;
      // calculate window size
      winHeight = imHeight + winPlusHeight;
      winWidth = imWidth + winPlusWidth;
      // test if the window is not too large
			heightOK = true;
      if (winHeight>screen.availHeight)
        { winHeight = screen.availHeight-80;
      	  resStr=",resizable=1,scrollbars=1";
    			heightOK = false;
      	}
      if (heightOK==false)
        { winWidth = winWidth+22;
      	}								 
      if (winWidth>screen.width)
        { winWidth = screen.width-80;
      	  resStr=",resizable=1,scrollbars=1";
      	}								 

      // calculate centered window position
      winLeft = Math.round((screen.width-winWidth)/2);
      winTop  = Math.round((screen.availHeight-winHeight)/2);

      iwin = window.open("", "", "fullscreen,directories=no,location=no,menubar=no,status=no,toolbar=no"+resStr);
      iwin.document.write("<html><head><title>", iTitle, "</title>");
      iwin.document.write("<link rel='stylesheet' type='text/css' href='/css/style.css'>");
      iwin.document.write("</head>");
      iwin.document.write("<body topmargin=\"0\" leftmargin=\"0\">");
      iwin.document.write("<a href=\"javascript:window.close();\" title=\"Klepnutím na obrázek zavřete okno\"><img width=", imWidth," height=", imHeight," src=\"", url, "\" border=0></a>");
      iwin.document.write("<br><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td align=\"right\"><table><tr><td><a href=\"javascript:window.close();\"><img src=\"images/close2.gif\" width=\"14\" height=\"14\" border=\"0\"></a></td><td><a href=\"javascript:window.close();\" class=\"zavrit\">zavřít</a></td></tr></table></td></tr></table>");
      iwin.document.write("</body></html>");
      poc++;
      return true;
    }

