toggle = 1;
function changeSrc()
{
	if (document.getElementById) {
		if (toggle==0) 
			document.getElementById("bannerControl").style.backgroundImage = "url('/images/Banner/1luftbild2.jpg')";
		else if (toggle==1)
			document.getElementById("bannerControl").style.backgroundImage = "url('/images/Banner/2ukranenland.jpg')";
		else
			document.getElementById("bannerControl").style.backgroundImage = "url('/images/Banner/3orchideenwiese.jpg')";
	}
	toggle = (toggle + 1) % 3;
}

// dont add function to other images (like navigation or top banner)
function initialize()
{	
	var changer = new Function("document.getElementById('divMitte').firstChild.alt = this.alt; document.getElementById('divMitte').firstChild.src = this.src.replace('w=80', 'w=270').replace('h=80', 'h=180'); document.getElementById('textControl').firstChild.nodeValue = this.title; document.getElementById('byControl').firstChild.nodeValue = this.alt; document.getElementById('fotoControl').style.display = (!this.alt || this.alt == '') ? 'none' : 'block';");
	//var changer = new Function("document.getElementById('divMitte').firstChild.alt = this.alt; document.getElementById('divMitte').firstChild.src = this.src.replace('w=80', 'w=270').replace('h=80', 'h=180'); document.getElementById('textControl').firstChild.nodeValue = this.alt;");
	
	for(var i=0; i < document.images.length; i++)
		if (isParent(document.getElementById('impressionControl'), document.images[i]))
			if (document.images[i].addEventListener && !window.opera) document.images[i].addEventListener('click', changer, true); else document.images[i].onclick = changer;
}

function isParent (parent, image)
{
	while (image.parentNode)
	{
		if (image.parentNode == parent)
			return true;
			
		image = image.parentNode;
	}
	
	return false;
}
