// JavaScript Document

// image preloader
function simplePreload()
{ 
  var args = simplePreload.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}

// image swap
function switchImage(imgName, imgSrc) 
{
  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images[imgName].src = imgSrc;
    }
  }
}


// image rotator
// Set up the image files to be used.
var theImages = new Array();

theImages[0] = 'images/imgft_1.jpg';
theImages[1] = 'images/imgft_2.jpg';
theImages[2] = 'images/imgft_3.jpg';
theImages[3] = 'images/imgft_4.jpg';
theImages[4] = 'images/imgft_5.jpg';


var theLinks = new Array();

theLinks[0] = 'Portfolio/our-work.html';
theLinks[1] = 'Portfolio/our-work.html';
theLinks[2] = 'Portfolio/our-work.html';
theLinks[3] = 'Portfolio/our-work.html';
theLinks[4] = 'Portfolio/our-work.html';


var j = 0;
var p = theImages.length;
var preBuffer = new Array();
for (i = 0; i < p; i++){
   preBuffer[i] = new Image();
   preBuffer[i].src = theImages[i];
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<a href="'+theLinks[whichImage]+'" target="_top">'+'<img src="'+theImages[whichImage]+'" border="0"></a>');
}


