var i = 0;


	var pic = new Array();
		pic[0] = new Image();
		pic[0].src = "Pics/00.jpg";
		pic[1] = new Image();
		pic[1].src = "Pics/01.jpg";
		pic[2] = new Image();
		pic[2].src = "Pics/02.jpg";
		pic[3] = new Image();
		pic[3].src = "Pics/03.jpg";
		pic[4] = new Image();
		pic[4].src = "Pics/04.jpg";
		/*pic[5] = new Image();
		pic[5].src = "../Pics/05.png";
		pic[6] = new Image();
		pic[6].src = "../Pics/06.jpg";
		pic[7] = new Image();
		pic[7].src = "../Pics/07.jpg";
		pic[8] = new Image();
		pic[8].src = "../Pics/08.jpg";
		pic[9] = new Image();
		pic[9].src = "../Pics/09.jpg";
		pic[10] = new Image();
		pic[10].src = "../Pics/10.png";
		pic[11] = new Image();
		pic[11].src = "../Pics/11.jpg";
		pic[12] = new Image();
		pic[12].src = "../Pics/12.jpg";
		pic[13] = new Image();
		pic[13].src = "../Pics/13.jpg";*/


function SchaltR() {
	++i; 
	if (i == pic.length) { 
		i = 0;		
	}
	//document.getElementById("content").innerHTML = "<img src="+pic[i].src+" alt='bild'>";
	//document.getElementById("content").innerHTML = "TEST";
	document.getElementById("imgA").href=pic[i].src;
	document.getElementById("imgContainer").src = pic[i].src;
	

}

function SchaltL() {
	--i;
	if(i == -1) {
		i = (pic.length-1);
	}
	document.getElementById("imgA").href=pic[i].src;
	document.getElementById("imgContainer").src = pic[i].src;
	
}
	
function buttonshow() {
	//document.getElementById("buttonR").style.display="block";
	//document.getElementById("buttonL").style.display="block";
	//alert("TEST");
	//new Effect.Appear('buttonR',{duration:0.5});
	//Effect.Appear("buttonL",{duration:0.5});
	new Effect.Opacity('buttonR', { from: 0.5, to: 1.0, duration: 0.5 });
	new Effect.Opacity('buttonL', { from: 0.5, to: 1.0, duration: 0.5 });
	// Effect.toggle!!!


}

function buttonhide(){
//document.getElementById("buttonR").style.display="none";	
//document.getElementById("buttonL").style.display="none";	
new Effect.Opacity('buttonR', { from: 1.0, to: 0.5, duration: 0.5 });
new Effect.Opacity('buttonL', { from: 1.0, to: 0.5, duration: 0.5 });
}

function startup(){
	var j = Math.ceil(Math.random()*(pic.length-1))
	//alert("test")
	document.getElementById("imgA").href=pic[j].src;
	document.getElementById("imgContainer").src = pic[j].src;
	
	new Effect.Opacity('buttonR', { from: 1.0, to: 0.5, duration: 0.0 });
	new Effect.Opacity('buttonL', { from: 1.0, to: 0.5, duration: 0.0 });
}
