/*function to display the home page images at random*/
function displayHomePgBanners(){

	<!-- 
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

//array to hold the links
var theLinks = new Array() 
//array to hold the alt tags
var theALT = new Array() 

//define the location of the images
var path= '../images/home_imgs/';

//define the links

var link1="http://www.artcam.com/videos/2011-online-demo-catchup.html";
var link2="http://www.artcam.com/events/2011-user-group/";
//var link2="http://www.artcamjewelsmith.com";
//var link3="http://www.artcampro.com";





//define the image names

theImages[0] = path + '2011demos.jpg';
theImages[1] = path + 'usergroup2011.jpg';
//theImages[1] = path + 'js-2011.jpg';
//theImages[2] = path + 'pro-2011.jpg';



	


//populate the array with the links defined at the top
theLinks[0] = link1;
theLinks[1] = link2;

//theLinks[2] = link3;







//populate the array with the ALT tags for each image

theALT[0] = "Join us for our free online demos of ArtCAM 2011";
theALT[1] = "Join us at the 2011 ArtCAM User Group";

//theALT[0] = "ArtCAM Express 2011 - ArtCAM 3D Machining Now Available For $149!";
//theALT[1] = "ArtCAM JewelSmith 2011 - The Complete Software Solution For Professional Jewelry Design & CNC Manufacture...";
//theALT[2] = "ArtCAM Pro 2011 - The Complete Software Solution For Professional 3D Design & CNC Manufacture...";





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));

//if the banner should open a new page add to the if statement
if (whichImage==3 | whichImage==5 | whichImage==6 | whichImage==7  ){
	document.write('<a href=" '+ theLinks[whichImage] +' " target="_blank"><img src="'+theImages[whichImage]+'" border=0 alt="'+theALT[whichImage]+'"></a>');
}
else{

document.write('<a href=" '+ theLinks[whichImage] +' " target="_blank"><img src="'+theImages[whichImage]+'" border=0 alt="'+theALT[whichImage]+'"></a>');
}
}
