var image = new Array ()
image[0] = "img/pic_def1.jpg";
image[1] = "img/pic_def2.jpg";
image[2] = "img/pic_def3.jpg";
image[3] = "img/pic_def4.jpg";
image[4] = "img/pic_def5.jpg";
image[5] = "img/blank.gif";
image[6] = "img/blank.gif";

var description = new Array ()

description[0] = "Photo au nepal";
description[1] = "Photo au nepal 2";
description[2] = "Photo au nepal 3";
description[3] = "Photo au nepal 4";
description[4] = "Photo au nepal 5";





var image_courrante = 0

function suiv()
{
 image_courrante++
 if (image_courrante > image.length-1)
 {
 //alert('img cour trop grande');
 image_courrante = 0;

 }
 
 document.imageAff.src = image[image_courrante] ;
 document.imageAff2.src = image[image_courrante + 1]  ;
 document.imageAff3.src = image[image_courrante + 2]  ;
 document.getElementById('description').innerHTML = description[image_courrante] ;
document.getElementById('hreff').href = 'img/<?php echo($annee) ?>/' + image[image_courrante] + '.jpg' ;
 if (image_courrante < description.length-1) {
 document.imageAff2.style.visibility = 'visible' ;
 document.getElementById('descriptionB').style.visibility = 'visible' ;
 document.getElementById('descriptionB').innerHTML = description[image_courrante + 1] ;
 document.getElementById('hreff').href = 'img/<?php echo($annee) ?>/' + image[image_courrante] + '.jpg' ;
 }
 
 
 else {
 //alert('ok') ;
 document.imageAff2.style.visibility = 'hidden' ;
 document.getElementById('descriptionB').style.visibility = 'hidden' ;
 
 }
 
} 
 
 

function prec()
{
 image_courrante--
 document.imageAff2.style.visibility = 'visible' ;
 document.getElementById('descriptionB').style.visibility = 'visible' ;
 if (image_courrante < 0)
 {
 image_courrante = image.length-1;
 document.imageAff2.style.visibility = 'hidden' ;
 document.getElementById('descriptionB').style.visibility = 'hidden' ;
 }
 //alert(image_courrante) ;
 
 document.imageAff.src = image[image_courrante] ;
 document.imageAff2.src = image[image_courrante -2]  ;
document.imageAff3.src = image[image_courrante -3]  ;
 document.getElementById('description').innerHTML = description[image_courrante] ;
 if (image_courrante > 0 || image_courrante < description.length-1 ) {
 //alert('if image-courr' + image_courrante) ;
 
 document.getElementById('descriptionB').innerHTML = description[image_courrante +1] ;
 document.imageAff2.src = image[image_courrante +1]  ;
 }
 else { 
 alert('ok');
 } 

 
 } 


