Resistor Color Code

How many color bands does the resistor have?

This is a small but maybe-even-useful application developed by Eiki Martinson. Use of jQuery would greatly simplify the tedious DOM manipulations and so forth, but that's not the point of this exercise. Hope you like it.