var IE, NbreH, NbreV, nbAff, timerAff, C0;
var nbMin=1, nbDeb=1, nbTot=7, nbUn=0, ChAff=false;
nbAff=nbDeb;
var F4="#339933", F1="#CCFFCC", F2="#800000", F3="#FFCC99";
var B4="#CCFFCC", B1="#339933", B2="#FFCC99", B3="#800000";
var tabInfo=new Array(), itCont=new Array();
tabInfo[1]="Le site est optimisé pour une résolution 1024 x 768.<br>Il est compatible avec FireFox, MSIE6 et Netscape7.<br><a href=\"mailto:rene@charaix.com\">Contacter le Responsable Internet</a>";
tabInfo[2]="Mise à jour du 7 février 2010.";
tabInfo[3]="À partir du 1er septembre,<br>le ramassage des ordures ménagères a lieu<br>les lundis, et vendredis<br>à partir de 7 h du matin.";
tabInfo[4]="Bibliothèque municipale - Horaires d'hiver<br>Ouverture les lundis, mercredis et jeudis.";
tabInfo[5]="Le nouveau bulletin municipal<br>est en ligne.";
tabInfo[6]="La Quarantième de l'Étoile de Bessèges à eu lieu<br>du 3 au 7 février.";
tabInfo[7]="Site Internet<br>Une page est offerte à chaque association, artisan, commerçant et hébergeur gagniérois qui le souhaite.";

itCont[1]="<a href='Themes/Environ/Index.html'>&nbsp;Déchets et Devenir&nbsp;</a>";
itCont[2]="<a href='Themes/Emploi/Index.html'>&nbsp;Documents sur l'Emploi&nbsp;</a>";
itCont[3]="<a href='Themes/Histoire/Index.html'>&nbsp;Documents d'Histoire&nbsp;</a>"
itCont[4]="<a href='Themes/Archives/Index.html'>&nbsp;Accès aux Archives&nbsp;</a>"
 
function Init() {
  NbreH=5;
  NbreV=5;
  Ouvreh(0);
  document.getElementById("Blase").style.visibility="hidden";
  if(document.getElementById) { IE=0; }
  else { IE=1; }
  if (nbUn==0) {
    timerAff = setInterval("Affiche()",2000);
    nbUn=1; } }

function Ouvreh(id) {
  document.getElementById("itVert").style.visibility="hidden";
  document.getElementById("Blase").style.visibility="visible";
  var d = document.getElementById("ssmh"+id);
  for (var i = 1; i<=NbreH; i++) {
    if (document.getElementById("ssmh"+i)) {
      document.getElementById("ssmh"+i).style.display="none";} }
  if (d) {d.style.display="block";} }

function Affiche() {
  var objAffiche=document.getElementById("Mail")
  objAffiche.style.color=F1;
  objAffiche.style.backgroundColor=B1;
  objAffiche.innerHTML =tabInfo[nbAff];    
  ChAff=!ChAff;
  if (ChAff) {nbAff++;}
  C0=F1; F1=F2; F2=F3; F3=F4; F4=C0;
  C0=B1; B1=B2; B2=B3; B3=B4; B4=C0;
  if (nbAff>nbTot) {nbAff=nbMin;} }
 
 function Voir(num) {
  if (num==1) {
    document.getElementById("Cache").style.visibility="visible";
    document.getElementById("Nouveau").style.visibility="hidden";
    setTimeout("Voir(2)",6000) }
  else { 
    document.getElementById("Cache").style.visibility="hidden";
    document.getElementById("Nouveau").style.visibility="visible"; } }

function bougeV(num) {
  Ouvreh(0);
  var posV=239 + (num-1)*22;
  document.getElementById("itVert").style.top=posV + "px";
  document.getElementById("itVert").innerHTML="<div>" + itCont[num] + "</div>";
  document.getElementById("itVert").style.visibility="visible"; } 

function metStar(num) {
  if (num==1) document.getElementById("popStar").style.visibility="visible"; 
  else document.getElementById("popStar").style.visibility="hidden"; }
 
function pasFait(num) {
  if (num==1) { document.getElementById("nc").style.visibility="visible"; }
  else { document.getElementById("nc").style.visibility="hidden"; } }