// JavaScript Document
function loadNextImage() {
				//get image object
				var myImg = document.getElementById('myImage');
			
				//declare image directory path and image array
				var thePath = "images/home/";
				var theImages = new Array();
				theImages[0] = "Pacifica1.jpg";
				theImages[1] = "Secondo-1.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;
			}
