/**
 * This function populates an array of available banners and picks one at random, then returns the URL for it
 * so a random banner can be used each page load.
 *
 * @return string
 */
function getImage() {
	var array = new Array();
	for(var i = 0; i <= 7; i++){
		array[i] = "banner_"+ i+ '.jpg';
	}

	return 'assets/images/banners/' + array[(Math.floor(Math.random() * array.length))] ;	
}

/**
 * This function sets the img for banner with id of first parameter to the url of second parameter
 *
 * @param string id Id of the banner to set
 * @param string imageName URL to set as the image's source
 */
function setImage(id, imageName) {
	document[id].src = imageName;	
}