var popup = null;

var lastHeight = 0;
var lastWidth = 0;

function showimage(file, width, height){
	var left;
	var top;

	if(popup != null && ! popup.closed && lastHeight > 0 && lastWidth > 0){
		if(width-lastWidth != 0 || height-lastHeight != 0)
			popup.resizeBy(width-lastWidth, height-lastHeight);
	}else{
		if(popup != null && ! popup.closed){
			popup.close();
		}
	}

	popup = window.open(file, "image", "width="+width+",height="+height+",left=20,top=20");

	lastHeight = height;
	lastWidth = width;

	popup.focus();
	return false;
}