var selectedImage2 = -1;
var images2 = new Array();

function MM_findObj2(n, d) {
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function mouseover2(index) {
	/*
		Fired when the user mouses over one of the navigation images2.  Here we need
		to find the img object and then change the image to index + 1
	*/
	if (index != selectedImage2 && imageLoad2[index + 1] != "") {
		x = MM_findObj2("image2" + index);
		x.src =  images2[index + 1].src;
	}
}

function mouseout2(index) {
	/*
		Fired when the user's mouse leaves the space of an image.  If this image
		is not the selected image then we want to put the normal image back
		index.
	*/
	if (index != selectedImage2 && imageLoad2[index] != "") {
		x = MM_findObj2("image2" + index);
		x.src =  images2[index].src;
	}
}

function mousedown2(index) {
	/*
		Fired when the user clicks on an image.  Here we want to return the current
		selected image to normal and change this one to selected index + 2
	*/
	if (selectedImage2 != -1 && selectedImage2 != index && imageLoad2[selectedImage2] != "") {
		/* Return the current selected to normal */
		x = MM_findObj2("image2" + selectedImage2);
		x.src = images2[selectedImage2].src;
	}
	if (imageLoad2[index + 2] != "") {
		x = MM_findObj2("image2" + index);
		x.src = images2[index + 2].src;
	}
	selectedImage2 = index;
}

function loadimages2(a) {
	/*
		Pre-load the images2 we are going to use
	*/
	for (i=0; i<a.length; i++) {
		if (a[i] != "") {
			images2[i] = new Image;
			images2[i].src = a[i];
		}
	}
}
