﻿function ImagePopup(image,width,height)
{
	var w_width = 0;
	var w_height = 0;
	if (width>0) w_width = width + 70;
		else w_width=300;
	if (height>0) w_height = height + 100;
		else w_height=250;
	var w_top = (screen.height-w_height)/2;
	var w_left = (screen.width-w_width)/2;
	title="Inspector-Wallander.org";
	caption="";

	ImageWindow=window.open("", "ImageViewer", "width="+w_width+", height="+w_height+", top="+w_top+", left="+w_left+", toolbar=no, scrollbars=yes, menubar=no, resizable");

	ImageWindow.document.write("<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>");
	ImageWindow.document.write("<html><head><title>"+title+"</title></head>");
	ImageWindow.document.write("<body style='background-color: white; margin: 3px; font-family: Tahoma, Verdana, Geneva, sans-serif; font-size: 11px;'>");
	ImageWindow.document.write("<TABLE style='width: 100%; height: 100%;'><TR><TD style='text-align: center; vertical-align: middle;'>");
	ImageWindow.document.write("<IMG alt='picture' src='"+image+"' style='border-style: solid; border-width: 1px; border-color: black;'>");
	if (caption!="")
	{
		ImageWindow.document.write("<BR>"+caption);
	}
	ImageWindow.document.write("<BR><BR><FORM><INPUT type='BUTTON' value='Close window'"+ " onClick='self.close()'></FORM>");
	ImageWindow.document.write("</TD></TR></TABLE>");
	ImageWindow.document.write("</body></html>");

	ImageWindow.document.close();
}


function ImagePopup_Url(image,width,height)
{
	var w_width = 0;
	var w_height = 0;
	if (width>0) w_width = width + 70;
		else w_width=300;
	if (height>0) w_height = height + 100;
		else w_height=250;
	var w_top = (screen.height-w_height)/2;
	var w_left = (screen.width-w_width)/2;
	title="Inspector-Wallander.org";

	ImageWindow=window.open(image, "ImageViewer", "width="+w_width+", height="+w_height+", top="+w_top+", left="+w_left+", toolbar=no, scrollbars=yes, menubar=no, resizable");
}