﻿// JScript File
var start = 0
var max = 5

function side(image){
    document.getElementById("big").src = imgSide[image].src;
}

function front(image){
    document.getElementById("big").src = imgBig[image].src;
}

function forward()
{
  start ++;
  if (start >= item.length)
    start = 0;
  imageSwap()
}

function imageSwap(){
count = start
for (i=1;i<=max;i++)
  {  
    if (count >= item.length)
      count = 0;
    document.getElementById(i).src = imgTN[count].src;
    document.getElementById(i).name = (count);

    count ++
  }
}

function backwards()
{
  start --
  if (start <= 0)
    start = item.length;
  imageSwap()
}

function clicked(object){
  var imageToGet = object.name
  document.getElementById("big").src = imgBig[imageToGet].src;
  var textToGet = "text" + object.name ;
  document.getElementById("text").innerHTML = eval(textToGet);
}