// JavaScript Document

function rollover(thisImage, color, type)

{
	
	new_src = thisImage.src;
	
	if (type == 1 || type == 3)

	{

		color_start = new_src.search(/color=/);
		color_split = new_src.slice(color_start);
		color_end = color_split.search(/&/);
		if (color_end > 0) new_src = new_src.substr(0,color_start) + "color=" + color + new_src.slice(color_start + color_end);
		else new_src = new_src.substr(0,color_start) + "color=" + color;

	}

	if (type == 2 || type == 3)
	
	{

		
		underline_start = new_src.search(/underline=/);
		if (underline_start == -1) new_src = new_src + "&underline=1";
		else
		
		{
		
			underline_split = new_src.slice(underline_start);
			if (underline_split.slice(10,11) == 1) underline = '0';
			else underline = '1';
			underline_end = underline_split.search(/&/);
			if (underline_end > 0) new_src = new_src.substr(0,underline_start) + "underline=" + underline + new_src.slice(underline_start + underline_end);
			else new_src = new_src.substr(0,underline_start) + "underline=" + underline;

		}

	}

	thisImage.src = new_src;
	return true;

}