<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function videChamp(champ,valeur)
{
	if(champ.value == valeur)
	{
		champ.value = "";
	}
}

function initialiseChamp(champ,valeur)
{
	if(champ.value == valeur || champ.value == "")
	{
		champ.value = valeur;
	}
}

function afficheSousMenu(lang)
{
	document.getElementById("sousMenu").className = "visible";
	document.getElementById("sousmenuRessources").className = "invisible";
	document.getElementById("sousmenuBlogueur-"+lang).className = "invisible";
}

function cacheSousMenu(bActu, bRessources, bBlogueur, lang)
{
	//on cache tout sauf si c'est la section en cours
	var sStyleActu = "invisible";
	var sStyleRessources = "invisible";
	var sStyleBlogueur = "invisible";
	if (bActu) {
		sStyleActu = "visible";
	}
	if (bRessources) {
		sStyleRessources = "visible";
	}
	if (bBlogueur) {
		sStyleBlogueur = "visible";
	}
	document.getElementById("sousmenuRessources").className = sStyleRessources;
	document.getElementById("sousMenu").className = sStyleActu;
	document.getElementById("sousmenuBlogueur-"+lang).className = sStyleBlogueur;
}

function afficheSousMenuRessources(lang)
{
	document.getElementById("sousMenu").className = "invisible";
	document.getElementById("sousmenuBlogueur-"+lang).className = "invisible";
	document.getElementById("sousmenuRessources").className = "visible";
}

function cacheSousMenuRessources(bActu, bRessources, bBlogueur, lang)
{
	//on cache tout sauf si c'est la section en cours
	var sStyleActu = "invisible";
	var sStyleRessources = "invisible";
	var sStyleBlogueur = "invisible";
	if (bActu) {
		sStyleActu = "visible";
	}
	if (bRessources) {
		sStyleRessources = "visible";
	}
	if (bBlogueur) {
		sStyleBlogueur = "visible";
	}
	document.getElementById("sousmenuRessources").className = sStyleRessources;
	document.getElementById("sousMenu").className = sStyleActu;
	document.getElementById("sousmenuBlogueur-"+lang).className = sStyleBlogueur;
}

function afficheSousMenuBlogueur(lang)
{
	document.getElementById("sousMenu").className = "invisible";
	document.getElementById("sousmenuRessources").className = "invisible";
	document.getElementById("sousmenuBlogueur-"+lang).className = "visible";
}

function openPrint(codeurl){
	window.open('/print.aspx?url=' + codeurl, 'print', 'menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=no');
}

var statutRep1 = true;
var statutRep2 = true;
var statutRep3 = true;
function changeImgQuizReponse(id, statut, complement, lien){
	var statutGen = true;
	if(id == 'reponse1'){
		statutGen = statutRep1;
	}else if(id == 'reponse2'){
		statutGen = statutRep2;
	}else if(id == 'reponse3'){
		statutGen = statutRep3;
	}
	
	var img = document.getElementById(id).style.backgroundImage;
	if(statutGen){
		document.getElementById(id).style.backgroundImage = 'url(/img/news/reponse-bg-'+statut+'.gif)';
	}
	
	if(complement!= ''){
		document.getElementById('quiz-complement-txt').innerHTML = complement + ' <a href="' + lien + '" target="_parent">+ d\'infos</a>';
		document.getElementById('quiz-complement').className = "visible";
	}
	
	if(statut == 'true' || statut == 'false'){
		if(id == 'reponse1'){
			statutRep1 = false;
			statutGen = statutRep1;
		}else if(id == 'reponse2'){
			statutRep2 = false;
			statutGen = statutRep2;
		}else if(id == 'reponse3'){
			statutRep3 = false;
			statutGen = statutRep3;
		}   
	}
}

function validationComment(){
	document.getElementById("errorFields").className = "invisible";
	
	monform = document.getElementById("formCommentTribune");
		
	var erreursComment;
	var nErreurComment = new Array();
	
	var reg_email = /^[A-Za-z0-9\.\-_]+[@][A-Za-z0-9\-\.]+[\.][A-Za-z][A-Za-z][A-Za-z]?$/;
	
	if (monform.note.value == '' || monform.note.value == 0){
		nErreurComment.push(0);
	}
	
	if (monform.pseudo.value == ''){
		nErreurComment.push(1);
	}
	/*
	if (monform.email.value == '' || !reg_email.test(monform.email.value)){
		nErreurComment.push(2);
	}
	*/
	if (monform.message.value == ''){
		nErreurComment.push(3);
	}
	if (monform.texteverif.value == ''){
		nErreurComment.push(4);
	}
	
	erreursComment = nErreurComment.length;
	
	if(erreursComment>0){
		document.getElementById("errorFields").className = "visible";
		return false;
	}else{
		document.getElementById("formCommentTribune").submit();
		return true;
	}
}

function changeImgVerif(){
	//alert('/scripts/captha.aspx?v=' + Math.floor(Math.random()*999999));
	document.getElementById("imgVerif").src = '/scripts/captcha.aspx?v=' + Math.floor(Math.random()*999999);
}

function swapImageEtoile(note){
	for(i=1; i<=note; i++){
		document.getElementById("note"+i).src = '/img/news/etoile-on.gif';
	}
}

function swapImageRestoreEtoile(note){
	if(document.getElementById("note").value != '' || document.getElementById("note").value != 0){
		for(i=1; i<=4; i++){
			document.getElementById("note"+i).src = '/img/news/etoile-off.gif';
		}
		for(i=1; i<=note; i++){
			document.getElementById("note"+i).src = '/img/news/etoile-on.gif';
		}
	}else{
		for(i=1; i<=note; i++){
			document.getElementById("note"+i).src = '/img/news/etoile-off.gif';
		}
	}
}

function setNote(note){
	document.getElementById("note").value = note;
}

function sendFormCommentUtil(formulaire, utilite){
	document.getElementById(formulaire).utile.value = utilite;
	document.getElementById(formulaire).submit();
}

function voirTousLesCommentaires(){
	document.getElementById("voir-tous-les-commentaires").className = "invisible";
	document.getElementById("tous-les-commentaires").className = "visible";
}

function openFeedbackUnder(myurl,w,h){
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',menubar=no,location=no,resizable=yes,scrollbars=no,status=no';
	var winFeedbackUnder = window.open(myurl, 'feedbackunder', winprops);
	if (typeof(winFeedbackUnder) != "undefined") {
		//if (parseInt(navigator.appVersion) >= 4) {
			winFeedbackUnder.blur()
			self.focus();
		//}
	}
}

function openFeedback(myurl,w,h){
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',menubar=no,location=no,resizable=yes,scrollbars=yes,status=no';
	var winFeedback = window.open(myurl, 'feedback', winprops);
	if (typeof(winFeedback) != "undefined") {
		//if (parseInt(navigator.appVersion) >= 4) {
			winFeedback.focus();
		//}
	}
}


//gestion rollover vignettes videos home
function interviewRoll(){
	//on active la premiere
	$("li.videoCaptureFond a").eq(0).css({backgroundPosition: '0 -68px'});
	$("li.videoCaptureFond a").eq(0).addClass("videoMasqueActif");
	//on gere les interractions
	$("li.videoCaptureFond a").click( function () {
		if($(this).hasClass("videoMasqueActif"))
		{
		}
		else
		{
			$("li.videoCaptureFond a").removeClass("videoMasqueActif");
			$("li.videoCaptureFond a").css({backgroundPosition: '0 0'});
			$(this).addClass("videoMasqueActif");
			$(this).css({backgroundPosition: '0 -68px'});
		}
	});
	$("li.videoCaptureFond a").mouseover( function () {
		if($(this).hasClass("videoMasqueActif"))
		{
		}
		else
		{
			$(this).css({backgroundPosition: '0 -68px'});
		}
	});
	$("li.videoCaptureFond a").mouseout( function () {
		if($(this).hasClass("videoMasqueActif"))
		{
		}
		else
		{
			$(this).css({backgroundPosition: '0 0'});
		}
	});
}

//-->
