function slidshow(uid){
	this.uid = uid;
	this.count;
	this.act = 0;
 	this.text;
	
	this.changeImg = function(){
		var id = arguments[0];
		if(arguments.length > 1) id = this.act+id;
		if(id > this.count-1) id = 0;
		else if(id < 0) id = this.count-1;
		
		document.getElementById('slide'+this.uid+'img'+this.act).style.display = 'none';
		document.getElementById('slide'+this.uid+'button'+this.act).src = 'fileadmin/img/square.gif';
		document.getElementById('slide'+this.uid+'img'+id).style.display = 'block';
		document.getElementById('slide'+this.uid+'button'+id).src = 'fileadmin/img/square_red.gif';
		
		this.act = id;
		
		var newtext = this.text[id] ? this.text[id]:'&nbsp;';
		if(this.text.length > 0) document.getElementById('slide'+this.uid+'imgtext').innerHTML = newtext;
	}
}
function mailprotect(name,domain,toplevel,mailflag){
	if(mailflag == 1) document.write('<a href="mailto&#058;'+name+'&#064;'+domain+'&#046;'+toplevel+'" class="mail">');
	document.write(name+'&#064;'+domain+'&#046;'+toplevel);
	if(mailflag == 1) document.write('</a>');
}
function collapse(){
	var targetDiv = document.getElementById('zeitplan'+arguments[0]);
	var targetButton = document.getElementById('zeitplanbutton'+arguments[0]);
	if(targetDiv.style.display != 'none'){
		targetDiv.style.display = 'none';
		targetButton.className = 'zeitplanbutton';
	}else{
		targetDiv.style.display = 'block';
		targetButton.className = 'zeitplanbutton zeitplanbuttonSel';
	}
}
