var url = document.location.href.split ("?", 1);
function change_langCode (select) {
	var selection = select.options[select.options.selectedIndex].value;
	location.href = url + "?langCode=" + selection;
}
function change_classID (select) {
	var selection = select.options[select.options.selectedIndex].value;
	location.href = url + "?classID=" + selection;
}
function change_listClassID (select) {
	var selection = select.options[select.options.selectedIndex].value;
	location.href = url + "?listClassID=" + selection;
}
function change_levelID (select) {
	var selection = select.options[select.options.selectedIndex].value;
	location.href = url + "?levelID=" + selection;
}
function change_seriesID (select) {
	var selection = select.options[select.options.selectedIndex].value;
	location.href = url + "?seriesID=" + selection;
}
function change_userSeriesID (select) {
	var selection = select.options[select.options.selectedIndex].value;
	location.href = url + "?userSeriesID=" + selection;
}
function change_quizSelect (select) {
	var selection = select.options[select.options.selectedIndex].value;
	location.href = url + "?quizSelect=" + selection;
}
function change_history (select) {
	var selection = select.options[select.options.selectedIndex].value;
	location.href = url + "?history=" + selection;
}
function change_specLangCode (select) {
	var selection = select.options[select.options.selectedIndex].value;
	location.href = url + "?specLangCode=" + selection;
}
function change_groupSelect (select) {
	var selection = select.options[select.options.selectedIndex].value;
	location.href = url + "?groupSelect=" + selection;
}
function change_seriesSelect (select) {
	var selection = select.options[select.options.selectedIndex].value;
	location.href = url + "?seriesSelect=" + selection;
}
// function to show smallImages
function showOriginal(image, zoom) {
	if (navigator.appName.indexOf('Explorer') >= 0) {
		posLeft = image.offsetParent.offsetLeft;
		posTop = image.offsetParent.offsetTop;
		winHeight = document.body.clientHeight * 1.25;
		winWidth = document.body.clientWidth;		
	} 
	else {
		posLeft = image.offsetLeft;
		posTop = image.offsetTop;
		winHeight = window.innerHeight;
		winWidth = window.innerWidth;
	}
	addLeft = image.width;
	addTop = parseInt (100 * zoom * posTop / winHeight);
	if (posLeft + image.width * (zoom + 1) > winWidth) addLeft = -image.width * zoom;
	
	document.getElementById("zoomBox").style.visibility = "visible";
	document.getElementById("zoomBox").style.backgroundImage = "url(" + image.src + ")";
	document.getElementById("zoomBox").style.left = posLeft + addLeft + "px";
	document.getElementById("zoomBox").style.top = posTop - addTop + "px";
	document.getElementById("zoomBox").style.width = image.width * zoom + "px";
	document.getElementById("zoomBox").style.height = image.height * zoom + "px";
}
function hideOriginal() {
	document.getElementById("zoomBox").style.visibility = "hidden";
}
// function to show image in a box
function showImage(url) {
	document.getElementById("imageBox").style.visibility = "visible";
	document.getElementById("imageBox").style.backgroundImage = "url(" + url + ")";
}
function hideImage() {
	document.getElementById("imageBox").style.visibility = "hidden";
}
