
// simple click image src swapper
// this works on sequential numbering so please make sure images are named in numerical order ie 0..10. The start image needs to be set to teh first image in the sequence.

var total_images = 6;
// this should be the full URL to the images
var image_modifier = '/uk/hardware/mouseandkeyboard/mobility/images/mk_otherviews_wlm6kv2_0';
var image_type = '.jpg';
var the_image_id = 'mouse_flipper';
var start_image = 1;
var current_image = 1;

function next_image()
{
	current_image++;
	if(current_image > total_images)
	{
	 	current_image = start_image;
	}
	swap_em();
	return false;
}
function previous_image()
{
	current_image--;
	if(current_image < start_image)
	{
	 	current_image = total_images;
	}
	swap_em();
	return false;
}
function swap_em(){document.getElementById(the_image_id).src = image_modifier + current_image + image_type;}
function init_mouse_images()
{
	current_image = start_image;
	swap_em();
}



// the functions code
function displayFeature(featurePosition)
{
	var controlString = "control" + featurePosition;
	var featureString = "feature" + featurePosition;
	var arrowString = "arrow" + featurePosition;

	var control = document.getElementById(controlString);
	var feature = document.getElementById(featureString);
	var arrow = document.getElementById(arrowString);

	if(feature.style.display == "none")
	{
		control.innerHTML="close";
		feature.style.display = "block";
		arrow.src="/uk/hardware/mouseandkeyboard/mobility/images/uparrow.gif";
	}
	else
	{
		control.innerHTML = "more";
		arrow.src= "/uk/hardware/mouseandkeyboard/mobility/images/downarrow.gif";
		feature.style.display = "none";
	}
}

