// JavaScript Document

function next(grossbild,zaehlNR,menge,wo,pfad)
{
counter = zaehler[wo];
 if(counter < menge)
     counter++;
 else
    counter = 1;
    

zaehler[wo] = counter;

    if (counter < 10)
    counter = "0" + counter;
    
 document.getElementById(grossbild).removeChild(nodename=document.getElementById(grossbild).firstChild);
 nextpix = new Image();
 nextpix.src = pfad + counter + ".jpg";
 nextpix.border = 0;
 document.getElementById(grossbild).appendChild(nextpix);
 
 document.getElementById(zaehlNR).removeChild(nodename=document.getElementById(zaehlNR).firstChild);
 nextpix = new Image();
 nextpix.src = "css/zahlen/" + counter + ".gif";
 nextpix.border = 0;
 document.getElementById(zaehlNR).appendChild(nextpix);

 //window.status = "Bild " + counter + " von " + menge;
}


function back(grossbild,zaehlNR,menge,wo,pfad)
{
counter = zaehler[wo];

 if(counter > 1)
     counter--;
 else
     counter = menge;

zaehler[wo] = counter;

    if (counter < 10)
    counter = "0" + counter;
    
 document.getElementById(grossbild).removeChild(nodename=document.getElementById(grossbild).firstChild);
 lastpix = new Image();
 lastpix.src = pfad + counter + ".jpg";
 lastpix.border = 0;
 document.getElementById(grossbild).appendChild(lastpix);
 
 document.getElementById(zaehlNR).removeChild(nodename=document.getElementById(zaehlNR).firstChild);
 nextpix = new Image();
 nextpix.src = "css/zahlen/" + counter + ".gif";
 nextpix.border = 0;
 document.getElementById(zaehlNR).appendChild(nextpix);

 //window.status = "Bild " + counter + " von " + menge;
}


function oder_so()
{
document.images.grossbild.src='../../css/leer.gif';
 nextpix = path + counter + ".jpg";
document.images.das_grossbild.src=nextpix;
}


function sayHallo(txt,txt2) {
	return window.alert(txt2);
	}


