var text1 = 'Economisez de l\'argent! <br/>Profitez de nos prix DISCOUNT<br/> toute l\'ann&eacute;e';
var text2 = 'OPTEZ pour la TRANSPARENCE <br/>Prix affich&eacute; = Prix factur&eacute;'; 
var text3 = 'Ne PERDEZ plus de TEMPS<br/>Gestion simplifi&eacute;e, Etats d&eacute;taill&eacute;s<br/>Service t&eacute;l&eacute;phonique d&eacute;di&eacute;'; 
var text4 = 'VOTRE PLAN D\'ECONOMIE CARBURANT<br/>=<br/>NOTRE PROGRAMME CARTE PRO AUCHAN'; 
// Array of texts to loop through
var textSet = [text1,text2,text3,text4];

// Function to change text
function swapText(){
var i,x,j,n;
i = textSet.length;
n = document.getElementById('numtext').value;

//n = j[j.length-1];

// Find index of current image in array
while ( i-- && i != n ){}

// Set new image to index + 1 or loop if beyond end of array
document.getElementById('numtext').value = (i+1) % textSet.length;
document.getElementById('textajax').innerHTML = textSet[(i+1) % textSet.length];
}

// Setup timer
setInterval("swapText()",4000);
