// JavaScript Document
var current_news=0;
function go_to_news(num){
	document.getElementById('actu_'+current_news).className='bg_actu_normal';
	document.getElementById('actu_'+num).className='bg_actu_bleu';
	new_margin_left=parseInt(num*333);
	$('#all_news_une').animate({marginLeft: -new_margin_left+'px'}, 500);
	current_news=num;
}

var current_photo=0;
function go_to_photo(num){
	document.getElementById('photos_'+current_photo).style.border='none';
	document.getElementById('photos_'+num).style.borderRight='2px solid #cc0000';
	document.getElementById('photo_comment').innerHTML=document.getElementById('photos_'+num).getAttribute("photo_comment");
	new_margin_left=parseInt(num*200);
	$('#all_photo_une').animate({marginLeft: -new_margin_left+'px'}, 500);
	current_photo=num;
}

function affiche_partenaires(num){
	new_margin_left=parseInt(num*130);
	$('#partenaires3').animate({marginLeft: -new_margin_left+'px'}, 500,function(){
		if (document.getElementById("partenaire_" + (parseInt(num)+5))) {
			num=parseInt(num)+1;
		}else{
			num=0;
		}
		setTimeout("affiche_partenaires('"+num+"')", 5000);
	});
}

function affiche_partenaires2(num){		
	$("#partenaires2_" + num).fadeOut(500,function(){
		if (document.getElementById("partenaires2_" + (parseInt(num)+1))) {
			num=parseInt(num)+1;
		}else{
			num=0;
		}
		//alert(num);
		$("#partenaires2_" + num).fadeIn(500);
	  setTimeout("affiche_partenaires2('"+num+"')", 5000);
   });
}

function sur_sous_sous_menu(i){	
	if(document.getElementById("menu_sous_cat2_" + i).style.display!="none"){
		$("#menu_sous_cat2_" + i).slideUp(500,function(){
			//alert("ok");
		});
	}else{
		$("#menu_sous_cat2_" + i).slideDown(500,function(){
			//alert("ok");
		});
	}
}

