mainPics = [
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc'
];
smallPics = [
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc',
	'Pictures of the people and places of UW-Manitowoc'
];

// Generate random numbers.
mainPic = Math.floor(Math.random()*mainPics.length);
welcomePic = Math.floor(Math.random()*smallPics.length);
welcomeCaption = smallPics[welcomePic];
smallPics.splice(welcomePic,1);
resourcesPic = Math.floor(Math.random()*smallPics.length);
resourcesCaption = smallPics[resourcesPic];
if (resourcesPic >= welcomePic) resourcesPic++;

// Assemble the image elements.
mainImage = document.createElement('img');
mainImage.src = '/images/homepage/main/'+mainPic+'.jpg';
mainImage.alt = mainPics[mainPic];
mainImage.title = mainImage.alt;
mainImage.height = '290';
mainImage.width = '375';
mainImage.border = '0';

resourcesImage = document.createElement('img');
resourcesImage.height = '110';
resourcesImage.width = '137';
resourcesImage.border = '0';
resourcesImage.src = '/images/homepage/small/'+resourcesPic+'.jpg';
resourcesImage.alt = resourcesCaption;
resourcesImage.title = resourcesImage.alt;
resourcesImage.name = 'resources_photo';

welcomeImage = document.createElement('img');
welcomeImage.height = '110';
welcomeImage.width = '137';
welcomeImage.border = '0';
welcomeImage.src = '/images/homepage/small/'+welcomePic+'.jpg';
welcomeImage.alt = welcomeCaption;
welcomeImage.title = welcomeImage.alt;
welcomeImage.name = 'welcome_photo';

// Assemble the testimonial.
testimonialTitle = document.createElement('h4');
testimonialImage = document.createElement('img');
testimonialImage.height = '29';
testimonialImage.width = '29';
testimonialImage.border = '0';
testimonialImage.src = '/images/homepage/testimonials/'+testimonial+'.jpg';
testimonialImage.alt = testimonialNames[testimonial];
testimonialImage.title = testimonialImage.alt;
testimonialImage.name = 'testimonial_photo';
testimonialImage.style.float = "left";
testimonialTitle.appendChild(testimonialImage);
testimonialTitle.innerHTML = testimonialTitle.innerHTML + testimonialNames[testimonial] + "<br />" + testimonialLocations[testimonial];
testimonialBody = document.createElement('p');
testimonialBody.innerHTML = "&ldquo;" + testimonials[testimonial] + "&rdquo;";