function changeImage()
{
	var list = document.getElementById('optionlist');
	document.mainimage.src = list.options[list.selectedIndex].value;
}

function prevImage()
{
	var list = document.getElementById('optionlist');
	if(list.selectedIndex == 0)
	{
		list.selectedIndex = list.options.length-1;
	}
	else
	{
		list.selectedIndex--;
	}
	changeImage();
}

function nextImage()
{
	var list = document.getElementById('optionlist');
	if(list.selectedIndex == list.options.length-1)
	{
		list.selectedIndex = 0;
	}
	else
	{
		list.selectedIndex++;
	}
	changeImage();
}

function changeImage2()
{
	var list = document.getElementById('optionlist2');
	document.mainimage2.src = list.options[list.selectedIndex].value;
}

function prevImage2()
{
	var list = document.getElementById('optionlist2');
	if(list.selectedIndex == 0)
	{
		list.selectedIndex = list.options.length-1;
	}
	else
	{
		list.selectedIndex--;
	}
	changeImage2();
}

function nextImage2()
{
	var list = document.getElementById('optionlist2');
	if(list.selectedIndex == list.options.length-1)
	{
		list.selectedIndex = 0;
	}
	else
	{
		list.selectedIndex++;
	}
	changeImage2();
}

function changeImage3()
{
	var list = document.getElementById('optionlist3');
	document.mainimage3.src = list.options[list.selectedIndex].value;
}

function prevImage3()
{
	var list = document.getElementById('optionlist3');
	if(list.selectedIndex == 0)
	{
		list.selectedIndex = list.options.length-1;
	}
	else
	{
		list.selectedIndex--;
	}
	changeImage3();
}

function nextImage3()
{
	var list = document.getElementById('optionlist3');
	if(list.selectedIndex == list.options.length-1)
	{
		list.selectedIndex = 0;
	}
	else
	{
		list.selectedIndex++;
	}
	changeImage3();
}

function changeImage4()
{
	var list = document.getElementById('optionlist4');
	document.mainimage4.src = list.options[list.selectedIndex].value;
}

function prevImage4()
{
	var list = document.getElementById('optionlist4');
	if(list.selectedIndex == 0)
	{
		list.selectedIndex = list.options.length-1;
	}
	else
	{
		list.selectedIndex--;
	}
	changeImage4();
}

function nextImage4()
{
	var list = document.getElementById('optionlist4');
	if(list.selectedIndex == list.options.length-1)
	{
		list.selectedIndex = 0;
	}
	else
	{
		list.selectedIndex++;
	}
	changeImage4();
}
function changeImage5()
{
	var list = document.getElementById('optionlist5');
	document.mainimage5.src = list.options[list.selectedIndex].value;
}

function prevImage5()
{
	var list = document.getElementById('optionlist5');
	if(list.selectedIndex == 0)
	{
		list.selectedIndex = list.options.length-1;
	}
	else
	{
		list.selectedIndex--;
	}
	changeImage5();
}

function nextImage5()
{
	var list = document.getElementById('optionlist5');
	if(list.selectedIndex == list.options.length-1)
	{
		list.selectedIndex = 0;
	}
	else
	{
		list.selectedIndex++;
	}
	changeImage5();
}
function changeImage6()
{
	var list = document.getElementById('optionlist6');
	document.mainimage6.src = list.options[list.selectedIndex].value;
}

function prevImage6()
{
	var list = document.getElementById('optionlist6');
	if(list.selectedIndex == 0)
	{
		list.selectedIndex = list.options.length-1;
	}
	else
	{
		list.selectedIndex--;
	}
	changeImage6();
}

function nextImage6()
{
	var list = document.getElementById('optionlist6');
	if(list.selectedIndex == list.options.length-1)
	{
		list.selectedIndex = 0;
	}
	else
	{
		list.selectedIndex++;
	}
	changeImage6();
}
function changeImage7()
{
	var list = document.getElementById('optionlist7');
	document.mainimage7.src = list.options[list.selectedIndex].value;
}

function prevImage7()
{
	var list = document.getElementById('optionlist7');
	if(list.selectedIndex == 0)
	{
		list.selectedIndex = list.options.length-1;
	}
	else
	{
		list.selectedIndex--;
	}
	changeImage7();
}

function nextImage7()
{
	var list = document.getElementById('optionlist7');
	if(list.selectedIndex == list.options.length-1)
	{
		list.selectedIndex = 0;
	}
	else
	{
		list.selectedIndex++;
	}
	changeImage7();
}
function changeImage8()
{
	var list = document.getElementById('optionlist8');
	document.mainimage8.src = list.options[list.selectedIndex].value;
}

function prevImage8()
{
	var list = document.getElementById('optionlist8');
	if(list.selectedIndex == 0)
	{
		list.selectedIndex = list.options.length-1;
	}
	else
	{
		list.selectedIndex--;
	}
	changeImage8();
}

function nextImage8()
{
	var list = document.getElementById('optionlist8');
	if(list.selectedIndex == list.options.length-1)
	{
		list.selectedIndex = 0;
	}
	else
	{
		list.selectedIndex++;
	}
	changeImage8();
}



