function updateOption(from, to, altCount)
{
	if (document.getElementById(from).value != -1)
	{
		count = 0;
		altBaseName = from.substr(0, from.length - 1);
		for (i = 0; i < altCount; i++)
		{
			if (document.getElementById(altBaseName + i).value == document.getElementById(from).value)
				count++;
		}

		if (count > 1)
		{
			alert("You cannot select the same option more than once!");
			document.getElementById(from).value = -1;
			return false;
		} else {
			if (to)
				parent.document.getElementById(to).value = document.getElementById(from).value;
			return true;
		}
	}
	return true;
}