function doRandomImage()
{
	getRandomImage( 1, 2, '1' );
	getRandomImage( 3, 4, '2' );
	getRandomImage( 5, 6, '3' );
	getRandomImage( 7, 8, '4' );
	getRandomImage( 9, 10, '5' );
	getRandomImage( 11, 12, '6' );
	getRandomImage( 13, 14, '7' );
	getRandomImage( 15, 16, '8' );
}

function getRandomImage( num1, num2, id )
{
	var rand;
	var itemImage = new Array(); 			// set up array for the image of the item
	var itemPrice = new Array();			// set up array for the price of the item
	var itemName = new Array();				// set up array for the name of the item
	var itemDescription = new Array();		// set up array for the description of the item
	var itemURL = new Array();			// set up array for the link to the item

	// top left item one
	itemImage[1]		= '<img src="/images/shoei-multitec_m.jpg" />';
	itemPrice[1] 		= '$434.69';
	itemName[1] 		= 'SHOEI MULTITEC';
	itemDescription[1] 	= 'Modular convertible helmet, convenience of an open face helmet, secure feeling of a full face helmet.';
	itemURL[1] 			= '<a href="/s/full-face-helmet-modular-shoei/shoei-multitec.htm">Go to Item &raquo;</a>';
		
	// top left item two
	itemImage[2]		= '<img src="/images/shoei-rf-1000_m.jpg" />';
	itemPrice[2] 		= '$331.19';
	itemName[2] 		= 'SHOEI RF-1000 FULL FACE';
	itemDescription[2] 	= 'Aerodynamically superior, the RF-1000 sport helmet delivers wind tunnel proven high speed performance and ventilation.';
	itemURL[2] 			= '<a href="/s/rf1000/shoei-rf-1000.htm">Go to Item &raquo;</a>';
	
	// top left item three
	itemImage[3]		= '<img src="/images/hjc-fs-3_m.jpg" />';
	itemPrice[3] 		= '$529.19';
	itemName[3] 		= 'HJC FS-3 OPEN FACE';
	itemDescription[3] 	= 'Lightweight, fiberglass and Spectra composite weave shell, optional shield for easy riding';
	itemURL[3] 			= '<a href="/s/fs-3/hjc-fs3.htm">Go to Item &raquo;</a>';
	
	// top left item four
	itemImage[4]		= '<img src="/images/hjc-fs-10_m.jpg" />';
	itemPrice[4] 		= '$107.95';
	itemName[4] 		= 'HJC FS-10 FULL FACE';
	itemDescription[4] 	= 'The all-new FS-10 offers an innovative inner Sun Shield for extra protection against glare';
	itemURL[4] 			= '<a href="/s/fs-10/hjc-fs10.htm">Go to Item &raquo;</a>';
	
	// top right item one
	itemImage[5]		= '<img src="/images/arai-helmet_m.jpg" />';
	itemPrice[5] 		= '$206.99';
	itemName[5] 		= 'ARAI RX7 CORSAIR';
	itemDescription[5] 	= 'High performance helmet. built for racing. 3 Arai fitments: Long Oval, Round Oval and Intermediate Oval';
	itemURL[5] 			= '<a href="/s/rx7%20cor/arai-rx7-corsair.htm">Go to Item &raquo;</a>';
	
	// top right item two
	itemImage[6]		= '<img src="/images/arai-off-road_m.jpg" />';
	itemPrice[6] 		= '$59.99';
	itemName[6] 		= 'ARAI XD\'3 OFF ROAD';
	itemDescription[6]	= 'New from Arai, twin cam shield pivot system, can be used with shield n peak, peak only or shield only.';
	itemURL[6] 		= '<a href="/s/arai%20xd/arai-xd3-offroad.htm">Go to Item &raquo;</a>';
		
	// top right item three
	itemImage[7]		= '<img src="/images/firstgear_m.jpg" />';
	itemPrice[7] 		= '$89.95';
	itemName[7] 		= 'FIRSTGEAR DENALI';
	itemDescription[7] 	= 'Firstgear offers high fashion design and excellent quality and the safety features are unparalleled';
	itemURL[7] 			= '<a href="/s/denali/firstgear-motorcycle-apparel.htm">Go to Item &raquo;</a>';
		
	// top right item four
	itemImage[8]		= '<img src="/images/first-gear_m.jpg" />';
	itemPrice[8] 		= '$99';
	itemName[8] 		= 'FIRSTGEAR WOMEN\'S';
	itemDescription[8] = 'Industry leading motorcycle apparel, great fit, comfortable and of course stylish designs.';
	itemURL[8] 		= '<a href="/s/firstgear/women-motorcycle-apparel.htm">Go to Item &raquo;</a>';

	// bottom left item one
	itemImage[9]		= '<img src="/images/cortech-gx-sport-2_m.jpg" />';
	itemPrice[9] 		= '$99';
	itemName[9] 		= 'CORTECH TEXTILE';
	itemDescription[9] = 'Excellent quality at an unbeatable price. One of the most poplular brand in motorcycle apparel';
	itemURL[9] 		= '<a href="/s/gx-sport/cortech-motorcycle-apparel.htm">Go to Item &raquo;</a>';
	
		// bottom left item two
	itemImage[10]		= '<img src="/images/tourmaster-lrx-2_m.jpg" />';
	itemPrice[10] 		= '$99';
	itemName[10] 		= 'TOURMASTER WOMEN\'S';
	itemDescription[10] = 'Tourmaster offers lots of models with several color options specifically designed for women';
	itemURL[10] 		= '<a href="/s/lrx/tourmaster-women.htm">Go to Item &raquo;</a>';
	
		// bottom left item three
	itemImage[11]		= '<img src="/images/honda-gloves_m.jpg" />';
	itemPrice[11] 		= '$99';
	itemName[11] 		= 'HONDA RACING APPAREL';
	itemDescription[11] = 'The name says it all. If you have a Honda, you\'ve got to get some HONDA racing apparel';
	itemURL[11] 		= '<a href="/s/honda/honda-racing-apparel.htm">Go to Item &raquo;</a>';
	
		// bottom left item four
	itemImage[12]		= '<img src="/images/honda-jacket_m.jpg" />';
	itemPrice[12] 		= '$99';
	itemName[12] 		= 'HONDA RACING APPAREL';
	itemDescription[12] = 'Excellent quality, great designs that will match perfectly with your choice of ride.';
	itemURL[12] 		= '<a href="/s/honda/honda-racing-jacket.htm">Go to Item &raquo;</a>';
	
		// bottom right item one
	itemImage[13]		= '<img src="/images/tcx-competition_m.jpg" />';
	itemPrice[13] 		= '$99';
	itemName[13] 		= 'TCX/OXTAR BOOTS';
	itemDescription[13] = 'Built for safety and performance. TCX made professional quality racing and offroad motorcycle boots.';
	itemURL[13] 		= '<a href="/s/tcx/tcx-oxtar-boots.htm">Go to Item &raquo;</a>';
	
		// bottom right item two
	itemImage[14]		= '<img src="/images/tcx-competizione_m.jpg" />';
	itemPrice[14] 		= '$99';
	itemName[14] 		= 'TCX/OXTAR BOOTS';
	itemDescription[14] = 'Built for safety and performance. TCX made professional quality racing and offroad motorcycle boots.';
	itemURL[14] 		= '<a href="/s/competizione/tcx-oxtar-boots.htm">Go to Item &raquo;</a>';
	
		// bottom right item three
	itemImage[15]		= '<img src="/images/yoshimura_m.jpg" />';
	itemPrice[15] 		= '$99';
	itemName[15] 		= 'YOSHIMURA EXHAUST';
	itemDescription[15] = 'Arguably the best exhaust in the market. High performance, looks and sounds amazing.';
	itemURL[15] 		= '<a href="/s/yoshimura/motorcycle-exhaust.htm">Go to Item &raquo;</a>';
	
		// bottom right item four
	itemImage[16]		= '<img src="/images/yoshimura-exhaust_m.jpg" />';
	itemPrice[16] 		= '$99';
	itemName[16] 		= 'YOSHIMURA EXHAUST';
	itemDescription[16] = 'Arguably the best exhaust in the market. High performance, looks and sounds amazing.';
	itemURL[16] 		= '<a href="/s/yoshimura/exhaust-yoshimura.htm">Go to Item &raquo;</a>';
	
	
  // get the random number or the array
  rand = getRandom( num1, num2 );
   
  
  // write to the document the proper image and caption 
  document.getElementById('itemImage' + id).innerHTML = itemImage[rand];
  //document.getElementById('itemPrice' + id).innerHTML = itemPrice[rand];
  document.getElementById('itemName' + id).innerHTML = itemName[rand];
  document.getElementById('itemDescription' + id).innerHTML = itemDescription[rand];
  document.getElementById('itemLink' + id).innerHTML = itemURL[rand];
  

}

function getRandom(num1, num2)
{
	num1 = parseInt(num1);
	num2 = parseInt(num2);
	if(num1 >= num2)
	{
		alert("Number 2 should be greater than Number 1");
	}
	else
	{
		var generator = Math.random()*(num2-num1);
		generator = Math.round(num1+generator);
		return generator;
	}
}