/* ReferenzenSlider */

var checkMax;
var maxBreite; 
var nowPos = 0; 
var nowPos_new; 
var visibleWidth = 908;
var moveStepWidth;

function checkMaxPosition(inVal) {
	var nowPos_check = nowPos+inVal;
	var allowedMove = ((visibleWidth-nowPos_check) < visibleWidth || nowPos_check < -1*(maxBreite-visibleWidth)) ? false : true;
	nowPos = (allowedMove)? nowPos+inVal : nowPos;
	/*
	alert('Max: '+maxBreite+' - vWidth: '+visibleWidth+' - inVal:'+inVal+'\n\nnewNowPos: '+nowPos+' --> allowedMove: '+allowedMove);
	*/
	ActivateButtons(nowPos);
	return allowedMove;
}

function ActivateButtons(inVal) {
	var moveUp = ((visibleWidth-inVal) < visibleWidth) ? true : false;
	var moveDown = (nowPos < -1*(maxBreite-visibleWidth)) ? true : false;
	/*
	alert('ActivateButtons: up:'+moveUp+' down:'+moveDown);
	*/
}

function refSlide_up () {
	if(checkMaxPosition(moveStepWidth)) {
		referenzSlide(moveStepWidth);
	}
}

function refSlide_down () {
	if(checkMaxPosition(-1*moveStepWidth)) {
		referenzSlide(-1*moveStepWidth);
	}
}   

function referenzSlide(move_amount) { 
 new Effect.MoveBy('sliderList', 0, move_amount); 
}
