// Pamoorama 0.3
// By: Jean-Nicolas Jolivet 
// www.silverscripting.com/pamoorama/
// Feel free to do whatever you want with the script! Give credits if you like it
// if you don't like it, don't use it ;)
var moveupdown=true;
var pamoorama = new Class({

	initialize: function(element, options) {
		this.options = Object.extend({
			activateSlider:		true,			// bei mausbewegungen reagieren
			footercolor:		'#000',
			captioncolor:		'#fff',
			caption:			'',
			width:				766,
			enableAutoscroll:	true,
			//autoscrollSpeed: 	60000,
			autoscrollSpeed: 	60000,
			autoscrollOnLoad: 	true
		}, options || {});
		
		this.el = $(element);
		this.elid = element;
		this.el.setStyle('width', this.options.width + 'px');
		this.skipInit = false;
		
		
		
		this.loading = new Element('div', {
			'id': this.elid + '_footer'
		});
		//this.loading.setHTML('Loading Panorama...');
		this.loading.injectInside(this.el);
		
		//this.picturename = this.el.getProperty('alt');
		this.picturename = 'images/newcitymap.gif';
		if(this.options.caption == '')
		{
			this.options.caption = this.picturename;
		}
		
		//this.area = Math.floor(this.options.width / 2) - 20;
		this.area = Math.floor(this.options.width / 2);
		
		this.image = new Asset.image(this.picturename, {
			onload: this.continueInit.bind(this)
		});
		this.image2 = new Asset.image("images/buttons/buttons_05.gif", {
			onload: this.continueInit.bind(this)
		});
		this.image3 = new Asset.image("images/buttons/buttons_04.gif", {
			onload: this.continueInit.bind(this)
		});
		this.image4 = new Asset.image("images/buttons/buttons_01.gif", {
			onload: this.continueInit.bind(this)
		});
		this.image5 = new Asset.image("images/buttons/buttons_02.gif", {
			onload: this.continueInit.bind(this)
		});
		this.image6 = new Asset.image("images/buttons/buttons_03.gif", {
			onload: this.continueInit.bind(this)
		});
		this.image7 = new Asset.image("images/buttons/buttons_06.gif", {
			onload: this.continueInit.bind(this)
		});
		this.image8 = new Asset.image("images/buttons/buttons_07.gif", {
			onload: this.continueInit.bind(this)
		});
	
		
		this.image.setStyles({'left': '-10000px', 'position': 'relative'});
		this.image2.setStyles({'cursor': 'pointer'});
		this.image3.setStyles({'cursor': 'pointer'});
		this.image4.setStyles({'cursor': 'pointer'});
		this.image5.setStyles({'cursor': 'pointer'});
		this.image6.setStyles({'cursor': 'pointer'});
		this.image7.setStyles({'cursor': 'pointer'});
		this.image8.setStyles({'cursor': 'pointer'});
		
		this.image.injectInside(document.body);
	
	},
	
	continueInit: function()
	{
		if(! this.skipInit)
		{
			
			//this.imageWidth = this.image.getSize().size.x;
			//this.imageHeight = this.image.getSize().size.y;
			//885px die letzte fabrik
			this.imageHeight = 438;
			this.imageWidth = 5832;
			this.ratio = this.imageWidth / 766;
			
			this.image.remove();
			this.loading.remove();

			this.outter = new Element('div', {
				'id': this.elid + '_outter',
				'styles': {
					'width' : this.options.width + 'px',
					'height': this.imageHeight + 'px',
					'overflow': 'hidden'
				}
			});
			
			this.header = new Element('div', {
				'id': this.elid + '_header',
				'styles': {
					'width' : this.options.width + 'px',
					'background': 'transparent',
					'text-align': 'left'
				}
			});
			
			this.inner = new Element('div', {
				'id': this.elid + '_inner',
				'styles' : {
					//'width': '6720px',
					'width': '5832px',
					'height': this.imageHeight + 'px',
					'bottom':'0px',
					'margin':'0 0 0 0'
					//'background': 'transparent url(' + this.picturename + ') no-repeat top left'
				}
			});
	
			this.footer = new Element('div', {
				'id': this.elid + '_footer',
				'styles': {
					'width' : this.options.width + 'px',
				//	'height': '60px',
					'background': 'transparent',
					'margin':'0 0 0 0'
				}
			});
			
			this.caption = new Element('div', {
				'id': this.elid + '_caption',
				'styles': {
					'float': 'left',
					'padding-left': '5px',
					'color' : this.options.captioncolor,
					'font-family': "Trebuchet MS",
					'font-size': '13px'
				}
			});
			//this.caption.setHTML(this.options.caption);
			
			this.thumb = new Element('div', {
				'id': this.elid + '_thumb',
				'styles': {
					'float': 'center',
					'margin-right': '0px',
					'margin-top': '0px',

					'height': this.imageHeight / this.ratio +'px',
					//'width': '766px',
					'background':'url(images/newcitymap.gif) no-repeat',
					'text-align': 'left',
					'border': '0px solid #fff',
					'cursor': 'pointer'
				},
				'title': 'Klicken, um Position zu aendern!'
			});
								
			if(window.ie)
			{
				this.ieheightadjust = 4;
			}
			else
			{
				this.ieheightadjust = 4;
			}
			this.frame = new Element('div', {
				'id': this.elid + '_frame',
				'styles': {
					//'height': (this.imageHeight / this.ratio) +'px',
					//DIV-Layer wo man sich befindet
					'height':'55px',
					'width': this.options.width / this.ratio + 'px',
					'position': 'relative',
					'top': '-' + (this.imageHeight / this.ratio + this.ieheightadjust) +'px',
					'left' : '0px',
					'border': '1px solid black',
					'background-color': 'lightblue', //lightblue
					'cursor': 'w-resize',
					'z-index': '1000',
					'background-image': 'url(js/img/resize.gif)',
					'opacity': '0.5',
					'-moz-opacity': '0.5',
					'filter': 'alpha(opacity=50)'
				},
				'title': 'Drag me to move the panorama!'
			});
		 if (navigator.appName == "Microsoft Internet Explorer")
      		{
			
			this.littlecar = new Element('div', {
				'id': this.elid + '_littlecar',
				'styles': {
					//'height': (this.imageHeight / this.ratio) +'px',
					'height':'45px',
					'width': this.options.width / this.ratio + 'px',
					'position': 'relative',
					'margin-top': '-' + (this.imageHeight / this.ratio + this.ieheightadjust)-20 +'px',
					'left' : '5px',
					//'background':'url(images/littlecar.gif) no-repeat',
					'cursor': 'none',
					'z-index': '900'
				},
				'title': 'Drag me to move the panorama!'
			});
			
			 }
     		 else
     		   {
			   
			   	this.littlecar = new Element('div', {
				'id': this.elid + '_littlecar',
				'styles': {
					//'height': (this.imageHeight / this.ratio) +'px',
					'height':'45px',
					'width': this.options.width / this.ratio + 'px',
					'position': 'relative',
					'top': '-' + (this.imageHeight / this.ratio + this.ieheightadjust)-20 +'px',
					'left' : '5px',
					//'background':'url(images/littlecar.gif) no-repeat',
					'cursor': 'none',
					'z-index': '900'
				},
				'title': 'Drag me to move the panorama!'
			});
			   
			   }
			//Deluxe23 edit START
			 if (navigator.appName == "Microsoft Internet Explorer")
      		{
			this.car = new Element('div', {
				'id': this.elid + '_car',
				'styles': {
					//'height': (this.imageHeight / this.ratio) +'px',
					'height':'211px',
					'width': '410px',
					'position': 'relative',
					'margin-top': '-360px',
					'left' : '10px',
					'background':'url(images/c_r_ani.gif) no-repeat',
					'cursor':'auto',
					'z-index': '10'
				}
				
			});
			  }
     		 else
     		   {
					this.car = new Element('div', {
				'id': this.elid + '_car',
				'styles': {
					//'height': (this.imageHeight / this.ratio) +'px',
					'height':'211px',
					'width': '410px',
					'position': 'relative',
					'top': '-450px',
					'left' : '10px',
					'background':'url(images/c_r_ani.gif) no-repeat',
					'cursor':'auto',
					'z-index': '10'
				}	
			});
				
				
			}
			if(this.options.enableAutoscroll)
			{
				this.playpause = new Element('div', {
					'id': this.elid + '_playpause',
					'styles': {
						'float': 'left',
						'padding-left': '5px',
						'color' : this.options.captioncolor,
						'font-family': "Trebuchet MS",
						'font-size': '11px',
						'clear': 'left',
						'cursor': 'pointer'
					}
				});
				//autoscroll
				this.playpause.setHTML('<font color="#CCCCCC" style="font-size:0px;">Start Autoscroll</font>');
				
				this.playpause.addEvent('click', this.playpauseClicked.bind(this));
			}
			
			var inner_content = '';
			
			inner_content = inner_content + '<table border="0" cellpadding="0" cellspacing="0" id="table_offset"><tr>';
			inner_content = inner_content + '<td valign="bottom"><img src="images/1autofabrik.gif" usemap="#cm_pic_fabrik_links" border="0"/></td>';
			inner_content = inner_content + '<td valign="bottom"><img src="images/way_neu.gif"/></td>';
			inner_content = inner_content + '<td valign="bottom"><img src="images/2autohaus.gif" usemap="#cm_pic_autohaus" border="0"/></td>';
			inner_content = inner_content + '<td valign="bottom"><img src="images/3fundbuero.gif" usemap="#cm_pic_fundbuero" border="0"/></td>';
			inner_content = inner_content + '<td valign="bottom"><img src="images/4between_1.gif" /></td>';
			inner_content = inner_content + '<td valign="bottom"><img src="images/5comicladen.gif" usemap="#cm_pic_comicladen" border="0"/></td>';
			inner_content = inner_content + '<td valign="bottom"><img src="images/6between_2.gif" /></td>';
			inner_content = inner_content + '<td valign="bottom"><img src="images/7fotoladen.gif" usemap="#cm_pic_fotoladen" border="0"/></td>';
			inner_content = inner_content + '<td valign="bottom"><img src="images/8autokino.gif" usemap="#cm_pic_autokino" border="0"/></td>';
			inner_content = inner_content + '<td valign="bottom"><img src="images/9between_3.gif" /></td>';
			inner_content = inner_content + '<td valign="bottom"><img src="images/10teststrecke.gif" usemap="#cm_pic_teststrecke" border="0"/></td>';
			inner_content = inner_content + '<td valign="bottom"><img src="images/11between_4.gif" /></td>';
			//inner_content = inner_content + '<td valign="bottom"><img src="images/12autofabrik.gif" /></td>';
			inner_content = inner_content + '</tr></table>';
			inner_content = inner_content + '<table border="0" cellpadding="0" cellspacing="0"><tr>';
			inner_content = inner_content + '<td valign="bottom"><img src="images/completestreet.gif" id="changestreet_background" /></td>';
			inner_content = inner_content + '</tr></table>';
			
			this.inner.setHTML(inner_content);
			
			this.halfFrame = (this.options.width / this.ratio) / 2;
			
			this.image.setProperty('width', 766);
			this.image.setProperty('height', this.imageHeight / this.ratio);

			this.image.setStyle('left', '0px');
			
			//Inject everything
			this.image4.injectInside(this.header);
			this.image5.injectInside(this.header);
			this.image6.injectInside(this.header);
			this.image3.injectInside(this.header);
			this.image2.injectInside(this.header);
			this.image7.injectInside(this.header);
			this.image8.injectInside(this.header);
			
			
			this.outter.injectInside(this.el);
			this.inner.injectInside(this.outter);
			this.header.injectInside(this.el);
			
			this.footer.injectInside(this.el);
			//this.caption.injectInside(this.footer);
			
			
			if(this.options.enableAutoscroll)
			{
				this.playpause.injectInside(this.header);
			}
			this.thumb.injectInside(this.footer);
			
			this.image.injectInside(this.thumb);
			this.frame.injectInside(this.thumb);
			this.littlecar.injectInside(this.thumb);
			this.car.injectInside(this.thumb);
			
			// reset the scroll
			this.outter.scrollTo(0, 0);

			
			//AutoScroll Effects
			this.autoScrollFx = new Fx.Scroll(this.outter, {duration:this.options.autoscrollSpeed, onComplete: this.animCompleted.bind(this)});			
			this.autoSlideFx = new Fx.Style(this.frame, 'left', {duration: this.options.autoscrollSpeed});
			
			//window.setTimeout(10000);
			
			//do the scrollthing!
			if(this.options.activateSlider)
			{
				this.scroll = new Scroller(this.outter, {area: this.area, velocity: 0.3, onChange:function(x, y) {
					newleft = (x / this.ratio);
					
					this.outter.scrollTo(x, y);
					// Hier die größe ändern
					if(x <= 0)
					{
						this.frame.setStyle('left', 0);
					}
					else if(x >= this.imageWidth)
					{
						this.frame.setStyle('left', 766 - this.frame.getStyle('width').toInt());
							
					}
					else
					{
						if( (newleft >= 0) && (newleft < 766 - this.frame.getStyle('width').toInt()) ) 
						{
							this.frame.setStyle('left', newleft);
							
						}
					}
				}.bind(this)});
				
				this.outter.addEvent('mouseover', this.scroll.start.bind(this.scroll));
			}
			
			this.createDraggable();
			
			this.addImageEvent();
		
			if(this.options.autoscrollOnLoad)
			{
				this.playpauseClicked();
			}
			this.skipInit = true;
		}
		
	},
	
	startAnimRight: function() {
		var limitRight = 766 - this.frame.getStyle('width').toInt();
		this.outter.scrollTo(0, 0);
		this.frame.setStyle('left', 0);
		//neu d23 
		document.getElementById('citymap_car').style.background = "url(images/c_r_ani.gif) no-repeat";
		
		this.autoSlideFx.start(limitRight);
		this.autoScrollFx.toRight();
		this.direction = 'right';
		
		//stop the scroller/drag etc..
		this.outter.removeEvents('mouseover');
		this.dragHandle.detach();
		this.image.removeEvents('click');
		
	},
	startAnimLeft: function() {
		//hier die funktion wenn er wieder von rechts nach links zurück fährt
		//alert('Bildwechsel');
		document.getElementById('citymap_car').style.background = "url(images/carback2.gif) no-repeat";
		this.autoSlideFx.start(0);
		this.autoScrollFx.scrollTo(0);
		this.direction = 'left';
		
	},
	
	stopAnim: function() {
		moveupdown=false;
		this.autoSlideFx.stop();
		this.autoScrollFx.stop();
		//reconnect events
		//this.outter.addEvent('mouseover', this.scroll.start.bind(this.scroll));
		this.createDraggable();
		this.addImageEvent();
		document.getElementById('citymap_car').style.background = "url(images/c_r_ani.gif) no-repeat";
		document.getElementById('changestreet_background').setAttribute("src","images/completestreet2.gif");
		//.src = "completestreet2.gif";
		
	},
	
	animCompleted: function() {
		if(this.direction=='right')
		{
			this.startAnimLeft();
		}
		else
		{
			this.startAnimRight();
		}
	},
	
	
	
	playpauseClicked: function() {
		if(this.playpause.getText() == 'Start Autoscroll')
		{
			//this.playpause.setHTML('<font color="#000000">Stop Autoscroll</font>');
			this.startAnimRight();
		}
		else
		{
			//this.playpause.setHTML('<font color="#000000">Start Autoscroll</font>');
			this.stopAnim();
			//this.startAnimRight();
		}
	},
	
	createDraggable: function() {
		this.dragHandle = this.frame.makeDraggable({
				modifiers: {x : 'left', y : false}, 
				limit: {x : [0, 766 - this.frame.getStyle('width').toInt() ]}, 
				onDrag: function() {
					frameleft = this.frame.getStyle('left').toInt();
					newscroll = frameleft * this.ratio;
					
					this.outter.scrollTo(newscroll, 0);
					
				}.bind(this)
		});
	},
			
	addImageEvent: function() {
		this.image.addEvent('click', function(event){
				var event = new Event(event);
				var slideEffect = new Fx.Style(this.frame, 'left',{duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				var slide2Effect = new Fx.Style(this.littlecar, 'left',{duration:10000, transition: Fx.Transitions.Sine.easeInOut});
				var scrollEffect = new Fx.Scroll(this.outter, {duration:10000, transition: Fx.Transitions.Sine.easeInOut});
				
				newleft = (event.page.x - this.thumb.getLeft().toInt()) - this.halfFrame;
				if(newleft < 0)
				{
					newleft = 0;
				}
				else if(newleft > 766 - this.frame.getStyle('width').toInt())
				{
					newleft = 766 - this.frame.getStyle('width').toInt();
				}
			
				slideEffect.start(newleft);
				slide2Effect.start(newleft+7);
				this.stopAnim();
				document.getElementById('citymap_car').style.background = "url(images/c_r_no.gif) no-repeat";
				scrollEffect.scrollTo(newleft * this.ratio);
				document.getElementById('citymap_car').style.background = "url(images/c_r_ani.gif) no-repeat";
		}.bind(this));
				this.image2.addEvent('click', function(event){
				var event = new Event(event);
				var slideEffect2 = new Fx.Style(this.frame, 'left',{duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				var slide2Effect2 = new Fx.Style(this.littlecar, 'left',{duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				var scrollEffect2 = new Fx.Scroll(this.outter, {duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				
				newleft = (event.page.x - this.thumb.getLeft().toInt()) - this.halfFrame;
				if(newleft < 0)
				{
					newleft = 0;
				}
				else if(newleft > 766 - this.frame.getStyle('width').toInt())
				{
					newleft = 766 - this.frame.getStyle('width').toInt();
				}
				
				newleft = 440;
				slideEffect2.start(440);
				slide2Effect2.start(444);
				this.stopAnim();
				document.getElementById('citymap_car').style.background = "url(images/c_r_no.gif) no-repeat";
				scrollEffect2.scrollTo(newleft * this.ratio);
				document.getElementById('bild5').onclick.apply(document.getElementById('bild5'));
		}.bind(this));
				this.image3.addEvent('click', function(event){
				var event = new Event(event);
				var slideEffect3 = new Fx.Style(this.frame, 'left',{duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				var slide2Effect3 = new Fx.Style(this.littlecar, 'left',{duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				var scrollEffect3 = new Fx.Scroll(this.outter, {duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				
				newleft = (event.page.x - this.thumb.getLeft().toInt()) - this.halfFrame;
				if(newleft < 0)
				{
					newleft = 0;
				}
				else if(newleft > 766 - this.frame.getStyle('width').toInt())
				{
					newleft = 766 - this.frame.getStyle('width').toInt();
				}
				
				newleft = 340;
				slideEffect3.start(340);
				slide2Effect3.start(347);
				this.stopAnim();
				document.getElementById('citymap_car').style.background = "url(images/c_r_no.gif) no-repeat";
				scrollEffect3.scrollTo(newleft * this.ratio);
				document.getElementById('bild4').onclick.apply(document.getElementById('bild4'));
		}.bind(this));
				this.image4.addEvent('click', function(event){
				var event = new Event(event);
				var slideEffect4 = new Fx.Style(this.frame, 'left',{duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				var slide2Effect4 = new Fx.Style(this.littlecar, 'left',{duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				var scrollEffect4 = new Fx.Scroll(this.outter, {duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				
				newleft = (event.page.x - this.thumb.getLeft().toInt()) - this.halfFrame;
				if(newleft < 0)
				{
					newleft = 0;
				}
				else if(newleft > 766 - this.frame.getStyle('width').toInt())
				{
					newleft = 766 - this.frame.getStyle('width').toInt();
				}
				
				newleft = 0;
				slideEffect4.start(0);
				slide2Effect4.start(7);
				this.stopAnim();
				document.getElementById('citymap_car').style.background = "url(images/c_r_no.gif) no-repeat";
				scrollEffect4.scrollTo(newleft * this.ratio);
				document.getElementById('bild1').onclick.apply(document.getElementById('bild1'));
		}.bind(this));
				this.image5.addEvent('click', function(event){
				var event = new Event(event);
				var slideEffect5 = new Fx.Style(this.frame, 'left',{duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				var slide2Effect5 = new Fx.Style(this.littlecar, 'left',{duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				var scrollEffect5 = new Fx.Scroll(this.outter, {duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				
				newleft = (event.page.x - this.thumb.getLeft().toInt()) - this.halfFrame;
				if(newleft < 0)
				{
					newleft = 0;
				}
				else if(newleft > 766 - this.frame.getStyle('width').toInt())
				{
					newleft = 766 - this.frame.getStyle('width').toInt();
				}
				
				newleft = 108;
				slideEffect5.start(108);
				slide2Effect5.start(115);
				this.stopAnim();
				document.getElementById('citymap_car').style.background = "url(images/c_r_no.gif) no-repeat";
				scrollEffect5.scrollTo(newleft * this.ratio);
				document.getElementById('bild2').onclick.apply(document.getElementById('bild2'));
		}.bind(this));
				this.image6.addEvent('click', function(event){
				var event = new Event(event);
				var slideEffect6 = new Fx.Style(this.frame, 'left',{duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				var slide2Effect6 = new Fx.Style(this.littlecar, 'left',{duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				var scrollEffect6 = new Fx.Scroll(this.outter, {duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				
				newleft = (event.page.x - this.thumb.getLeft().toInt()) - this.halfFrame;
				if(newleft < 0)
				{
					newleft = 0;
				}
				else if(newleft > 766 - this.frame.getStyle('width').toInt())
				{
					newleft = 766 - this.frame.getStyle('width').toInt();
				}
				
				newleft = 237; /*großes auto*/
				slideEffect6.start(240);
				slide2Effect6.start(250);
				this.stopAnim();
				document.getElementById('citymap_car').style.background = "url(images/c_r_no.gif) no-repeat";
				scrollEffect6.scrollTo(newleft * this.ratio);
				document.getElementById('bild3').onclick.apply(document.getElementById('bild3'));
		}.bind(this));
				this.image7.addEvent('click', function(event){
				var event = new Event(event);
				var slideEffect7 = new Fx.Style(this.frame, 'left',{duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				var slide2Effect7 = new Fx.Style(this.littlecar, 'left',{duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				var scrollEffect7 = new Fx.Scroll(this.outter, {duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				
				newleft = (event.page.x - this.thumb.getLeft().toInt()) - this.halfFrame;
				if(newleft < 0)
				{
					newleft = 0;
				}
				else if(newleft > 766 - this.frame.getStyle('width').toInt())
				{
					newleft = 766 - this.frame.getStyle('width').toInt();
				}
				
				newleft = 536;
				slideEffect7.start(536);
				slide2Effect7.start(540);
				this.stopAnim();
				document.getElementById('citymap_car').style.background = "url(images/c_r_no.gif) no-repeat";
				scrollEffect7.scrollTo(newleft * this.ratio);
				document.getElementById('bild6').onclick.apply(document.getElementById('bild6'));
		}.bind(this));
				this.image8.addEvent('click', function(event){
				var event = new Event(event);
				var slideEffect8 = new Fx.Style(this.frame, 'left',{duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				var slide2Effect8 = new Fx.Style(this.littlecar, 'left',{duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				var scrollEffect8 = new Fx.Scroll(this.outter, {duration:1000, transition: Fx.Transitions.Sine.easeInOut});
				
				newleft = (event.page.x - this.thumb.getLeft().toInt()) - this.halfFrame;
				if(newleft < 0)
				{
					newleft = 0;
				}
				else if(newleft > 766 - this.frame.getStyle('width').toInt())
				{
					newleft = 766 - this.frame.getStyle('width').toInt();
				}
				
				newleft = 650;
				/* slider position */
				slideEffect8.start(646);
				slide2Effect8.start(650);
				this.stopAnim();
				document.getElementById('citymap_car').style.background = "url(images/c_r_no.gif) no-repeat";
				scrollEffect8.scrollTo(newleft * this.ratio);
				document.getElementById('bild7').onclick.apply(document.getElementById('bild7'));
		}.bind(this));
	}
	
});
