function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function gallery(id){

	remote = window.open('/showimage.php?id='+id,'Galerie','width=380,height=632,resizable=no,toolbar=no,menubar=yes,scrollbars=no,status=no');
	remote.focus();
}


var pos = 0;
var width = 97;			//Sollte das Bild breiter als 200px sein, das muss der Wert hier und in der Klasses .viewer1 angepasst werden
var thisDirection;		//z.Z. ist der Wert in der Klasses .viewer1 fuer drei sichtbare Bilder, mit der Breite 200px, eingestellt.
var speed = 1;			//Scroll Geschwindigkeit
bilder = new Array();
source = new Array();
auto = false;


function scroll(doDirection){

	if (!doDirection) doDirection = thisDirection;
	else thisDirection = doDirection;

	if (doDirection == "-"){

		direction = -1;

	} else {

		direction = 1;

	}
	
	max_width = -1 * ( bilder.length-2 ) * width;
	
	if((pos == max_width && direction<0) || (pos == 0 && direction>0)) return;

	pos = pos + direction;
	document.getElementById('imagescroller').style.left = pos;
		
	if(pos%97) window.setTimeout("scroll()",speed);

}



