/*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.facebook.com/pages/Delcam-ArtCAM/64991653496";

var link1="http://www.artcam.com/events/awfs09/";*/


var link1="promos/ug2010/";
var link2="http://www.w10exhibition.com";
var link3="advantage.htm";




//define the image names

/*theImages[0] = path + 'header-ipex2010.jpg';*/

theImages[0] = path + 'header_ug2010.jpg';
theImages[1] = path + 'w10-header.jpg';
theImages[2] = path + 'advantage-header-2010.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 on Facebook - Click Here For More Information.";

theALT[0] = "Visit ArtCAM at AWFS Las Vega 2009 - Booth 5038";*/

theALT[0] = "Click here for more information about the ArtCAM User Group 2010, Las Vegas";
theALT[1] = "Join us at the W10 Exhibition, 3-6 October 2010";
theALT[2] = "ArtCAM Advantage: Giving your business the Advantage";




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