	function doChangeImage(ImageInGallery,Gallery,IndexInCarousel) {
		// ADTAG-INFOS
		var adTagOrd = Math.round(Math.random()*10000000000000000);
		var adTargeting = "";
		for (var i=0; i< galleryObj[Gallery].articleTopicKey.length; i++)
			adTargeting += escape("story=" + galleryObj[Gallery].articleTopicKey[i] + ";");
		
		// INITIAL VARS AND GLOBAL VARS
		var img = $("img#galleryImage");
		$("#relatedGalleries").hide();
		img.hide();
		if(IndexInCarousel)
			current.indexInCarousel = IndexInCarousel;
		$(".galleryPreviewActive").removeClass("galleryPreviewActive");
		$(".galleryThumbActive").removeClass("galleryThumbActive");
		current.imageInGallery = ImageInGallery;
		
		// gab es einen Galleriewechsel durch press-thumbnail
		if (current.gallery ==  Gallery) {
			current.gallery = Gallery;
		} else {
			current.gallery = Gallery;
			fillBelowGalleryContent();
		}
		
		//current.gallery = Gallery;
		
		current.prevGallery = current.nextGallery = -1;
		current.prefHref = current.nextHref = "";
		
		// CALCULATE NEXT AND PREVIOUS LINKS
		if(current.gallery == 0 && current.gallery < (current.numberOfGalleries-1) ) {
			current.nextGallery = current.gallery + 1;		
		} else if(current.gallery > 0 && current.gallery < (current.numberOfGalleries-1) ) {
			current.prevGallery = current.gallery - 1;
			current.nextGallery = current.gallery + 1;
		} else if(current.gallery == (current.numberOfGalleries-1) ) {
			current.prevGallery = current.gallery - 1;
		}
		
		if(current.imageInGallery == -1) {
			current.nextHref = "?gallery=" + galleryObj[current.gallery].id + "&image=0";
			if(current.prevGallery > -1)
				current.prevHref = "?gallery=" + galleryObj[current.prevGallery].id + "&image=" + (galleryObj[current.prevGallery].pictures.pictures.length-1);
		} else {
			if(!(current.imageInGallery == 0 && current.prevGallery == -1)) {
				if(current.imageInGallery == 0) {
					if(galleryObj[current.gallery].pictures.pictures.length > 1) {
						current.nextHref = "?gallery=" + galleryObj[current.gallery].id + "&image=" + (current.imageInGallery +1);
						if(current.prevGallery > -1)
							current.prevHref = "?gallery=" + galleryObj[current.prevGallery].id + "&image=" + (galleryObj[current.prevGallery].pictures.pictures.length-1);
					} else {
						if(current.prevGallery > -1)
							current.prevHref = "?gallery=" + galleryObj[current.prevGallery].id + "&image=" + (galleryObj[current.prevGallery].pictures.pictures.length-1);
						if(current.nextGallery > -1)
							current.nextHref = "?gallery=" + galleryObj[current.nextGallery].id + "&image=0";
					}	
				} else if(current.imageInGallery == galleryObj[current.gallery].pictures.pictures.length-1) {
					if(galleryObj[current.gallery].pictures.pictures.length > 1) {
						current.prevHref = "?gallery=" + galleryObj[current.gallery].id + "&image=" + (current.imageInGallery -1);
						if(current.nextGallery > -1)
							current.nextHref = "?gallery=" + galleryObj[current.nextGallery].id + "&image=0";
					} else {
						if(current.prevGallery > -1)
							current.prevHref = "?gallery=" + galleryObj[current.prevGallery].id + "&image=" + (galleryObj[current.prevGallery].pictures.pictures.length-1);
						if(current.nextGallery > -1)
							current.nextHref = "?gallery=" + galleryObj[current.nextGallery].id + "&image=0";
					}
				} else {
					current.nextHref = "?gallery=" + galleryObj[current.gallery].id + "&image=" + (current.imageInGallery +1);
					current.prevHref = "?gallery=" + galleryObj[current.gallery].id + "&image=" + (current.imageInGallery -1);
				}
			
			}
		}				
		
		// CHANGE THE IMAGE AND OTHER INFOS
		var sProp7 = "mz_gallery_";	
		if(current.imageInGallery != -1) {
			// NOT "-1" MEANS THIS IS A REGULAR IMAGE
			var nextImage = galleryObj[current.gallery].pictures.pictures[current.imageInGallery];
			img.attr("title",nextImage.text);
			img.attr("alt",nextImage.text);
			img.attr("src",galleryObj[current.gallery].baseUrlGallery + nextImage.url);
			img.attr("width",nextImage.sizeX);
			img.attr("height",nextImage.sizeY);
			img.show();
			$("#imageCounter").show();
			$("#galleryTitle").html(galleryObj[current.gallery].galleryTitle);
			$("#galleryImageText").html(nextImage.text);
			$(".galleryOverlay").css("width","52%");
			$(".imageWidth").css("width",nextImage.sizeX + "px");
			$(".imageHeight").css("height",nextImage.sizeY + "px");
			$("#galleryThumb-" + current.gallery + "-" + current.imageInGallery).addClass("galleryThumbActive");
			$("#imageNr").html(current.imageInGallery+1);
			$("#numberOfPictures").html(galleryObj[current.gallery].numberOfPictures);
			location.hash = "gallery=" + galleryObj[current.gallery].id + "&image=" + current.imageInGallery;
			sProp7 += galleryObj[current.gallery].galleryTitle;
			// next line counts pis per picture... de-activated on request of editorial department
			// sProp7 += "_image" + current.imageInGallery;
			if(galleryObj[Gallery].specialTopic != "")
				sProp7 += "_SPECIAL_" + galleryObj[current.gallery].specialTopic;
		}
		else {
			//NOT REGULAR IMAGE
			var interstitial = '<div class="interstitialItem interstitialItemSelected"><a href="?gallery=' + galleryObj[current.gallery].id + current.articleHref + '"><img src="/' + galleryObj[current.gallery].url + '" /></a><div class="interstitialText"><a href="?gallery=' + galleryObj[current.gallery].id + current.articleHref + '">' + galleryObj[current.gallery].galleryTitle + '</a></div></div>';
			var counter = 0;
			
			for(var i=0; i< galleryObj[current.gallery-1].relatedGalleries.length; i++) {
				if(galleryObj[current.gallery-1].relatedGalleries[i].id != galleryObj[current.gallery].id && counter < 5) {
					//interstitial += '<div class="interstitialItem"><a href="?gallery=' + galleryObj[current.gallery-1].relatedGalleries[i].id + '"><img src="/' + galleryObj[current.gallery-1].relatedGalleries[i].url + '" /></a><div class="interstitialText"><a href="?gallery=' + galleryObj[current.gallery-1].relatedGalleries[i].id + '">' + galleryObj[current.gallery-1].relatedGalleries[i].galleryTitle + '</a></div></div>';
					interstitial += '<div class="interstitialItem"><a href="?gallery=' + galleryObj[current.gallery-1].relatedGalleries[i].id + current.articleHref + '"><img src="/' + galleryObj[current.gallery-1].relatedGalleries[i].url + '" /></a><div class="interstitialText"><a href="?gallery=' + galleryObj[current.gallery-1].relatedGalleries[i].id + current.articleHref + '">' + galleryObj[current.gallery-1].relatedGalleries[i].galleryTitle + '</a></div></div>';					
					counter++;
				}
			}
			
			$(".imageWidth").css("width","570px");
			$(".imageHeight").css("height","380px");
			$("#galleryTitle").html("Galeries similaires");
			$("#galleryImageText").html("");
			$("#relatedGalleries").html(interstitial);
			$(".galleryOverlay").css("width","40px");
			$("#imageCounter").hide();
			$("#relatedGalleries").show();
			$("#galleryPreview" + current.gallery).addClass("galleryPreviewActive");
			sProp7 += "Overview";
		}
	
		$(".galleryDoLeft").attr("href", current.prevHref );
		$(".galleryDoRight").attr("href", current.nextHref );
		
		// OMNITURE (remove event18, change sProp7 and fire)
		if(s.events.indexOf("event18") > -1) {
			var newEvents = new Array();
			for(var i=0;i<s.events.split(",").length;i++)
				if(s.events.split(",")[i] != "event18")
					newEvents.push(s.events.split(",")[i]);		
			s.events = newEvents.toString();
		}
		s.prop7 = sProp7.toString().replace(/\s/g,'_').replace(/\"/,'_');
		var s_code=s.t();      
	  	if(s_code) document.write(s_code);		
		
		// IVW
		var ivwImg = new Image();
		var ivwImg2 = new Image();
			ivwImg.src = $("#ivwpix1").attr("src") +"&d2=" + Date.parse(new Date());
			ivwImg2.src = $("#ivwpix2").attr("src") +"&d2=" + Date.parse(new Date());
		
		// RELOAD ADS
		$("#galleryAdRectangle").attr("src",galleryAdRectangleSrc + "ord=" + adTagOrd + "&targeting=" + adTargeting);
		$("#galleryAdBanner").attr("src",galleryAdBannerSrc + "ord=" + adTagOrd + "&targeting=" + adTargeting);
		$("#galleryAdSky").attr("src",galleryAdSkySrc + "ord=" + adTagOrd + "&targeting=" + adTargeting);
			
	}

			
	function doRightImage() {
		if(current.imageInGallery < (galleryObj[current.gallery].pictures.pictures.length - 1))	{
			current.imageInGallery ++;
			current.indexInCarousel ++;
			doChangeImage(current.imageInGallery,current.gallery,false);
		} else if(current.gallery < (galleryObj.length-1)) {
			current.gallery ++;
			fillBelowGalleryContent();			
			current.imageInGallery = -1;
			current.indexInCarousel ++;
			doChangeImage(current.imageInGallery,current.gallery,false);
		}
		
		if(carouselVisible)
			globalCarousel.scroll(current.indexInCarousel - 3);
			
		return false;
	}

		
	function doLeftImage() { 
		if(current.imageInGallery > 0 || (current.imageInGallery > -1 && current.gallery > 0)) {
			current.imageInGallery --;
			current.indexInCarousel --;
			doChangeImage(current.imageInGallery,current.gallery,false);
		} else if (current.gallery > 0) {
			current.gallery --;
			fillBelowGalleryContent();			
			current.imageInGallery = galleryObj[current.gallery].pictures.pictures.length -1;
			current.indexInCarousel --;
			doChangeImage(current.imageInGallery,current.gallery,false);
		}
		
		if(carouselVisible)
			globalCarousel.scroll( current.indexInCarousel-3);
			
		fillBelowGalleryContent();			

		return false;
	}
	
	function fillBelowGalleryContent() { 	
		// Ueberschriften unsichtbar setzen und Inhalte loeschen
		$("#galleryArticlesHeadline").css("display", "none");
		$("#relatedArticlesHeadline").css("display", "none");
		$("#galleryArticles").empty();		
		$("#relatedArticles").empty();
		$("#relatedMakes").empty();
		$("#relatedMakes").append("<li>&nbsp;</li>");
	
		// gallery in articles 
		for(var i=0; i< galleryObj[current.gallery].galleryArticles.length && i<3;  i++) {				
			$("#galleryArticles").append("<div style='clear:both'> <div class='sym'>&#187;</div><div class='text'><a href='http://ww2.autoscout24.lu/magazine?article=" + galleryObj[current.gallery].galleryArticles[i].id + "' >" + galleryObj[current.gallery].galleryArticles[i].headline  + " ("+ galleryObj[current.gallery].galleryArticles[i].articletype + ", " + galleryObj[current.gallery].galleryArticles[i].date + ") </a></div></div>");
			$("#galleryArticlesHeadline").css("display", "block");
		}
		
		// related articles 
		for(var i=0; i< galleryObj[current.gallery].relatedArticles.length && i<5;  i++) {
			$("#relatedArticles").append("<div style='clear:both'><div class='sym'>&#187;</div><div class='text'><a href='http://ww2.autoscout24.lu/magazine?article=" + galleryObj[current.gallery].relatedArticles[i].id + "' >" + galleryObj[current.gallery].relatedArticles[i].headline  + " ("+ galleryObj[current.gallery].relatedArticles[i].articletype + ", " + galleryObj[current.gallery].relatedArticles[i].date + ")</a></div></div>");
			$("#relatedArticlesHeadline").css("display", "block");
		}

		// related makes
		for(var i=0; i< galleryObj[current.gallery].relatedMakes.length && i<3;  i++) {
			$("#relatedMakes").append("<li>&#187;&nbsp;<a href='" + galleryObj[current.gallery].relatedMakes[i].url + "'>" + galleryObj[current.gallery].relatedMakes[i].text + "</a></li>");
		}		

		return false;
	}
	
	
