
var dopopupwh;
function dopopup(url,winhandle,width,height)
{
	if (typeof(dopopupwh) != "undefined" && dopopupwh != self) {
			dopopupwh.location = url;
			dopopupwh.focus;
			}
		else {
			dopopupwh = open(url,winhandle,'height=' + height + ',width=' + width + ',resizable=yes,scrollbars=yes,menubar=no,toolbar=no,directories=no,location=no,status=no')
		}
}

function fitWindowSize() {
	window.resizeTo(500, 500);
	
	width = 500 - (document.body.clientWidth -  document.images[0].width);
	height = 500 - (document.body.clientHeight -  document.images[0].height);
	window.resizeTo(width+30, height+125);
}

function suicide() {
	self.opener.dopopupwh = opener;
}

