//<iframe src="" class="HomeForm" width="960" height="440" frameborder="0" marginwidth="0" scrolling="no" ><p>"Noooooo"</p></iframe> 
//    <iframe src="img/photos/1.html" class="HomeForm" width="960" height="440" frameborder="0" marginwidth="0" scrolling="no" ><p>"Noooooo"</p></iframe> 
//    <iframe src="img/photos/0.html" class="HomeForm" width="960" height="440" frameborder="0" marginwidth="0" scrolling="no" ><p>"Noooooo"</p></iframe> 

var t;//Timer var
var duration = 10;//duration time between each diapo

var Dash = {//Dashboard definition
    nextIndex: 0, //i like incrementation

    dashboards: [//Different boards
        { url: "../Slideshow/img/photos/1.html", time: duration },
        { url: "../Slideshow/img/photos/2.html", time: duration },
        { url: "../Slideshow/img/photos/3.html", time: duration },
        { url: "../Slideshow/img/photos/4.html", time: duration },
        { url: "../Slideshow/img/photos/5.html", time: duration },
		{ url: "../Slideshow/img/photos/6.html", time: duration },
        { url: "../Slideshow/img/photos/7.html", time: duration },
        { url: "../Slideshow/img/photos/8.html", time: duration },
        { url: "../Slideshow/img/photos/9.html", time: duration },
		{ url: "../Slideshow/img/photos/10.html", time: duration },
        { url: "../Slideshow/img/photos/11.html", time: duration },
        { url: "../Slideshow/img/photos/12.html", time: duration },
        { url: "../Slideshow/img/photos/13.html", time: duration },
		{ url: "../Slideshow/img/photos/14.html", time: duration },
//       { url: "../Slideshow/img/photos/15.html", time: duration },
//        { url: "../Slideshow/img/photos/16.html", time: duration },
//        { url: "../Slideshow/img/photos/17.html", time: duration },
//		{ url: "../Slideshow/img/photos/18.html", time: duration },
//        { url: "../Slideshow/img/photos/19.html", time: duration },
//        { url: "../Slideshow/img/photos/20.html", time: duration }
    ]}


function display () {
        var dashboard = Dash.dashboards[Dash.nextIndex];
        frames["displayArea"].location.href = dashboard.url;
        Dash.nextIndex = (Dash.nextIndex + 1) % Dash.dashboards.length; //Incrementation
        t=setTimeout(display, dashboard.time * 1000);
}

window.onload = display;

    //Element by id in order to do action
//  var Next = document.getElementById("next");
//  var Prev = document.getElementById('prev');
//
//  
//  Next.onclick=onnext;
//  Prev.onclick = onprev;
  //Function started by the right arrow
  function onnext () {
      var dashboard = Dash.dashboards[Dash.nextIndex]; //Slide to show
      frames["displayArea"].location.href = dashboard.url; //Slide updated
      Dash.nextIndex = (Dash.nextIndex + 1) % Dash.dashboards.length; //Incrementation
      clearTimeout(t);//Stop the timer of the slideshow
      t=setTimeout(display, dashboard.time * 1000);//Restart the timecount

  }

  //Function started by the left arrow
  function onprev() {
      var dashboard = Dash.dashboards[(Dash.nextIndex-2)];//Slide to show
      Dash.nextIndex = (Dash.nextIndex -1) % Dash.dashboards.length; //Incrementation
      frames["displayArea"].location.href = dashboard.url;//Slide updated
      clearTimeout(t); //Stop the timee of the slideshow
      t = setTimeout(display, dashboard.time * 1000); //Restart the timecount
  }



