function makeScrollbarMultiTab(content,scrollbar,handle,horizontal,ignoreMouse,idscrollMove){	
	var steps = parseInt($(idscrollMove).style.width) - 735;
	if (steps > 0) {
	var slider = new Slider(
		scrollbar,
		handle, {	
			steps: steps, 
			mode:'horizontal',
			onChange: function(step){
				$(idscrollMove).style.marginLeft=-step+'px';
			}
		}
	);
	}
}

var tabAttiva;
tabAttiva="tabFotoImg";

function checkTabAttiva(){
	if (document.getElementById('tabFoto')!= null) tabAttiva="tabFotoImg";
	else if (document.getElementById('tabVideo')!= null) tabAttiva="tabVideoImg";	
	else if (document.getElementById('tabAudio')!= null) tabAttiva="tabAudioImg";		
}

function attivaTabFoto(){
	if (document.getElementById('tabAudio')!= null) document.getElementById('tabAudio').style.display='none';
	if (document.getElementById('tabVideo')!= null) document.getElementById('tabVideo').style.display='none';		
	document.getElementById('tabFoto').style.display='block';
	if (tabAttiva != "tabFotoImg"){
		resetTab(tabAttiva);
	}
	tabAttiva="tabFotoImg";
}

function attivaTabVideo(){
	if (document.getElementById('tabAudio')!= null) document.getElementById('tabAudio').style.display='none';
	if (document.getElementById('tabFoto')!= null) document.getElementById('tabFoto').style.display='none';		
	document.getElementById('tabVideo').style.display='block';
	if (tabAttiva != "tabVideoImg"){
		resetTab(tabAttiva);
	}
	tabAttiva="tabVideoImg";
}

function attivaTabAudio(){
	if (document.getElementById('tabFoto')!= null) document.getElementById('tabFoto').style.display='none';
	if (document.getElementById('tabVideo')!= null) document.getElementById('tabVideo').style.display='none';		
	document.getElementById('tabAudio').style.display='block';
	if (tabAttiva != "tabAudioImg"){
		resetTab(tabAttiva);
	}
	tabAttiva="tabAudioImg";
}

function overTab(idTab){
	if (idTab != tabAttiva) {
		srcAttuale = document.getElementById(idTab).src;
		srcImg = srcAttuale.replace(".jpg", "_a.jpg");
		document.getElementById(idTab).src = srcImg;
	}		
}

function outTab(idTab){
	if (idTab != tabAttiva) {
		srcAttuale = document.getElementById(idTab).src;
		srcImg = srcAttuale.replace("_a.jpg", ".jpg");
		document.getElementById(idTab).src = srcImg;
	}
}

function resetTab(idTab){
	srcAttuale = document.getElementById(idTab).src;
	srcImg = srcAttuale.replace("_a.jpg", ".jpg");
	document.getElementById(idTab).src = srcImg;
}


