function loadNextImage() {
	//get image object
	var myImg = document.getElementById('myImage');

	//declare image directory path and image array
	var thePath = "/_assets/";
	var theImages = new Array();
	theImages[0] = "banner_home1.jpg";
	theImages[1] = "banner_home2.jpg";
	theImages[2] = "banner_home3.jpg";
	theImages[3] = "banner_home4.jpg";
	theImages[4] = "banner_home5.jpg";
	theImages[5] = "banner_home6.jpg";
	theImages[6] = "banner_home7.jpg";
	theImages[7] = "banner_home8.jpg";
	theImages[8] = "banner_home9.jpg";
	theImages[9] = "banner_home10.jpg";
	theImages[9] = "banner_home11.jpg";
	
	//get current cookie value
	var currentIndex = parseInt(getCookie());
	var imgPath = thePath + theImages[currentIndex];
	myImg.src = imgPath;
	myImg.alt = theImages[currentIndex];
	myImg.title = theImages[currentIndex];
	
	//set next cookie index
	currentIndex += 1;
	if(currentIndex > (theImages.length - 1)) {
		currentIndex = 0;
	}
	setCookie(currentIndex);
}

function setCookie(someint) {
	var now = new Date();
	var addDays = now.getDate() + 7
	now.setDate(addDays); // cookie expires in 7 days
	var theString = 'imgID=' + escape(someint) + ';expires=' + now.toUTCString();
	document.cookie = theString;
}

function getCookie() {
	var output = "0";
	if(document.cookie.length > 0) {
		var temp = unescape(document.cookie);
		temp = temp.split(';');
		for(var i = 0; i < temp.length; i++) {
			if(temp[i].indexOf('imgID') != -1) {
				temp = temp[i].split('=');
				output = temp.pop();
				break;
			}
		}
	}
	return output;
}
