function imgcPopupImage(imgSrc,imgTitle,imgDesc,imgWidth,imgHeight, galDefinition) { var defs = new Array(); defs[1] = Array("T","","#FFFFFF","1","1","","",""); defAutosize = (defs[galDefinition][0] == "T"); defTitle = defs[galDefinition][1]; defColor = defs[galDefinition][2]; defMarginLeft = defs[galDefinition][3]; defMarginTop = defs[galDefinition][4]; defBodyClass = defs[galDefinition][5]; defImgClass = defs[galDefinition][6]; defCSSFile = defs[galDefinition][7]; if (defCSSFile == "") { CSSFile = "/css/std.css"; } if (defAutosize) { if ((imgWidth+defMarginLeft*2 > screen.availWidth) || (imgHeight+defMarginTop*2 > screen.availHeight)) { rozmiar = 1; } else { rozmiar = -1; } } else { rozmiar = 1; } if (rozmiar == -1) { wWidth = imgWidth+defMarginLeft*2; wHeight = imgHeight+defMarginTop*2; wTop = (screen.availHeight - wHeight)/2; wLeft = (screen.availWidth - wWidth)/2; wScroll = 'no'; wResize = 'no'; if (imgDesc != "") { imgTitle = imgTitle + "\n" + imgDesc; imgDesc = ""; } } else if (rozmiar == 0) { wWidth = screen.availWidth; wHeight = screen.availHeight; wTop = 0; wLeft = 0; wScroll = 'yes'; wResize = 'yes'; } else if (rozmiar > 0) { if (rozmiar == 1) { faktor = 0.99 } if (rozmiar == 2) { faktor = 0.6 } if (rozmiar == 3) { faktor = 0.4 } wWidth = screen.availWidth * faktor; wHeight = screen.availHeight * faktor - 20; wTop = (screen.availHeight - wHeight)/2 - 10; wLeft = (screen.availWidth - wWidth)/2 - 3; if (wLeft < 0) { wLeft = 0; } wScroll = 'yes'; wResize = 'yes'; } defTitle = defTitle.replace( /%1/g, imgTitle ); iswnd = window.open('','','toolbar=no,scrollbars='+wScroll+',resizable='+wResize+',status=no,location=no,directories=no,width='+wWidth+',height='+wHeight+',menubar=no,left='+wLeft+',top='+wTop); iswnd.document.open(); iswnd.document.writeln(""+defTitle+""); iswnd.document.writeln("") iswnd.document.writeln(""); iswnd.document.writeln(""); iswnd.document.writeln(""); iswnd.document.writeln(""); iswnd.document.writeln(""); iswnd.document.writeln("
"); iswnd.document.writeln("" + imgTitle +""); if (imgDesc != '') { iswnd.document.writeln("

" + imgDesc + "

"); } iswnd.document.writeln("
"); iswnd.document.writeln(""); iswnd.document.close(); return; }