var vzeit = 35;
var schritt = 6;
var max = 120;

var g_welches = new Array ();
var g_welches_out = new Array ();
var min = new Array ();
var x = new Array ();
var z = new Array ();

var time = new Array ();
var time1 = new Array ();

var con = new Array ();


function navon (i, welches, xloc)
{
x[i]=xloc;
g_welches[i]=welches;
if (x[i]<max){x[i]=x[i]+schritt;};
document.getElementById(g_welches[i]).style.width=x[i];
if (x[i]<max) {time[i] = setTimeout("navon("+i+",g_welches["+i+"],x["+i+"])", vzeit);} 
}

function navoutt (j, welches, minloc)
{
min[j]=minloc;
g_welches_out[j]=welches;
time1[j] = setTimeout("navout("+j+",g_welches_out["+j+"],min["+j+"])", 200);
}

function navout (j, welches, minloc)
{
min[j]=minloc;
g_welches_out[j]=welches;
z[j]=document.getElementById(g_welches_out[j]).style.width;
z[j]=parseFloat(z[j]);
if (z[j]>min[j]){z[j]=z[j]-6;};
document.getElementById(g_welches_out[j]).style.width=z[j];
if (z[j]>min[j]) {time1[j] = setTimeout("navout("+j+",g_welches_out["+j+"],min["+j+"])", vzeit);}
//else {setTimeout("control("+i+",g_welches["+i+"],min["+i+"])", 200);};
}

function control (i, welches, min)
{
min[i]=min; g_welches[i]=welches;
con[i]=document.getElementById(g_welches[i]).style.width;
con[i]=parseFloat(con[i]);

if (con[i]>min[i]){navout(i,g_welches[i],min[i]);};
}
