// Anzeigen von großem Bild eines Thumbnails in einem Popup-fenster
var imagewindow, img_header, img_status, img_footer, dispimage, lowsource
function displaybig(obj) {
	var bigfolder="images";
	var location = new String()
	location = obj.src;
	location = location.split("/");
	replacestring = location[location.length-2] + "/" + location[location.length-1];
	bigimagelocation = obj.src.replace(replacestring, bigfolder + "/" + location[location.length-1]);
	lowsource=obj;
	image_in_imagewindowow(bigimagelocation)
}

function image_in_imagewindowow(source) {
	imagewindow=window.open('','',"WIDTH=200, HEIGHT=100");
	img_header, img_status, img_footer;
	img_header = "<HTML><HEAD><TITLE>Zum Schließen Bild klicken</TITLE>"
				+"<link href='/css/Standard.css' rel='stylesheet' type='text/css'></HEAD>"
				+"<body leftmargin='0' topmargin='0' rightmargin='0' bottommargin='0'>";
	img_status = "<div style='position:absolute; top:50%; left:0px; color:#d2e6ed; width:100%'><div style='position:relative; height:50px; top:-25px; width:100%; text-align:center; display:table'><div style='display:table-cell; vertical-align:middle;'>"
				+"Lade das Bild - Bitte warten"
				+"</div></div></div>";
	img_footer = "</body></HTML>";
	imagewindow.document.write(img_header + img_status + img_footer);
	dispimage = new Image()
	dispimage.src = source;
	dispimage.onLoad = checkloadstatus();
}

function checkloadstatus() {
	if (dispimage.complete) {
		imagewindow.close()
		imagewindow=window.open('','',"SCROLLBARS=NO, WIDTH="+dispimage.width+", HEIGHT="+dispimage.height);
		var imagetext="<a href='#'><img border='0' LOWSRC='"+lowsource.src+"' src='" + dispimage.src + "' width='" + dispimage.width + "' height='"+ dispimage.height + "' onclick='window.close()'></a>";
		imagewindow.document.write(img_header, imagetext, img_footer);
		imagewindow.moveTo(0,0);
		imagewindow.document.close()
	} else {
		timer=setTimeout('checkloadstatus()', 100);
	}	
}
