var titr2=new Array("Rien ne se jette, tout se donne !",
 "Recyclez ! les poubelles d&eacute;bordent...",
 "Halte &agrave; la surconsommation !",
 "Donner, r&eacute;cup&eacute;rer, rien de plus facile !",
 "Du carrelage en trop ?", "Deux tonnes de terre a vider ?");

var speed=50;
var loop, timer;
var headn=0;
var q=setInterval('HeadChange()',3000);

function hidebox() {
 document.getElementById('infobox').style.display="none";
}

function showbox() {
 var pop = window.document.getElementById("infobox"); 
 pop.style.left=screen.width/2-200;
 pop.style.top=screen.height/2-120;
 pop.style.display="block";
 setTimeout("hidebox()",5500);
}

function setbox(txt) {
 var pop = window.document.getElementById("infobox");
 pop.innerHTML=txt; 
 pop.style.left=screen.width/2-200;
 pop.style.top=screen.height/2-120;
 pop.style.display="block";
 setTimeout("hidebox()",5500);
}

function HeadChange() {
 var x=document.getElementById("titre2");
 x.innerHTML=titr2[headn];
 headn=(headn>4)?0:headn+1;
}

///// Met la photo (n) en gros plan dans detail annonce///////
function Setpix(n) {
  var x=window.document.getElementById("pix"+n);
  if (x!=null) {
   var y=window.document.getElementById("pix0");
   var t=new Image();
   if (y) {
    y.src = x.src;
    t.src = x.src;

    if (t.height>400) {
	   y.style.height=400;
	   y.style.width=t.width*(400/t.height);
    } else {
	   y.style.width=500;
	   y.style.height=t.height*(500/t.width);
   }
  }
 }
}

function Upix(n) {
  var x=window.document.getElementById("pix"+n);
  x.style.border="4px solid #F22";
  x.style.margin="2px 2px 12px 2px";
}
function NoUpix(n) {
  var x=window.document.getElementById("pix"+n);
  x.style.border="0px";
  x.style.margin="6px 6px 16px 6px";
}

