function show_sel(info,state,from)
{

	target='none';

	if(info=='mar')target='fenetre_mar';
	else if(info=='vid')target='fenetre_vid';

	if((from=='fn' || target!='none') && state)
	{
		document.getElementById(target).setAttribute("style","background:url('images/home_fenetre-"+ info +"_on.png');");
	}
	else if(from=='fn' || target!='none')
	{
		document.getElementById(target).setAttribute("style","background:url('images/home_fenetre-"+ info +"_off.png');");
	}
	
	if((from=='menu' && state) || (from=='fn' && target!='none' && state))
	{
		jqInfo = "#" + info;
		$(jqInfo).animate({"padding-top": "70px"},250).animate({"padding-top": "-=10px"},300).animate({"padding-top": "+=10px"},300);

	}
	else if(from=='menu' || (from=='fn' && target!='none'))
	{
		jqInfo = "#" + info;
		$(jqInfo).animate({"padding-top": "35px"},300).animate({"padding-top": "+=10px"},300);
	}
	
	if(state)
	{
		document.getElementById('teaser').setAttribute("style","background: url('images/full_"+ info +".png') no-repeat;");
		document.getElementById('text_'+info).setAttribute("style","visibility: visible;");
		//opacity: 1.0;
		$('#teaser').animate({"opacity": "1.0"},400);
	}
	else 
	{
		document.getElementById('teaser').setAttribute("style","background: none;");
		//opacity: 0.0;
		$('#teaser').animate({"opacity": "0.0"},400);
		document.getElementById('text_'+info).setAttribute("style","visibility: hidden;");
	}
		
}

function show_sel_simple(info,state,from)
{

	if(state)
	{
		jqInfo = "#" + info;
		$(jqInfo).animate({"padding-top": "70px"},250).animate({"padding-top": "-=10px"},300).animate({"padding-top": "+=10px"},300);
	}
	else
	{
		jqInfo = "#" + info;
		$(jqInfo).animate({"padding-top": "35px"},300).animate({"padding-top": "+=10px"},300);
	}
	
}

function clickBox(where)
{
	if(document.getElementById("newsletter").getAttribute("checked") == "checked")
	{
		document.getElementById("checkImg").setAttribute("src", where + "images/pop_form-checkbox_off.png");
		document.getElementById("newsletter").setAttribute("checked","");
		document.getElementById("newsletter").setAttribute("value","no");
	}
	else
	{
		document.getElementById("checkImg").setAttribute("src", where + "images/pop_form-checkbox_on.png");
		document.getElementById("newsletter").setAttribute("checked","checked");
		document.getElementById("newsletter").setAttribute("value","ok");
	}
}

function clickBox_tshirt(where)
{
	if(document.getElementById("newsletter_tshirt").getAttribute("checked") == "checked")
	{
		document.getElementById("checkImg_tshirt").setAttribute("src", where + "images/pop_form-checkbox_off.png");
		document.getElementById("newsletter_tshirt").setAttribute("checked","");
		document.getElementById("newsletter_tshirt").setAttribute("value","no");
	}
	else
	{
		document.getElementById("checkImg_tshirt").setAttribute("src", where + "images/pop_form-checkbox_on.png");
		document.getElementById("newsletter_tshirt").setAttribute("checked","checked");
		document.getElementById("newsletter_tshirt").setAttribute("value","ok");
	}
}

function popitup(url) {
	newwindow=window.open(url,'name','height=700,width=500');
	if (window.focus) {newwindow.focus()}
	return false;
}

function music_s(state, name){

	if(state)
	{
		document.getElementById("mFile").setAttribute("src", name + ".mp3");
		document.getElementById("mFile").setAttribute("volume", "100");
		document.getElementById("music").setAttribute("src","../images/music_on.png");
		document.getElementById("music").setAttribute("onclick","music_s(0, '" + name + "');");
	}
	else
	{
		document.getElementById("mFile").setAttribute("src", "empty.mp3");
		document.getElementById("mFile").setAttribute("volume", "0");
		document.getElementById("music").setAttribute("src","../images/music_off.png");
		document.getElementById("music").setAttribute("onclick","music_s(1, '" + name + "');");
	}
}

function changeVid(vidid){
	
	document.getElementById("vid1").setAttribute("value","http://www.dailymotion.com/swf/video/" + vidid + "?width=630&theme=none&foreground=%23FFFFFF&highlight=%23FCC752&background=%234A2719&additionalInfos=0&hideInfos=1&start=&animatedTitle=&autoPlay=1");
	document.getElementById("vid2").setAttribute("src","http://www.dailymotion.com/swf/video/" + vidid + "?width=630&theme=none&foreground=%23FFFFFF&highlight=%23FCC752&background=%234A2719&additionalInfos=0&hideInfos=1&start=&animatedTitle=&autoPlay=1");
	
	document.getElementById("vidA").setAttribute("width","630");
	document.getElementById("vid2").setAttribute("width","630");
	document.getElementById("vidA").setAttribute("height","420");
	document.getElementById("vid2").setAttribute("height","420");
}

function popMail(){
	document.getElementById('content').setAttribute('style','opacity: .30;filter: alpha(opacity=30);');
	document.getElementById('footer').setAttribute('style','opacity: .30;filter: alpha(opacity=30);');
	document.getElementById('contact_pop').setAttribute('style','display:block;z-index:2000;');
}

function stopMail(){
	document.getElementById('content').setAttribute('style','opacity: 1.0;filter: alpha(opacity=30);');
	document.getElementById('footer').setAttribute('style','opacity: 1.0;filter: alpha(opacity=30);');
	document.getElementById('contact_pop').setAttribute('style','display:none;z-index:0;');
}

function checkText(){
	if(document.getElementById('message_content').value=="Pensez à nous communiquer votre adresse dans votre message...")
	{
		document.getElementById('message_content').value='';
	}
}
