function buildImageBar(numOfImgs)
{	
	//build an array to check values 
	var checkArray = new Array();

	//counter for checkArray
	var checkArrayCtr = 1;
	//this keep us looping while we don't have a unique ID
	var exitWhile = 0;
	//unique image found
	var uniqueImg = '';
		
	//loop through the number of images we are going to output
	for(i=1;i<numOfImgs;i++)
	{					
		//loop until we find a unique ID					
		while(exitWhile == 0)
		{
			//randomly get a new image number from our list of images
			currentImg = Math.floor(Math.random() * totalImages) + 1;

			//check to see if there is more then on image ID in our array
			if(checkArray.length > 1)
			{
				//if unique image found
				var uniqueImg = 1;

				//loop through the checkarray ID
				//This will check for the currentImg in the array. If it is there we have to randomly grab another ID
				for(j=1;j<checkArray.length;j++)
				{					
					if(currentImg == checkArray[j])
					{
						//not unique
						uniqueImg = 0;
						//force exit from j loop
						j = checkArray.length + 2;
					}
				}

				if(uniqueImg == 1)
				{
					//add the unique ID to the check array
					checkArray[checkArrayCtr] = currentImg;
					checkArrayCtr++;

					//exit from while loop
					exitWhile = 1;

					//write the image out to the document
					document.write(beg + currentImg + end);
				}
			}
			else
			{				
				//add the unique ID to the check array
				checkArray[checkArrayCtr] = currentImg;
				checkArrayCtr++;

				exitWhile = 1;

				//write the image out to the document
				document.write(beg + currentImg + end);	
			}
		}
		//reset the while check
		exitWhile = 0;
	}
}

//total images
var totalImages = 24;

//image tag
var beg = '<img src="images/100/';
var end = '.jpg" width="100" height="100" /><br />';

var imagenumberT = 3 ;
var randomnumberT = Math.random() ;
var randT = Math.round( (imagenumberT-1) * randomnumberT) + 1 ;