function Semaine(){this[0]="Dimanche";this[1]="Lundi";this[2]="Mardi";this[3]="Mercredi";this[4]="Jeudi";this[5]="Vendredi";this[6]="Samedi";}
function Mois(){this[0]="janvier";this[1]="février";this[2]="mars";this[3]="avril";this[4]="mai";this[5]="juin";this[6]="juillet";this[7]="août";this[8]="septembre";this[9]="octobre";this[10]="novembre";this[11]="décembre";}
function date(){var semaine=new Semaine();var mois=new Mois();var myDate=new Date();var result1=semaine[myDate.getDay()]+"&nbsp;";var result2=myDate.getDate()+"&nbsp;"+mois[myDate.getMonth()]+" ";document.writeln(result1+"<a href='http://www.linternaute.com/histoire/jour/"+myDate.getDate()+"/"+(myDate.getMonth()+1)+"/a/1/0/1/index.shtml' target='_blank' style='text-decoration:none;'><span>"+result2+"</span></a>");}
function date_new_tetiere(){var semaine=new Semaine();var mois=new Mois();var myDate=new Date();var result1=semaine[myDate.getDay()]+"&nbsp;";var result2=myDate.getDate()+"&nbsp;"+mois[myDate.getMonth()]+" ";return result1+result2;}
function VersionNavigateur(Netscape,Explorer){if((navigator.appVersion.substring(0,3)>=Netscape&&navigator.appName=='Netscape')||(navigator.appVersion.substring(0,3)>=Explorer&&navigator.appName.substring(0,9)=='Microsoft'))
return true;else return false;}
function openWin(windowURL,windowName,windowFeatures){return window.open(windowURL,windowName,windowFeatures);}
navvers=navigator.appVersion.substring(0,1);if(navvers>3)navok=true;else navok=false;today=new Date;jour=today.getDay();numero=today.getDate();if(numero<10)numero="0"+numero;mois=today.getMonth();if(navok)annee=today.getFullYear();else annee=today.getYear();TabMois=new Array("janvier","février","mars","avril","mai","juin","juillet","aout","septembre","octobre","novembre","décembre");messageDate=+numero+" "+TabMois[mois]+" ";function valideRechercheTetiere(){document.recherche_interne.action=document.getElementById('f_chaine_tetiere').value;return true;}
function verifKeyPressRechercheTetiere(event){if(event.keyCode==13){valideRechercheTetiere();document.recherche_interne.submit();}}
function largeur_fenetre()
{if(window.innerWidth)return window.innerWidth;else if(document.body&&document.body.offsetWidth)return document.body.offsetWidth;else return 0;}
var largeur=largeur_fenetre();if(navigator.appName=="Netscape"){largeur=largeur-17;}
if(largeur>1004){if(document.getElementById('bloc_tetiere_plate')){document.getElementById("bloc_tetiere_plate").style.width=largeur+"px";}else if(document.getElementById('bloc_tetiere')){document.getElementById("bloc_tetiere").style.width=largeur+"px";}else if(document.getElementById("bloc_tetiere_accueil")) {document.getElementById("bloc_tetiere_accueil").style.width=largeur+"px";}}
if(document.getElementById("search")){document.getElementById("search").onclick=valideRechercheTetiere;}
if(document.getElementById("tetiere_f_recherche")){document.getElementById("tetiere_f_recherche").onkeypress=function(event){verifKeyPressRechercheTetiere(event);}}
if(document.getElementById("tetiere_valide")){document.getElementById("tetiere_valide").onclick=function(){valideRechercheTetiere();document.recherche_interne.submit();}}
if(document.getElementById("aujourdhui")){document.getElementById("aujourdhui").innerHTML=date_new_tetiere();}
if(document.getElementById("tetiere_radio")){var id_radio=document.getElementById("id_radio").value;document.getElementById("tetiere_radio").href="javascript:window.open('http://redirection.linternaute.com/"+id_radio+"/','radio','width=400,height=226,menubar=no,toolbar=no,status=no,titlebar=no,personalbar=no,resizable=no,scrollbars=no,location=no,top=0,left=0');void(0);"}
if(document.getElementById("f_auth_identifiant")){document.getElementById("f_auth_identifiant").onclick=function(){if(document.getElementById("f_auth_identifiant").value=="Votre email"){document.getElementById("f_auth_identifiant").value='';}}}
if(document.getElementById("f_auth_mot_de_passe_text")){document.getElementById("f_auth_mot_de_passe_text").onfocus=function(){document.getElementById("f_auth_mot_de_passe_text").style.display='none';document.getElementById("f_auth_mot_de_passe").style.display='block';document.getElementById("f_auth_mot_de_passe").focus();}}
function connexion(){
if(!document.getElementById('bloc_coldroite_auth')){
if(document.getElementById('recherche')){document.getElementById('recherche').style.display="none";}}
if(document.getElementById('bloc_session_inscrit')){document.getElementById('bloc_session_inscrit').style.display="none";}
if(document.getElementById('bloc_session')){document.getElementById('bloc_session').style.display="none";}
if(document.getElementById('bloc_session_authentification')){document.getElementById('bloc_session_authentification').style.display="block";}return false;}
function getCookie(libelle){var debut=document.cookie.indexOf(libelle+"=");if(debut>=0){debut+=libelle.length+1;var fin=document.cookie.indexOf(";",debut);if(fin<0)fin=document.cookie.length;var retour=unescape(document.cookie.substring(debut,fin))
return retour.replace('+',' ');}
else{return"";}}
function chargeBlocSession(){var prenom=getCookie("prenom");var crpt=getCookie("crpt");var id_authentification=getCookie("id_authentification");
if(prenom&&id_authentification&&crpt){
if(document.getElementById('recherche')){document.getElementById('recherche').style.display="block";}
if(document.getElementById('bloc_session')){document.getElementById('bloc_session').style.display="none";}
if(document.getElementById('bloc_session_authentification')){document.getElementById('bloc_session_authentification').style.display="none";}
if(document.getElementById('bloc_session_inscrit')){document.getElementById('bloc_session_inscrit').style.display="block";}
if(document.getElementById("bloc_session_inscrit_prenom1")){document.getElementById("bloc_session_inscrit_prenom1").innerHTML=prenom;}
if(document.getElementById("bloc_session_inscrit_prenom2")){document.getElementById("bloc_session_inscrit_prenom2").innerHTML=prenom;}}}
chargeBlocSession();if(document.getElementById("bloc_session_lien")){document.getElementById("bloc_session_lien").onclick=connexion;}