function moveImageRowLeft(parentElement) {
	// Getting all images by their class-name inside of parentElement
	var myImages = document.getElementsByClassName ('csc-textpic-image',parentElement);
	// This is the width of the visible area
	var viewport = 475;
	var totalWidth = 0;
	// Calculating the width of all images in this row
	for(var i=1; i<=(myImages.length); i++){
		totalWidth += myImages[i-1].getWidth();	
	}
	// Canceling function if the images don't even exceed the visible area -> no scrolling needed
	if(totalWidth <= viewport){return;}
	var maxScroll = totalWidth-viewport;
	// Getting the actual position of parentElement, strip down to the pure value via parseFloat
	var scrolled = parseFloat(document.getElementById(parentElement).getStyle('left') || '0');
	var diffScroll = maxScroll-Math.abs(scrolled);
	// If no scrolling is needed cancel the function
	if(diffScroll == 0){return;}
	if (diffScroll >= viewport) {
		// Move parentElement left (one time the viewport) and add a queue-limit so the effect is exclusive in this scope
		new Effect.Move(parentElement,{x:-viewport,y:0,mode:'relative',queue:{scope:'imageRowScope',limit:1}});
	} else {
		// Else only move left the diffScroll-amount
		new Effect.Move(parentElement,{x:-diffScroll,y:0,mode:'relative',queue:{scope:'imageRowScope',limit:1}});
	}
}

function moveImageRowRight(parentElement) {
	var myImages = document.getElementsByClassName ('csc-textpic-image',parentElement);
	var viewport = 475;
	var totalWidth = 0;
	for(var i=1; i<=(myImages.length); i++){
		totalWidth += myImages[i-1].getWidth();	
	}
	if(totalWidth <= viewport){return;}
	var maxScroll = 0;
	var scrolled = parseFloat(document.getElementById(parentElement).getStyle('left') || '0');
	var diffScroll = Math.abs(scrolled) - maxScroll;
	if(diffScroll == 0){return;}
	if (diffScroll >= viewport) {
		new Effect.Move(parentElement,{x:viewport,y:0,mode:'relative',queue:{scope:'imageRowScope',limit:1}});
	} else {
		new Effect.Move(parentElement,{x:diffScroll,y:0,mode:'relative',queue:{scope:'imageRowScope',limit:1}});
	}
}

