﻿function kepmutat(imageURL) {

        var opt='scrollbars=no,width=150,height=100,left=100,top=100';

        imgWin = window.open('','',opt);

        with (imgWin.document) {

                writeln('<html><head><title>...</title><style type="text/css">body {overflow: auto; margin: auto; margin:0; padding: 0;}</style>');

                writeln('<sc'+'ript type="text/javascript">');

                writeln('function resizePopup() {');

                writeln('width = document.images[0].width + 10; ');

                writeln('height = document.images[0].height + 30; ');

                writeln('window.resizeTo(width,height); ');

                writeln('if (window.innerWidth) { window.innerWidth = width - 10; window.innerHeight = height - 30; }');

                writeln('}');

                writeln('</s' + 'cript>');

                writeln('</head><body bgcolor="#000000" onload="resizePopup();">')

                writeln('<img src="'+imageURL+'" onclick="window.close();" border="0" style="position: absolute; left: 0px; top: 0px; cursor: pointer;"/></body></html>');

                close();

        }

}
