// There are two variables below to change to your situation
var totalimages = 6;			// Change this number to equal the number of images you want to page through
var imagepath = "images/"		// Change this path to the path where you are keeping your images


// Don't change anything below here unless you know what you're doing
var imagesize = 1;
var currentimage = 1;

function nextImage(){
	if(document.getElementById('imagespace')){
		if(currentimage < totalimages){
			currentimage += 1;
		}
		else{
			currentimage = 1;
		}
		
		if(imagesize == 1){
			document.getElementById('imagespace').innerHTML = '<img src="' + imagepath + currentimage + '.jpg" alt="Random Picture" />';
		}
		else{
			document.getElementById('imagespace').innerHTML = '<img src="' + imagepath + currentimage + '-full.jpg" alt="Random Picture" />';
		}
	}
}

function previousImage(){
	if(document.getElementById('imagespace')){
		if(currentimage != 1){
			currentimage -= 1;
		}
		else{
			currentimage = totalimages;
		}

		if(imagesize == 1){
			document.getElementById('imagespace').innerHTML = '<img src="' + imagepath + currentimage + '.jpg" alt="Random Picture" />';
		}
		else{
			document.getElementById('imagespace').innerHTML = '<img src="' + imagepath + currentimage + '-full.jpg" alt="Random Picture" />';
		}
	}
}

function enlargeImage(){
	if(document.getElementById('imagespace')){
		imagesize = 2;
		document.getElementById('imagespace').innerHTML = '<img src="' + imagepath + currentimage + '-full.jpg" alt="Random Picture" />';
		
	}
}

function shrinkImage(){
	if(document.getElementById('imagespace')){
		imagesize = 1;
		document.getElementById('imagespace').innerHTML = '<img src="' + imagepath + currentimage + '.jpg" alt="Random Picture" />';
	}
}