var win = null;
function newwindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height=500,width=820,top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',toolbar=no,status=no,resizable=yes'
win = window.open(mypage,myname,settings)
if(win.window.focus){win.window.focus();}
}




function bildwechsel(datei,nr)
{
document.images[nr].src=datei;
}





         function schreibeins() {
                         document.images['imgplace'].src=bild[1].src;
                         document.getElementById("txt").firstChild.nodeValue = txtp[1];

         }


	function prevbild() {
		if(document.images) {
			schritt--;
			if(schritt<1) schritt=maxschritte;
			document.images['imgplace'].src=bild[schritt].src;
                         document.getElementById("txt").firstChild.nodeValue = txtp[schritt];
	        }
         }

	function nextbild() {
		if(document.images) {
			schritt++;
			if(schritt>maxschritte) schritt=1;
	                document.images['imgplace'].src=bild[schritt].src;
                         document.getElementById("txt").firstChild.nodeValue = txtp[schritt];
                 }

	}

         function endebild() {
	                document.images['imgplace'].src=bild[maxschritte].src;
                         document.getElementById("txt").firstChild.nodeValue = txtp[maxschritte];
         }

         function anfangbild() {
	                document.images['imgplace'].src=bild[1].src;
                         document.getElementById("txt").firstChild.nodeValue = txtp[1];
         }


/* automatische Show   */

var a=1;
var los="";
         function diashow()
         {
           document.images['imgplace'].src=bild[a].src;
           document.getElementById("txt").firstChild.nodeValue = txtp[a];
           a++;


           if (a>maxschritte){
           a=1;
           }

          }

function slide(){
los=window.setInterval("diashow()", 2000);
                 }

function stoppen(){
        window.clearInterval(los);
}
