
function bg_morph(ziel, fromOpacity, toOpacity, timeStep)
{
	if(document.body.clientHeight > document.body.scrollHeight)
		{
			$(ziel).style.height = document.body.clientHeight + 'px';
		}
		else{ $(ziel).style.height = document.body.scrollHeight + 'px';}
	if(fromOpacity > toOpacity)
	{
		nextOpacity = toOpacity - (fromOpacity - toOpacity);
		if(nextOpacity < 0) { nextOpacity = toOpacity + (fromOpacity - toOpacity);  }
	}
	else
	{
		nextOpacity = toOpacity + (toOpacity - fromOpacity);
		if(nextOpacity > 1) { nextOpacity = toOpacity - (toOpacity - fromOpacity);  }
	}
	
	//window.setTimeout("bg_morph('" + ziel + "', " + toOpacity + ", " + nextOpacity + ", " + timeStep + " );", 2000);
	//$(ziel).fade( {duration: timeStep, from: fromOpacity, to: toOpacity } );
	new Effect.Fade(ziel, {duration: timeStep, from: fromOpacity, to: toOpacity, afterFinish: function(){$(ziel).style.display='block'; window.setTimeout("bg_morph('" + ziel + "', " + toOpacity + ", " + nextOpacity + ", " + timeStep + " );", 10000);} } );

}

function divload(ziel, url,page )
{
	try { pageTracker._trackPageview('/' + url); }
	catch(err) {}
	if(typeof page =='undefined') page = 1;
	$(ziel).fade( {duration:1, from:1, to:0.01} ); 
	window.setTimeout( "new Ajax.Updater('" + ziel + "', '" + url + "'  , { method:'post', parameters:{ajax:'on', p: " + page + "}, onComplete: function(){	$('" + ziel + "').fade( {from:0, to:1} );}	}  ) ; " , 1000); 
	
	return false;
	
}	

function menu (menuId)
{
	for (var i = 1; i <= 7; i++)
	{
		if(i == menuId) 
		{
			$('item_' + i ).className = 'item_' + i + ' item_' + i + '_selected'; 
		}
		else 
		{
			$('item_' + i ).className = 'item_' + i; 
		}
	}
}


function eyecatcherWechsel (imageSrc) {
$('eyecatcherImage').fade( {duration:1, from:1, to:0.01} ); 
window.setTimeout("document.getElementById('eyecatcherImage').src = '" + imageSrc + "'", 1000);
window.setTimeout( "$('eyecatcherImage').fade( {duration:1, from:0.01, to:1} ); ", 1000); 

}

function kuenstlerTextEinblenden (id, ziel, url) {
	if ( geblindet == 1) eyecatcherWechsel('img/eyecatcher_' + id + '.png');
		else document.getElementById('eyecatcherImage').src = 'img/eyecatcher_' + id + '.png';
	$(ziel).fade( {duration:1, from:1, to:0.01} );
	window.setTimeout( "new Ajax.Updater('" + ziel + "', '" + url + "'  , { method:'get', parameters:{kuenstler:" + id + ", ajax: 'on'}, onComplete: function(){	$('" + ziel + "').fade( {from:0, to:1} );}	}  ) ; " , 1000); 
	if ( geblindet == 0)
			{
				new Effect.BlindDown('eyecatcher',{ afterFinish: function(){geblindet = 1; $('eyecatcher').style.height = '';} });
				$('spacerInhalt').style.height = '723px';
			}
}

