// Here is a working example of the script. First define some variables.
// The variable "base" is not "images" but "pix/mo_".


// Some variables

var base= "/mall/Tate/images/pix/mo_"


var nrm = new Array();
var omo = new Array();
var ocl = new Array();
var stuff = new Array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
var select = -1;
var name2 = "";
var temp = 0;

// Pre-load part.

if (document.images)
{
	for (i=0;i<stuff.length;i++)
	{
		nrm[i] = new Image;
		nrm[i].src = base + stuff[i] + ".gif"
		omo[i] = new Image;
		omo[i].src = base + stuff[i] + "_clic.gif";
		ocl[i] = new Image;
		ocl[i].src = base + stuff[i] + "_clic.gif";
	}
}

// The functions: first mouseover, then mouseout

function over(no)
{
	if (document.images && select != no)
	{
		document.images[stuff[no]].src = omo[no].src
	}
}

function out(no)
{
	if (document.images && select != no)
	{
		document.images[stuff[no]].src = nrm[no].src
	}
}


function assign_variable(colour_name){ 
selected_colour=colour_name;
//alert(selected_colour);
}


function clic(no)
{
	if (document.images)
	{
		document.images[stuff[no]].src = ocl[no].src
		temp = select;
		select = no;
		if (temp != -1) {out(temp)}
	}
}

// JavaScript Document