function BW(wo,wie){
	var Quelle = document.getElementById(wo).src;
	var Ergebnis = Quelle.search(/.gif/);
	if(Ergebnis != -1) Endung=".gif";
	else Endung=".jpg";
	if (wie==1){
		Neu = Quelle.replace(Endung,"-a"+Endung);
		document.getElementById(wo).src = Neu;
		}
	else{
		Neu = Quelle.replace("-a"+Endung,Endung);
		document.getElementById(wo).src = Neu;
		}
	}


function anzeigen(das){
	if(document.getElementById(das).style.display=='none') 
		document.getElementById(das).style.display='block'; 
	else document.getElementById(das).style.display='none';
	}



function pausecomp(millis)
{
var date = new Date();
var curDate = null;

do { curDate = new Date(); }
while(curDate-date < millis);
}



var x,y,maxx,maxy,zoomend;

zoomend=1;

var bild_neu;

function zoom_out(wo){
	//document.getElementById('bildframe_'+wo).style.width=x;
	//document.getElementById('bildframe_'+wo).style.height=y;
	if(x > 1 || y>1){
		if(x > 1) { x = x - 30; if(x<1){x=1;y=1}}
		//if(y > 1) { y = y - 20; if(y<1){y=1;x=1}}
		setTimeout("zoom_out('"+wo+"'), 10");
		}
	else{
		document.getElementById("bild_"+wo).src = bild_neu;
		zoom_in(wo);
		}
	}


function zoom_in(wo){
	//document.getElementById('bildframe_'+wo).style.width=x;
	//document.getElementById('bildframe_'+wo).style.height=y;
	if(x < maxx || y < maxy){
		if(x < maxx) { x = x + 20;if(x>maxx)x=maxx; }
		if(y < maxy) { y = y + 20;if(y>maxy)y=maxy; }
		setTimeout("zoom_in('"+wo+"'), 10");
		}
	else{
		zoomend=1;
		}
	}


/*
function zoom_in(wo){
	eval("document."+wo+".width=x")
	eval("document."+wo+".height=y")
	if(x < maxx) { x = x + 10; }
	if(y < maxy) { y = y + 10; }
	
	setTimeout("zoom_in('"+wo+"'), 1000000");
	}
*/


function Bild(wo,was,title){
	if(zoomend==1){
		zoomend=0;
		var Quelle = document.getElementById('bild_'+wo).src;
		Quelle_a = Quelle.split("/");
		n=Quelle_a.length-1;
		bild_neu = Quelle.replace(Quelle_a[n],was+".jpg");
		
		maxx=598;
		maxy=maxx/(faktor["b"+was]/100);
		x=maxx;
		y=maxy;
		
		document.getElementById('bildtitel_'+wo).innerHTML = title;
		
		
		zoom_out(wo);
		//document.getElementById(wo).src = Neu;
		//zoom_in(wo);
		}
	}

AC_FL_RunContent = 0;DetectFlashVer = 0;


function Zeige(was){
	if(vorschau[was])
		document.getElementById('vorschau').innerHTML = vorschau[was];
	else 
		document.getElementById('vorschau').innerHTML = "";
	}


function Schliessen(wo){
	document.getElementById('aktuell['+wo+']').style.position = 'absolute';
	document.getElementById('aktuell['+wo+']').style.top = '-1000px';
	document.cookie="c_aktuell["+wo+"]=1";
	}


function Dia(welche){
	Vorschau="";
	Unten='<td valign="bottom" align="center"><span id="bildtitel">'+bt[welche[0]]+'<\/span><img src="./elemente/close2-0.png" onclick="Dia_ende();" align="right" class="close"></td>';

	if(welche.length > 1){
		Vorschau='<td class=\"dvorschau\"><div>';
		for(x=0;x<welche.length;x++){
			Vorschau+='<img src="bilder/bild_klein/'+welche[x]+'.jpg" onclick="Dia_wechsel('+welche[x]+')"> ';
			}
		Vorschau+='<\/div><\/td>';
		Unten='<td id="bildtitel">'+bt[welche[0]]+'<\/td><td valign="bottom" align="right"><img src="./elemente/close2-0.png" onclick="Dia_ende();" class="close"></td>'
		}
		//Unten='<td id="bildtitel">'+bt[welche[0]]+'<\/td><td valign="bottom" align="right"><img src="./elemente/close2-0.png" onclick="Dia_ende();"></td>'

	document.getElementById('dia').style.top = 0;
	document.getElementById('dia').style.bottom = 0;


	document.getElementById('dia').innerHTML = '<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">'
		+'<tr><td></td><td></td><td></td></tr>'
		+'<tr><td></td>'
		+'<td id="dia_mitte">'
		+'<table cellpadding="0" cellspacing="0" id="dia_table"><tr>'
		+'<td align="center" id="dia_bild"><img id="dia_img" src="bilder/bild_dia/'+welche[0]+'.jpg">'
		+'<\/td>'+Vorschau+'<\/tr>'
		+'<tr>'+Unten+'<\/tr>'
		+'<\/table></td>'
		+'<td></td></tr>'
		+'<tr><td></td><td></td><td></td></tr>'
		+'</table>';
	}


function Dia_ende(){
	document.getElementById('dia').style.top = "-2000px";
	document.getElementById('dia').style.bottom = "inherit";
	}

function Dia_wechsel(was){
	document.getElementById('dia_img').src = "bilder/bild_dia/"+was+".jpg";
	document.getElementById('bildtitel').innerHTML = bt[was];
	}

