/*----- COURRIELS------*/
// pour chaque journaliste,
// encoder le courriel de cette facon: philippe_schnobb@radio-canada.ca
// dans la page (http://nebula.radio-canada.ca/modeles/courriels/encodage.html) 
	// var courriel_wauthier = "x8]t-rzyvyrr8Ak]mnzy8p@p]7ys-6]t]7]A6]"
	// var courriel_lebeuf = "osrzy8-z8v8t8_v8<8m9@p]7ys-6]t]7]A6]"
	// var courriel_grou = "0psml@p]7ys-6]t]7]A6]"
	// var courriel_lapierre = "xsz]tt8AxAv]ry8pp8@p]7ys-6]t]7]A6]"
	var courriel_schnobb = "Szyvyrr8AP6zts<<@p]7ys-6]t]7]A6]"
	var courriel_aoun = "6]psv8A]smt@p]7ys-6]t]7]A6]"
	var courriel_daudens = "9vsp8tnA7]m78to@p]7ys-6]t]7]A6]"
// et définir une variable avec le nom qu'on passe dans le query 'auteur' pour pouvoir afficher le lien courriel (si nécessaire)			
			
			
// pour decoder les courriels
	function getCourriel(pCourriel, pLibelle){
		Decode("b] zp89=\"u]yvns:" + pCourriel + "\"C");// = endocage d'exemple: <a href="mailto:schnobbp@radio-canada.ca">, dans la page http://nebula.radio-canada.ca/modeles/courriels/encodage.html 
		document.write (pLibelle);
		Decode("b/]C");// = endocage de: </a>, dans la page http://nebula.radio-canada.ca/modeles/courriels/encodage.html 
	}
	function Decode(msg){
		var DECRYPT = false;
		var ClearMessage="";
		ClearMessage += codeIt(msg);
		document.write(ClearMessage);
		} 
		var key = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1029384756><#].";
		function codeIt (_message) {
		var wTG;var mcH = key.length / 2;
		var _newString = "";
		var dv;
		for (var x = 0; x < _message.length; x++) {
		wTG = key.indexOf(_message.charAt(x));
		if (wTG > mcH) {
		dv = wTG - mcH;_newString += key.charAt(33 - dv);
		} else {
		if (key.indexOf(_message.charAt(x)) < 0) {
		_newString += _message.charAt(x);
		} else {
		dv = mcH - wTG;
		_newString += key.charAt(33 + dv);
		}
		}
		}
		return (_newString);
	}
/*----- / COURRIELS------*/
	
	
	
	
/*----- ARCHIVES ------*/

function getArchive(pLien){
	var typeVal = document.getElementById('typeArchive').value;
	var type = (typeVal=="") ? "" : ("&type="+document.getElementById('typeArchive').value);
	document.location.href = (pLien + type);
	return false;
	}

function configTypeArchiveForm(pType){
	if(pType != ""){
		document.getElementById("typeArchive").value = pType;
		document.getElementById("optArch_" + pType).selected = "selected";
	}
}
						
/*----- /ARCHIVES ------*/	
/*----- COMMENTAIRE ------*/	
 function onAddComment(idFiche){
    window.open("/nouvelles/carnets/pop-netiquette.asp?numero="+idFiche+"&emission=61","blogcommentaire","width=440,height=530,scrollbars=auto"); 
}
            function switchCommentView(f)
            {
				var _block=	document.getElementById("comments_"+f.id.split("_")[1]);
            if     ( f.className=="buttonCommentOpen")
                    {
					
                        f.className="buttonCommentClosed";
						f.getElementsByTagName("img")[0].src="/nouvelles/surLeWeb/lib/v1/img/off.gif"
						//f.getElementsByTagName("th")[1].innerHTML="Lire les commentaires ("+nbCommentaires+")";
						f.getElementsByTagName("div")[0].style.display="block";
						f.getElementsByTagName("div")[1].style.display="none";
                        _block.style.display="none";
                    }
                    else
                    {
                        f.className="buttonCommentOpen";
						//f.getElementsByTagName("th")[1].innerHTML="Fermer les commentaires ";
						f.getElementsByTagName("div")[1].style.display="block";
						f.getElementsByTagName("div")[0].style.display="none";
						f.getElementsByTagName("img")[0].src="/nouvelles/surLeWeb/lib/v1/img/on.gif"
                        _block.style.display="block";
                    }
             }
			 function onOverAddComment(){
				 this.document.getElementById("addComment").src="/nouvelles/surLeWeb/img/commenter_on.gif";
			 }
			 function onOutAddComment(){
				 this.document.getElementById("addComment").src="/nouvelles/surLeWeb/img/commenter_off.gif"; 
			 }
/*----- COMMENTAIRE ------*/	

						
