// JavaScript Document
positionv = 0;

function runter(){
window.scrollBy(0, 5);
if(document.documentElement.scrollTop){
	if(document.documentElement.scrollTop != 200 && document.documentElement.scrollTop == positionv +5){
	setTimeout('positionv = positionv +5; runter()',20);
	}
}else if(document.body.scrollTop){
	if(document.body.scrollTop != 200 && document.body.scrollTop == positionv +5){
	setTimeout('positionv = positionv +5; runter()',20);
	}
}
}


sichtbarkeit =0;
variable = '';

function ein(abc) {
if(document.getElementById(abc).style.filter || document.getElementById(abc).style.opacity){
einblenden(abc);	
variable = abc;
document.getElementById(abc).style.filter = "Alpha(opacity = "+sichtbarkeit+")"
defg = sichtbarkeit / 100;
document.getElementById(abc).style.opacity = defg;

if(sichtbarkeit!=100) {setTimeout('sichtbarkeit= sichtbarkeit +25; ein(variable)',40);}

}else{
	einblenden(abc);
	document.getElementById(abc).style.opacity = '1';
	document.getElementById(abc).style.filter = "Alpha(opacity = 100)"
	}
}

function aus(abc){
if(document.getElementById(abc).style.filter || document.getElementById(abc).style.opacity){
variable = abc;
document.getElementById(abc).style.filter = "Alpha(opacity = "+sichtbarkeit+")"
defg = sichtbarkeit / 100;
document.getElementById(abc).style.opacity = defg;

if(sichtbarkeit!=0) {setTimeout('sichtbarkeit= sichtbarkeit -25; aus(variable)',40);}
else{ausblenden(abc);}
}else{ausblenden(abc);}
}


function wechsel (bild1, bild2){
	ausblenden(bild1);
	einblenden(bild2);
}


function einblenden(div) { 

  with(document.getElementById(div).style){ 
    if(display=="none"){ 
      display="inline"; 
    } 
    
  } 
} 
 
function ausblenden(div) { 
  with(document.getElementById(div).style){ 
    if(display=="inline"){ 
      display="none"; 
    }    
  } 
} 

function tauschen(img){
var abc = document.getElementById(img).src.lastIndexOf('.png');
document.getElementById(img).src = document.getElementById(img).src.substr(0, abc) +'_a.png';
}
function tauschen2(img){
var abc = document.getElementById(img).src.lastIndexOf('_a.png');
document.getElementById(img).src = document.getElementById(img).src.substr(0, abc) +'.png';
}



hoehe =50;
variable2 = '';

function gross(abc , def) {

variable2 = abc;
variable3 = def;
document.getElementById(abc).height = hoehe;

if(hoehe<=def) {setTimeout('hoehe= hoehe +25; gross(variable2 , variable3)',40);}


}

function klein(abc , def){

variable2 = abc;
variable3 = def;
document.getElementById(abc).height = hoehe;

if(hoehe>def) {setTimeout('hoehe= hoehe -25; klein(variable2 , variable3)',10);}
if(hoehe<def) {document.getElementById(abc).height = def;}
}


function dunkel(abc){
	
	if(document.getElementById(abc).style.visibility == 'hidden'){
		document.getElementById(abc).style.height = document.getElementById(abc).parentNode.offsetHeight + 'px';
		if(window.innerWidth && navigator.userAgent.search(/Firefox.+/) != -1){
			document.getElementById(abc).style.width = window.innerWidth - 20 + 'px';
			
		}
		if(window.innerWidth && navigator.userAgent.search(/Chrome.+/) != -1){
			document.getElementById(abc).style.width = window.innerWidth - 20 + 'px';	
		}
		
		
		document.getElementById(abc).style.visibility = 'visible';
	}else{
		document.getElementById(abc).style.visibility = 'hidden';
	}	
}
