// JavaScript Document

var detailTestImage;
function detail(src) {
	// preload image
	detailTestImage = new Image();
	detailTestImage.src = src;
	// show if loading finished
	detailTestImage.onload = detailShow;
}
function detailShow() {
	// get image details
	width = detailTestImage.width;
	height = detailTestImage.height;
	src = detailTestImage.src;
	// adjust height
	width = Math.round(width)+50;
	height = Math.round(height)+80;
	// generate html page
	html = "<html><head><title>Detailansicht</title></head><body bgcolor=black>";
	html = html + "<table width=100% height=100% border=0 cellpadding=0 cellspacing=0><tr><td align='center' valign='center'>";
	html = html + "<img src='"+src+"'></td></tr></table></body></html>";
	// open window
	win = window.open('','detail','width='+width+',height='+height+',dependent=yes');
	win.resizeTo(width,height); // resize for reuse of already opened windows
	win.document.open();
	win.document.write(html);
	win.document.close();
	win.focus();
}
