clipLeft=0;
clipRight=393;

function initKoll(){

	kollY=rahmenY+342;
	if(msie || net) {
		kollektionBreite=getLayerWidth("kollektion");
	}
	if(FF) {
		kollektionBreite = 130*6;	
	}
		if(OP) {
		kollektionBreite = 130*6;	
	}
	//alert("kollektionBreite: "+kollektionBreite);
	pushTo("kollektion",rahmenX+456,kollY);
	clipRect("kollektion",0,clipRight,128,clipLeft);
	show("kollektion");
	scrollXProd=rahmenX+456;
	initBig();
}


//Content-Layer am unteren oder oberen Ende
var linksHor=false;
var rechtsHor=false;
var runningHor=false;


//Steuerung fuer ScrollLayer mit den Scroll-Buttons
function runHor(dir){
//alert("runHor: "+dir+" "+rechtsHor+" "+runningHor);
	stopScrolling();
	if(dir>0&&!rechtsHor&&!runningHor){
	
		runningHor=true;
		scrollLayerHor(dir,true);
		rechtsHor=false;
		linksHor=false;
	}
	
	if(dir<0&&!linksHor&&!runningHor){
	//alert("runup");
		runningHor=true;
		scrollLayerHor(dir,true);
		rechtsHor=false;
		linksHor=false;
	}
}

function gotoNext(dir){

	currXScroll=deltaX-scrollXProd;
	if(msie)document.body.focus();
	if(dir>0&&!rechtsHor&&!runningHor){
	
		nextStep=115-(currXScroll%115);
		runningHor=false;
		scrollLayerHor(nextStep,false);
		rechtsHor=false;
		linksHor=false;
	}
	
	
	if(dir<0&&!linksHor&&!runningHor){
	//alert("runup");
		nextStep=(currXScroll%130);
		if(currXScroll%130==0)nextStep=130;
		runningHor=false;
		scrollLayerHor(-nextStep,false);
		rechtsHor=false;
		linksHor=false;
	}
}

function stopScrolling(){
//alert("stopScrolling");
runningHor=false;
step=0;
}


//Layer und clipping bewegen
function scrollLayerHor(step,scrolling){
	//alert("scrollLayerHor");
	//auto=false;
	s=step;
	
	if(msie || net) {
		kollektionBreite=getLayerWidth("kollektion");
	}
	if(FF) {
		kollektionBreite = 130*6;	
	}
	if(OP) {
		kollektionBreite = 130*6;	
	}
	//alert(produktBreite);
	
	//alert("kollektionBreite: "+kollektionBreite);
	
	if(clipRight<=(kollektionBreite-step)){
		if(clipLeft>=(-step)){
			scrollXProd=scrollXProd-step;
			clipLeft=clipLeft+step;
			clipRight=clipRight+step;
			pushTo('kollektion',scrollXProd,kollY);
			clipRect("kollektion",0,clipRight,128,clipLeft);
		
			if(runningHor&&scrolling)setTimeout('scrollLayerHor(s,true)',60);
		}
		
		else{
			linksHor=true;
			autoDirection=1;
			scrollLayerHor(-clipLeft,false);
		}
	}
	else{
		rechtsHor=true;
		autoDirection=-1;
		lastStep=kollektionBreite-clipRight;
		scrollLayerHor(lastStep,false);
	}
}