// JavaScript Document

function Fenster_breit(url)
{
        //This launches a new window and then
        //focuses it if window.focus() is supported.
        newwin = window.open(url,"FensterD","toolbar=0,menubar=0,status=0,scrollbars=1,resizable=1,left=0, top=0, width=658, height=498");
        if(javascript_version > 1.0)
        {
                //delay a bit here because IE4 encounters errors
                //when trying to focus a recently opened window
                setTimeout('newwin.focus();',250);
        }
}
function Fenster_hoch(url)
{
        //This launches a new window and then
        //focuses it if window.focus() is supported.
        newwin = window.open(url,"FensterD","toolbar=0,menubar=0,status=0,scrollbars=1,resizable=1,left=0, top=0, width=498, height=658");
        if(javascript_version > 1.0)
        {
                //delay a bit here because IE4 encounters errors
                //when trying to focus a recently opened window
                setTimeout('newwin.focus();',250);
        }
}

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);
	}

