
	//mainbottomimage1
	
	mainBottomBlend_switchMode = 0;
	mainBottomBlend_containerId = 'mainbottomimage';
	mainBottomBlend_actualContentContainer = 0;
	
	mainBottomBlend_imageList = Array();
	mainBottomBlend_imageListCount = 0;
	mainBottomBlend_imagePos = 0;
	
	function mainBottomBlend_init() {
		document.getElementById(mainBottomBlend_containerId + mainBottomBlend_actualContentContainer).style.backgroundImage = "url(bottomimages/"+mainBottomBlend_imageList[mainBottomBlend_imagePos]+")";
		mainBottomBlend_imagePos++;
		document.getElementById(mainBottomBlend_containerId + (1-mainBottomBlend_actualContentContainer)).style.backgroundImage = "url(bottomimages/"+mainBottomBlend_imageList[mainBottomBlend_imagePos]+")";
		setInterval( function() {
			mainBottomBlend_actualContentContainer = 1 - mainBottomBlend_actualContentContainer;
			mainBottomBlend_switch();
		}, 9000 );
	}
	
	function mainBottomBlend_switch() {
		var me = this;
		tweenTB = new Tween(new Object(),'xyz',Tween.strongEaseOut,0,100,4);
		tweenTB.onMotionChanged = function(event) {
			var elStyle1 = document.getElementById(mainBottomBlend_containerId + mainBottomBlend_actualContentContainer).style;
			var elStyle2 = document.getElementById(mainBottomBlend_containerId + (1-mainBottomBlend_actualContentContainer)).style;
			var alphVal1 = event.target._pos;
			var alphVal2 = 100 - event.target._pos;
			
			if ( alphVal1 >= 99 ) { alphVal1 = 99; }
			if ( alphVal1 <= 0 ) { alphVal1 = 0; }
			if ( alphVal2 >= 99 ) { alphVal2 = 99; }
			if ( alphVal2 <= 0 ) { alphVal2 = 0; }
			
			if ( typeof(elStyle1.opacity) != "undefined" ) {
				elStyle1.opacity = alphVal1 / 100;
				elStyle2.opacity = alphVal2 / 100;
			}
			
			if ( typeof(elStyle1.filter) != "undefined" ) {
				elStyle1.filter = 'alpha(opacity='+alphVal1+')';
				elStyle2.filter = 'alpha(opacity='+alphVal2+')';
			}
			
			if ( typeof(elStyle1.MozOpacity) != "undefined" ) {
				elStyle1.MozOpacity = alphVal1 / 100;
				elStyle2.MozOpacity = alphVal2 / 100;
			}
		};
		tweenTB.onMotionFinished = function() {
			var elStyle1 = document.getElementById(mainBottomBlend_containerId + mainBottomBlend_actualContentContainer).style;
			var elStyle2 = document.getElementById(mainBottomBlend_containerId + (1-mainBottomBlend_actualContentContainer)).style;
			var alphVal1 = 100;
			var alphVal2 = 0;
			
			if ( typeof(elStyle1.opacity) != "undefined" ) {
				elStyle1.opacity = alphVal1 / 100;
				elStyle2.opacity = alphVal2 / 100;
			}
			
			if ( typeof(elStyle1.filter) != "undefined" ) {
				elStyle1.filter = 'alpha(opacity='+alphVal1+')';
				elStyle2.filter = 'alpha(opacity='+alphVal2+')';
			}
			
			if ( typeof(elStyle1.MozOpacity) != "undefined" ) {
				elStyle1.MozOpacity = alphVal1 / 100;
				elStyle2.MozOpacity = alphVal2 / 100;
			}
			
			mainBottomBlend_imagePos++;
			if ( mainBottomBlend_imagePos > mainBottomBlend_imageListCount - 1 ) {
				mainBottomBlend_imagePos = 0;
			}
			document.getElementById(mainBottomBlend_containerId + (1-mainBottomBlend_actualContentContainer)).style.backgroundImage = "url(bottomimages/"+mainBottomBlend_imageList[mainBottomBlend_imagePos]+")";
			
			//galerie__stored__isInTween = false;
		};
		tweenTB.onMotionStarted = function() {
			//galerie__stored__isInTween = true;
		};
		tweenTB.start();
	}

