<!-- Paste this code into an external JavaScript file named: nextPrevious.js  -->

/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Solomon, the Sleuth :: http://www.freewebs.com/thesleuth/scripts/ */

var i = 0;
var count = 9;

// List image names without extension
var myImg= new Array(count)
  myImg[0]= "01_Show09_01";
  myImg[1]= "02_Minipli_01";
  myImg[2]= "03_Delvaux_Look_Book_01";
  myImg[3]= "04_Catclub_New_2009_01";
  myImg[4]= "05_Show_08_01";
  myImg[5]= "06_Delvaux_Invitations_FFI_01";
  myImg[6]= "07_Lady_Jane_CDs_01";
  myImg[7]= "08_Show_07_01";
  myImg[8]= "09_Bar_Music_Hall_03";
  myImg[9]= "10_Glad_01";

// ImageNumbers:
var myNr= new Array(count)
  myNr[0]= "1/10";
  myNr[1]= "2/10";
  myNr[2]= "3/10";
  myNr[3]= "4/10";
  myNr[4]= "5/10";
  myNr[5]= "6/10";
  myNr[6]= "7/10";
  myNr[7]= "8/10";
  myNr[8]= "9/10";
  myNr[9]= "10/10";

// Imagetexts:
var myText= new Array(count)
  myText[0]= "Show 09 - Poster for La Cambre Mode(s) - Detail<br>Photo: Emmanuel Laurent - AD: Pierre Daras - Owl: Steve";
  myText[1]= "Minipli - Logo/Font for a band";
  myText[2]= "Delvaux Spring-Summer 09 - Look book<br>Photo: Filip Vanzieleghem - AD and papercuts: Steve for Studio Delvaux";
  myText[3]= "Catclub 2009 - Logo";
  myText[4]= "Show 08 - Poster for La Cambre Mode(s) - Detail<br>Photo: Emmanuel Laurent - AD: Pierre Daras and Steve";
  myText[5]= "Delvaux Autumn-Winter 08-09 - Invitation for presentation at FFI - Antwerp<br>Illustration: Steve for Studio Delvaux";
  myText[6]= "Lady Jane - CD design for Brussels based Dj";
  myText[7]= "Show 07 - Title for La Cambre Mode(s)";
  myText[8]= "Bar Music Hall - Wallpaper for a bar in London-Shoreditch";
  myText[9]= "Glad - Logo for Brussels based mini-magazine";

// Tell browser where to find the image
myImgSrc = "images/showcase/";

// Tell browser the type of file
myImgEnd = ".jpg"

// Create function to load image
function loadImg(){
  document.imgSrc.src = myImgSrc + myImg[i] + myImgEnd;
  document.getElementById("numbers").innerHTML = myNr[i];
  document.getElementById("imgtxt").innerHTML = myText[i];
}

// Create link function to switch image backward
function prev(){
  if(i>0){
  i = i-=1;
  document.imgSrc.src = myImgSrc + myImg[i] + myImgEnd;
  document.getElementById("numbers").innerHTML = myNr[i];
  document.getElementById("imgtxt").innerHTML = myText[i];
}
}

// Create link function to switch image forward
function next(){
  if(i<count){
  i = i+=1;
  document.imgSrc.src = myImgSrc + myImg[i] + myImgEnd;
  document.getElementById("numbers").innerHTML = myNr[i];
  document.getElementById("imgtxt").innerHTML = myText[i];
}  
}

// Load function after page loads
window.onload=loadImg;
