function ShowImage(DivName, ImageFile, ImageWidth, ImageHeight)
{
	FrameImageHeight = ImageHeight - 5;
	FrameImageWidth = ImageWidth - 6;
	document.getElementById(DivName).innerHTML = 
"<table border='0' cellspacing='0' cellpadding='0'>"
+" <tr>"
+"  <td colspan='2'>"+"<img src='" + ImageFile + "' height='" + ImageHeight + "' width='"+ ImageWidth + "' /></td>"
+"  <td valign='top'>"
+"   <table border='0' cellspacing='0' cellpadding='0'>"
+"    <tr>"
+"     <td><img src='/images/cornerup1.gif' width='7px' height='7px'/></td>"
+"    </tr>"
+"    <tr>"
+"     <td><img src='/images/vertical1.gif' width='7px' height='"+FrameImageHeight+"'/></td>"
+"    </tr>"
+"   </table>"
+"  </td>"
+" </tr>"
+" <tr>"
+"  <td><img src='/images/cornerl1.gif' width='7px' height='7px'/></td>"
+"  <td><img src='/images/horizontal1.gif' height='7px' width='"+FrameImageWidth+"' /></td>"
+"  <td><img src='/images/cornerr1.gif' width='7px' height='7px'/></td>"
+" </tr>"
+"</table>";
}

function OpenImage(FotoTitle, ImageFile, ImageWidth, ImageHeight)
{
	FrameImageHeight = ImageHeight - 5;
	FrameImageWidth = ImageWidth - 6;
//ImageLine = "<img class='picture' src='" + ImageFile + "' onclick='javascript:window.close();'/>";
ImageLine ="<table border='0' cellspacing='0' cellpadding='0'>"
+" <tr>"
+"  <td colspan='2'>"+"<img class='picture' src='" + ImageFile + "' height='" + ImageHeight + "' width='"+ ImageWidth + "' onclick='javascript:window.close();'/></td>"
+"  <td valign='top'>"
+"   <table border='0' cellspacing='0' cellpadding='0'>"
+"    <tr>"
+"     <td><img src='/images/cornerup1.gif' width='7px' height='7px'/></td>"
+"    </tr>"
+"    <tr>"
+"     <td><img src='/images/vertical1.gif' width='7px' height='"+FrameImageHeight+"'/></td>"
+"    </tr>"
+"   </table>"
+"  </td>"
+" </tr>"
+" <tr>"
+"  <td><img src='/images/cornerl1.gif' width='7px' height='7px'/></td>"
+"  <td><img src='/images/horizontal1.gif' height='7px' width='"+FrameImageWidth+"' /></td>"
+"  <td><img src='/images/cornerr1.gif' width='7px' height='7px'/></td>"
+" </tr>"
+"</table>";

FotoTitle = "<h1>" + FotoTitle + "</h1>";
var win = window.open("","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=yes, width=1000, height=1200");
//var win = window.open("", "win", "width=300,height=200"); // a window object
var doc = win.document;
doc.open("text/html", "replace");
doc.write("<html>");
doc.write("<head>");
doc.write(" <meta http-equiv='Content-Language' content='pl'>");
doc.write("	<meta http-equiv='Content-Type' content='text/html; charset=windows-1250'>");
doc.write("	<title>Foto</title>");
doc.write("	<base target='_self'>");
doc.write("<link rel='stylesheet' type='text/css' href='ien1.css' />");
doc.write("</head>");
doc.write("<body>");
doc.write("<center>");
doc.write("			<table border='0px' cellpadding='0px' cellspacing='0px' bgcolor='#ffffff'>");
doc.write("				<thead>");
doc.write("					<tr>");
doc.write("						<td class='header'>");
doc.write(FotoTitle);
doc.write("						</td>");
doc.write("					</tr>");
doc.write("					<tr>");
doc.write("						<td class='ribbonnieb'></td>");
doc.write("					</tr>");
doc.write("				</thead>");
doc.write("				<tbody>");
doc.write(" 					<tr>");
doc.write("           				<td height='40px'>&nbsp;</td>");
doc.write("   	    			</tr>");
doc.write(" 					<tr>");
doc.write("           				<td align='center'>");
doc.write(ImageLine);
doc.write(" 						</td>");
doc.write("   	    			</tr>");
doc.write("      			</tbody>");
doc.write("      			<tfoot>");
doc.write(" 					<tr>");
doc.write("           				<td height='50px' align='center' valign='bottom'><a href='javascript:window.close();'>Close</a></td>");
doc.write("   	    			</tr>");
doc.write("					<tr>");
doc.write("						<td class='footer'></td>");
doc.write("			    	</tr>");
doc.write("			    </tfoot>");
doc.write("         </table>");
doc.write("</center>");
doc.write("</body>");
doc.write("</html>");
doc.close();
}

