
function ShowBigImage(strImageFileName, intImageWidth, intImageHeight){
	var config;
	config = windowGaleryConfig (intImageWidth, intImageHeight, 0, 0);
	pop = window.open ("","pop",config)
	pop.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">');
    pop.document.write('<HTML>');
    pop.document.write('<TITLE> ..:: Galeria ::.. </TITLE>');
    pop.document.write('<META NAME="Author" CONTENT="http://www.inetservis.com.pl">');
    pop.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">');
    pop.document.write('<link type="text/css" rel="stylesheet" href="style/print.css">');
    pop.document.write('</head>');
    pop.document.write('<body bgcolor=#ffffff style="margin: 0"><center>');
    pop.document.write('<a href="#" onClick="window.close()">');
    pop.document.write('<IMG SRC=" ' +  strImageFileName + '" WIDTH="' + intImageWidth + '" HEIGHT="' + intImageHeight + '" BORDER="0"ALT=""></a></center>');
	pop.document.write('</body></html>');
	pop.document.close();
	pop.focus();
}

function ShowGalleryImage(strImageFileName, intImageWidth, intImageHeight){
	var config;
	config = windowGaleryConfig (intImageWidth, intImageHeight, 10, 25);

	popGaleryShow = window.open (strImageFileName,"galeria",config)
	popGaleryShow.document.close();
	popGaleryShow.focus();
}

function windowGaleryConfig (intImageWidth, intImageHeight, intImageBorderWidth, intImageBorderHeight){
	if(window.screen){
		intDisplayWidth=screen.availWidth;
		intDisplayHeight=screen.availHeight;
	}
	else{
		intDisplayWidth=640;
		intDisplayHeight=480;
	}
	intWidthWindow = intImageWidth + intImageBorderWidth;
	intHeightWindow = intImageHeight + intImageBorderHeight;
	config='toolbar=no, location=no, directories=no, status=no, menubar=no,scrollbars=no, resizable=no,'
	config += 'left=' + (intDisplayWidth-intImageWidth)/2 + ','
	config += 'top=' + (intDisplayHeight-intImageHeight)/2 + ','
	config += 'screenX=' + (intDisplayWidth-intImageWidth)/2 + ','
	config += 'screenY=' + (intDisplayHeight-intImageHeight)/2 + ','
	config += 'width=' + intWidthWindow + ','
	config += 'height=' + intHeightWindow + ','
	config += 'innerWidth' + intImageWidth + ','
	config += 'innerHeight' + intImageHeight+ ','
	return config;
}