$(document).ready(function(){
	galleryBox = new slider();
	galleryBox.slide('sliderOffset1','',1,5,615);
	relFilm = new slider();
	relFilm.slide('sliderOffset2','',2,1,280);	
});	

function $f(id){
	return document.getElementById(id);
}

function makeToolbar(LEVEL1,LEVEL2){
	$("li#"+LEVEL1+" > a:first-child").attr("class","tabActive" );
	$("li#"+LEVEL1+" > ul").css({'display':''});	
	$("ul > li#"+LEVEL2+" > a:first-child").attr("class","subActive" );	
}
	
function switchTab(cont){
	var box = new Array('trama','recensione');
	for(i=0; i<=1; i++){
		if(cont == box[i]){
			$("#lnk_"+cont).addClass('lnk_active');
			$("#cnt_"+cont).css({'display':'block'});
		}	
		else{
			$("#lnk_"+box[i]).removeClass('lnk_active');
			$("#cnt_"+box[i]).css({'display':'none'});
		}
	}
	/*
	i=0;
	while(i < 4){
		if(id==i){
			$f(label+i).className = 'btnOthActive';	
			//$f(cont+i).style.display = 'block';
			$('#'+cont+''+i).slideDown("normal");
			$('#fr_'+i).attr({src: "/v006/img/fr_giu.png"});
			$('#'+cont+''+i).focus();
		}
		else{
			if((id == 0) || (id == 1)){
				if((i == 0) || (i == 3)) $f(label+i).className = 'btnInactiveL1';
				else $f(label+i).className = 'btnInactiveL0';
			}
			else if(id == 2){
				if((i == 0) || (i == 3)) $f(label+i).className = 'btnInactiveL1';
				else if(i == 1)$f(label+i).className = 'btnInactiveL2';
				else $f(label+i).className = 'btnInactiveL0';	
			}
			else if(id == 3){
				if((i == 0) || (i == 3)) $f(label+i).className = 'btnInactiveL1';
				else if(i == 1)$f(label+i).className = 'btnInactiveL2';
				else $f(label+i).className = 'btnInactiveL2';	
			}
			else $f(label+i).className = 'btnInactiveL0';
			$('#fr_'+i).attr({src: "/v006/img/fr_su.png"});
			$f(cont+i).style.display = 'none';	
				
		}
		i++
	}
	*/

}

function loadTrailer(trailer_src,id_trailer){
	$f('cntPlayer').innerHTML = '<object width="642" height="448"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="movie" value="http://video.tiscali.it/inc/TiscaliVideoCustom.swf" /><param name="FlashVars" value="vURL='+trailer_src+'&autoPlay=1resize=original" /><embed src="http://video.tiscali.it/inc/TiscaliVideoCustom.swf" quality="high" bgcolor="#FFFFFF" allowScriptAccess="always" type="application/x-shockwave-flash" flashvars="vURL='+trailer_src+'&autoPlay=1&resize=original" allowFullScreen="true" width="642" height="448" /></object>';
	for(i in jarray){
		if(label_array[i] == id_trailer){
			$f('trl-'+id_trailer).style.cursor = 'default';
			$f('trl-'+id_trailer).style.color = '#333';
			$f('trl-'+id_trailer).style.textDecoration = 'none';
		}
		else{
			$f('trl-'+label_array[i]).style.cursor = 'pointer';
			$f('trl-'+label_array[i]).style.color = '';
			$f('trl-'+label_array[i]).style.textDecoration = '';
		}
	}
}

function radioCinema(){
radio=window.open('/v006/inc/radioCinema/popup.html', 'RadioCinema', 'height=500,width=530,menubar=no,resizable=no,scrollbars=yes, toolbar=no');
}

function htmlLoad(type,id){
for(i=0; i<2; i++){
	if(i == id) $('#tab-'+id).attr("class","tab-m-a");
	else $('#tab-'+i).attr("class","tab-m-n");
}
$.ajax({		
	type: "POST",
	url: "/v006/inc/etc/"+type+".html",
	data:"",
	dataType: "html",
	beforeSend  :function(){},
	success: function(html){
		$("#trgMultiBox").html(html);	
	}
	
});	
}




