function startdiashow( min, max ) {
	if( min > max ) {
		return( -1 );
	}
	if( min == max ) {
		return( min );
	}
 
        var diestartzahl=( min + parseInt( Math.random() * ( max-min+1 ) ) );
	window.setTimeout("showtheme('1')", 100);
}


function showtheme(START){
schonmalbewegt=0;




	screen_width = screen.width;
	if(screen_width<2000 && screen_width>1700){
		/*1100*/
			PATH="pianobilder4";			
	}
	else if(screen_width<1700 && screen_width>1500){
		/*900*/
			PATH="pianobilder3";		
	}
	else if(screen_width<1500 && screen_width>1300){
		/*800*/
			PATH="pianobilder2";
	}
	else if(screen_width<1300){
		/*700*/
			PATH="pianobilder";
	}
	else if(screen_width>2000){
		/*1300*/
			PATH="pianobilder5";			
	}

	


	
	window.setTimeout("losgehts("+START+")", 100);

}


function losgehts(START){

	if (document.layers){		dasElement=document.layers["impressions"];
		dasElement2=document.layers["impressions2"];
		inhalt1=document.layers["ii1"];
		inhalt2=document.layers["ii2"];	}else if(document.all){		dasElement=document.all["impressions"];
		dasElement2=document.all["impressions2"];
		inhalt1=document.all["ii1"];
		inhalt2=document.all["ii2"];	}else if(document.getElementById){		dasElement=document.getElementById("impressions");
		dasElement2=document.getElementById("impressions2");
		inhalt1=document.getElementById("ii1");
		inhalt2=document.getElementById("ii2");	}
	

	new Effect.Opacity(dasElement2, {from: 1.0, to: 0, duration: 0.0});
	dasElement.style.backgroundImage = "url("+PATH+"/piano"+START+".jpg)";
	texten(START);
	
	
	window.setTimeout("weitere("+START+")", 7000);
}

function texten(POS){
/*if(schonmalbewegt == 0){
var leertext = "";
}*/

if(POS==1){
var meinText = "Tradition und Moderne in Dortmund...";
}else if(POS==2){
var meinText = "Dietrich Vollmer (Aussendienst), Nicole Reisberg (Büro & Marketing), Thomas Reisberg (Klavierbaumeister)";
}else if(POS==3){
var meinText = "Moderne Stage-Pianos und Digitalpianos...";
}else if(POS==4){
var meinText = "Perfektion von Meisterhand geschaffen...";
}else if(POS==5){
var meinText = "Reparaturen aller Art, Qualität und edelste Materialien...";
}else if(POS==6){
var meinText = "Aus 12000 Einzelteilen entsteht ein Flügel...";
}
/*if(schonmalbewegt == 0){
var textKnoten = document.createTextNode(leertext);
inhalt1.appendChild(textKnoten);
inhalt2.appendChild(textKnoten);
}*/
    	var textKnoten = document.createTextNode(meinText);
	if(POS==1 || POS==3 || POS==5){	
		if(schonmalbewegt >1){
			inhalt1.replaceChild(textKnoten,inhalt1.firstChild);
		}else{
			inhalt1.appendChild(textKnoten);
		}
	

	}else{
		if(schonmalbewegt >2){
			inhalt2.replaceChild(textKnoten,inhalt2.firstChild);
		}else{
			inhalt2.appendChild(textKnoten);
		}

	}
schonmalbewegt++;
}


function weitere(VAR){
	
	var VAR2=VAR+1;
	
	dasElement2.style.backgroundImage = "url("+PATH+"/piano"+VAR2+".jpg)";
	new Effect.Opacity(dasElement, {from: 1.0, to: 0, duration: 3.0});
	new Effect.Opacity(dasElement2, {from: 0, to: 1.0, duration: 3.0});
	texten(VAR2);
	
	if(VAR<5){
	VAR=VAR+2;
	}else{
	VAR=1;
	}
	window.setTimeout("weitere1("+VAR+")", 7000);
	
}

function weitere1(VARX){
dasElement.style.backgroundImage = "url("+PATH+"/piano"+VARX+".jpg)";

new Effect.Opacity(dasElement2, { from: 1.0, to: 0, duration: 3.0 });
new Effect.Opacity(dasElement, { from: 0, to: 1.0, duration: 3.0 });

texten(VARX);
window.setTimeout("weitere("+VARX+")", 7000);


}

