var ie4=document.all&&!document.getElementById
var DOM2=document.getElementById
var IE =navigator.appName.match(/explor/i);
sec1='<table cellpadding=0 cellspacing=0 border=0><tr><td><div id=headtitel>'
sec2=titel.join('</div> \n <div id=headtitelplz>')
sec2+='</div></td> \n <td class=unsichtbar><img src='
sec3=' hspace=5 width='+iconbreite+' height='+iconhohe+' border=0></td><td nowrap ondblclick="alert (sec2)">';

// hier muss ich das ondblclick="alert (sec2)" das nur zum testen drinen steht wieder herausnehmen!!

sec4='</td></tr></table>'
if (navigator.appName == "Netscape") {
	scrollY="window.pageYOffset",		scrollX="window.pageXOffset",			iW="window.innerWidth",			iH="window.innerHeight"
}else{
	scrollY="document.body.scrollTop",	scrollX="document.body.scrollLeft",		iW="document.body.clientWidth",	iH="document.body.clientHeight"
}
var Xmove=0
var Ymove=0
var Xdiff=0
var Ydiff=0
var Xstart=0
var Ystart=0
var	fensterbreite=0
function setthings(){
	if (DOM2) {document.getElementById('head').style.filter='revealTrans(Transition='+filtertyp+',Duration='+blenddelay+')';}
	fensterbreite=eval(iW)
	rechnePixel();
}
function rahmen(ico,nr,text){ 
	if (nr!=aktiv){
		if (nr){
			ico.style.marginBottom=0
			ico.style.marginTop=2
			show=(text)?nr:0
		}else{
			ico.style.marginBottom=2
			ico.style.marginTop=0
			show=(text)?aktiv:0
		}
		if(show){
			tag=sec1+titel[show]+sec2+pic[show]+sec3+txt[show]+sec4
			if(DOM2){
				with(document.getElementById("head")){
					if(IE && filtertyp>-1) filters.revealTrans.Apply();
					innerHTML = tag;
					if(IE && filtertyp>-1) filters.revealTrans.Play();
				}
			}else if (ie4){
				document.all.head.innerHTML=tag
			}
		}
	}
}
function lauflicht (intervall,blonk,prae,ico,icos){
		rahmen(document.getElementById(prae+ico),-1);
		funct='rahmen(document.getElementById("'+prae+ico+'"))'
		setTimeout(funct,blonk); 
	ico++
	if(ico>icos){
		ico=1
		pause=intervall*1000
	}else{
		pause=blonk*2
	}
	funct='lauflicht('+intervall+','+blonk+',"'+prae+'",'+ico+','+icos+')'
	setTimeout(funct,pause);
}
function fahrnach(){
divtag='head'
	Xfix=105
	Xis=eval(scrollX);
	Xdiff=Xstart-Xis;
	if (Math.abs(Xdiff) && (Xis+Xfix)<breite){
		Xmove=Math.round(Xdiff/10)+((Xdiff>0)?1:-1)
		Xstart-=Xmove
		document.getElementById(divtag).style.left=Xstart+Xfix
		rechnePixel();
		}
	if(	fensterbreite!=eval(iW)){
		fensterbreite=eval(iW)
		rechnePixel();
	}
	setTimeout('fahrnach()',100);
}
function rechnePixel(){
	gehtnoch=seitenbreite-Xstart-eval(iW)+30
	tag=(gehtnoch>=0)? txt_noch+gehtnoch+'&nbsp;&lt;Pixel&gt;': txt_null
	document.getElementById('pixel').innerHTML=tag
	document.getElementById('pixeldiv').style.marginLeft=Xstart+fensterbreite-150-200
}
function zeichne(feld,maxmal,zeichen,alt,hohe){
	var anz = feld.value.length;
	if(anz>maxmal){
		feld.value = feld.value.substring(0,maxmal);frei = 0;
	}else{
		frei = maxmal-anz;
	}
	tag=frei
		tag+='<table cellpadding=0 cellspacing=0 border=0 align=center><tr id=hell style="'
		tag+=(frei/maxmal<0.2)?'background-color: #ff0000;':''
		tag+='"><td><img src=img/sp.gif width=20 height='
		tag+=Math.pow(frei,0.5)/Math.pow(maxmal,0.5)*hohe
	if (IE){
		tag+=' alt="- '
		tag+=frei
		tag+=' '+alt+'"'
	}
	tag+=' border=0></td></tr></table>'
	tag+=zeichen.toUpperCase();
	document.getElementById("noch").innerHTML =tag
}
function go2Top(){
	window.scrollTo(eval(scrollX),0);
}