imgIdx = 0;

function showImg(path, w, h) {
	var w = window.open(path, "Bildansicht", "width=" + w + ", height=" + h + ", statusbar=no, addressbar=no");
}

function imgNext () {
	var i0 = document.getElementById("bild_0");
	var i1 = document.getElementById("bild_1");
	var i2 = document.getElementById("bild_2");

	if (i0 == null || i1 == null || i2 == null || iarr == undefined) {
		return;
	}

	imgIdx = Math.min(iarr.length - 3, imgIdx + 3);

	i0.href = "javascript:showImg('" + iarr[imgIdx][1] + "', " + iarr[imgIdx][2] + ", " + iarr[imgIdx][3] + ");";
	i1.href = "javascript:showImg('" + iarr[imgIdx+1][1] + "', " + iarr[imgIdx+1][2] + ", " + iarr[imgIdx+1][3] + ");";
	i2.href = "javascript:showImg('" + iarr[imgIdx+2][1] + "', " + iarr[imgIdx+2][2] + ", " + iarr[imgIdx+2][3] + ");";

	i0.firstChild.src = iarr[imgIdx][0];
	i1.firstChild.src = iarr[imgIdx+1][0];
	i2.firstChild.src = iarr[imgIdx+2][0];

}

function imgBack () {
	var i0 = document.getElementById("bild_0");
	var i1 = document.getElementById("bild_1");
	var i2 = document.getElementById("bild_2");

	if (i0 == null || i1 == null || i2 == null || iarr == undefined) {
		return;
	}

	imgIdx = Math.max(0, imgIdx - 3);

	i0.href = "javascript:showImg('" + iarr[imgIdx][1] + "', " + iarr[imgIdx][2] + ", " + iarr[imgIdx][3] + ");";
	i1.href = "javascript:showImg('" + iarr[imgIdx+1][1] + "', " + iarr[imgIdx+1][2] + ", " + iarr[imgIdx+1][3] + ");";
	i2.href = "javascript:showImg('" + iarr[imgIdx+2][1] + "', " + iarr[imgIdx+2][2] + ", " + iarr[imgIdx+2][3] + ");";

	i0.firstChild.src = iarr[imgIdx][0];
	i1.firstChild.src = iarr[imgIdx+1][0];
	i2.firstChild.src = iarr[imgIdx+2][0];

}





