var bildcounter = 0;
var pfad = "pix/slideshow/"
var playlist = new Array();
alert_str="";
for(i=0;i<9; i++) {
	index = Math.round(Math.random() * 8);
	while( !isNaN(playlist[index]) ) {
		index++;
		if(index > 8) { index = 0; }
	}
	playlist[index] = i;
}

function bildwechsel()
{
	document.slide.src = pfad + "slide" + playlist[bildcounter] + ".jpg";
	
	//bildcounter = Math.round(Math.random() * 8);
	bildcounter = bildcounter + 1;
	
	if(bildcounter > 8)
	{
		bildcounter = 0;
	}
	window.setTimeout("bildwechsel()", 2000);
}

var pulldowntime    = 1;
var pulldowntimeout = 0;
function pulldownmenu(id, flag) {
	if( ( !flag || flag == 'view' ) && document.getElementById( id ) ) {
		document.getElementById( id ).style.display = '';
		window.clearInterval(pulldowntimeout);
	} else if( flag == 'mouseout' && document.getElementById( id ) ) {
		pulldowntimeout = window.setInterval("pulldownmenu('"+id+"','hidden')", pulldowntime * 1000);
	} else if( document.getElementById( id ) ) {
		window.clearInterval(pulldowntimeout);
		document.getElementById( id ).style.display = 'none';
	}
}
