
window.onload = function start(){
	//document.getElementById('left1').onclick=Function("change(-1,'mask1',3,144,7,4);return false");
}



function change(dir,id,per_row,w,m,nr){
var at=document.getElementById(id).style.marginLeft.split('px')[0];
var pos=at;if(!pos){pos=0;}
if(!at){at=0;}else{at=at/(w+m)/per_row;}

at=at*-1+dir;
if((at+1)>nr/per_row){at=0;}
if(at<0){at=nr/per_row-1;}

if(at!=parseInt(at)){at=parseInt(at)+1;}

opacity(id, pos, at*(w+m)*per_row*-1, 500,"marginLeft");

}




function opacity(id, opacStart, opacEnd, speed,type) {
exampleFx = new Fx.Tween(id, {property: type,duration: speed, transition: Fx.Transitions.Quart.easeInOut});
exampleFx.start(opacStart,opacEnd);
return exampleFx;
}




function tabs(ob,t,tabs){
var nr=document.getElementById(tabs).getElementsByTagName('a').length;
var x=1;
while(x<=nr){
document.getElementById('tab'+x).style.display="none";document.getElementById('tabl'+x).className='trans';
x++;
}

document.getElementById('tab'+ob).style.display="block";
t.className='active';
}
