/*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="http://www.artcam.com/events/jck-toronto/";
var link2="http://www.jewellerylondon.com";
var link3="events/iwf/";
var link4="promos/ug2010/";




//define the image names

/*theImages[0] = path + 'header-ipex2010.jpg';*/
theImages[0] = path + 'JCK_Toronto2010.jpg';
theImages[1] = path + 'header_ijl2010.jpg';
theImages[2] = path + 'header_iwf2010.jpg';
theImages[3] = path + 'header_ug2010.jpg';




	


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




//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] = "Join ArtCAM at JCK 2010 Toronto";
theALT[1] = "Click here to visit the Jewellery London website";
theALT[2] = "Click here to visit meet us at IWF 2010";
theALT[3] = "Click here for more information about the ArtCAM User Group 2010, Las Vegas";




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