// ---------------------------------------------------------------------------------
// RANDOM IMAGE SET SELECTOR
// developed by Digital Valley (www.digitalvalley.co.za)
// ---------------------------------------------------------------------------------

// array to store image paths
var aImages = new Array();
aImages[0] = "http://www.craftmachinetools.co.za/images/home_left_01.jpg";
aImages[1] = "http://www.craftmachinetools.co.za/images/home_left_02.jpg";
aImages[2] = "http://www.craftmachinetools.co.za/images/home_left_03.jpg";
aImages[3] = "http://www.craftmachinetools.co.za/images/home_left_04.jpg";
aImages[4] = "http://www.craftmachinetools.co.za/images/home_left_05.jpg";

// array to store link paths
var aLinks = new Array();
aLinks[0] = "http://www.craftmachinetools.co.za/gasparini.php";
aLinks[1] = "http://www.craftmachinetools.co.za/feeler.php";
aLinks[2] = "http://www.craftmachinetools.co.za/haco.php";
aLinks[3] = "http://www.craftmachinetools.co.za/new.php";
aLinks[4] = "http://www.craftmachinetools.co.za/new.php";

// variables
var xImage;
var xLink;

function getImages() 
{
	// stores a random number
	var xNumber = Math.round(Math.random() * (aImages.length - 1));
	
	// gets and stores the 3 images from the selected accident array
	xImage = aImages[xNumber];
	xLink = aLinks[xNumber];
}

// runs the script
getImages();
