

// Bilder automatisch im Kopf wechseln
var verzoegerung = 2000;
var bildNummer = 1;
var anzahlbilder = 5;
var bilder= new Array(); //nimmt die Bilder der Animation auf (ohne var weil global)
var anibild;

// hier werden die Bilder im Hintergrund geladen
for (var i = 1; i <= anzahlbilder; i++) {
	bilder[i] = new Image();
	bilder[i].src = "/bilder/kopf/kopf" + i + ".jpg";
}


function aniBildStart() {
	anibild = setTimeout('naechstesBild()', verzoegerung);
	verzoegerung = 2000;
}

function naechstesBild() {
	document.animation.src = bilder[bildNummer].src;
	// alert(Math.random(anzahlbilder));
	// bildNummer = Math.round((anzahlbilder*Math.random())+0.5);
	bildNummer++;
	if (bildNummer > anzahlbilder) bildNummer = 1;
}

function setBild(num) {
	bildNummer = num;
	document.animation.src = bilder[num].src;
	// setTimeout('naechstesBild()', verzoegerung);
	if (anibild) clearTimeout(anibild);
	verzoegerung = 3000;
	// aniBildStart();
}// setBild(num)


var timeout;
// Quickfinder
function showObj(obj, doTimeout) {
	if (timeout) { window.clearTimeout(timeout); }
	if(document.all) {  // IE
				document.all[obj].style.display="";
	} else if (document.layers) {
				document.layers[obj].visibility = "show";
	}//else (Netscape 4)
	else if (document.getElementById) { // NS 6
				document.getElementById(obj).style.display="";
			}//elsif (Netscpae 6)
	if ( ! document.all  ||  ! doTimeout || doTimeout != 'noTimeout' ) {
		timeout = window.setTimeout("hideObj('"+obj+"')", 3000);
	}
}//showObj

function hideObj(obj) {
	if(document.all) {  // IE
		if (timeout) { window.clearTimeout(timeout); }
		document.all[obj].style.display="none";
	} else if (document.layers){
		document.layers[obj].visibility = "hide";
	}//else (Netscape 4)
	else if (document.getElementById) { // NS 6
		//alert('Feieraben.');
		document.getElementById(obj).style.display="none";
	}//elsif (Netscpae 6)
}//hideObj



/* -----------------27.05.2007 11:28-----------------
	 Text mit animiertem Schatten / Rahmen
 --------------------------------------------------*/
function pu() {
   // if (!document.all) return;
   if (i < to) {
		var pText = document.getElementById("pochenderText");
		if (document.all) {
			pText.style.filter = "Glow(Color=" + textcolor + ", Strength=" + i + ")";
		} else {
			pText.style.border = i + "px dashed " + textcolor;
			pText.style.margin = (2+to-i)+"px";
		}
      i++;
      theTimeout = setTimeout('pu()',speed);
      return 0;
   }

   if (i == to) {
      theTimeout = setTimeout('pd()',speed);
      return 0;
   }
	return 0;
}
function pd() {
   if (i > from) {
		var pText = document.getElementById("pochenderText");
		if (document.all) {
			pText.style.filter = "Glow(Color=" + textcolor + ", Strength=" + i + ")";
		} else {
			pText.style.border = i + "px dashed " + textcolor;
			pText.style.margin = (2+to-i)+"px";
		}
		i--;
      theTimeout = setTimeout('pd()',speed);
      return 0;
   }
   if (i == from) {
      theTimeout = setTimeout('pu()',speed);
      return 0;
   }
	return 0;
}



