I am trying to create a menu system that utilizes custom combo boxes specifically for IE6. I have them nearly complete, however I have run into a snag. I am using a "for" loop to read the 'a' tags in my unordered list and when the down arrow key is pressed it moves to the next item and changes the innerHTML on the select box. The problem is when you hit the down arrow it increments only once and not again. Is there something that I am missing in my code to make it increment to the bottom and back to the top? Here is a link to the menu live and my code below that --

http://terrellharris.net/workStuff/edss2.htm


Code:
function pmKeyPress() {
	// look for a key press event
		var event = window.event;
		var key = event.keyCode;
	// watch for keyCode on event
		var alt = (event.altKey == true);
	// area where events will occur
		var combo = document.getElementById('pmSelectedValue');
		var menu = document.getElementById('pmDrop');
		var values = menu.getElementsByTagName('A');
				
		if (key == 40) {
			if (alt) {
				openMenu('pmInnerNav');
				resizeElement1();
			} else {
				for (i = 0; i < values.length; i++) {
					if (values[i].className == "selected") {
					// found the selected item
					// down arrow moves to the next item
					
					// check to see if we can move down an item
						if (i < (values.length - 1)) {
							// clear select from the previously selected item
							values[i].className = "";
							// mark the next item down as selected
							values[i+1].className = "selected";
							// save the text of the newly selected item into the combo box
							combo.innerText = values[i+1].innerText;					
						}
					}
					break;
				}
			}
		
		} else if (key == 38) {
			if (alt) {
				closeMenu('pmInnerNav');
			} else {
		
				for (i = 0; i < values.length; i++) {
					if (values[i].className == "selected") {
						// found the selected item
						// down arrow moves to the next item
						
						// check to see if we can move down an item
						if (i != 0) {
						
							// clear select from the previously selected item
							values[i].className = "";
							// mark the next item down as selected
							values[i-1].className = "selected";
							// save the text of the newly selected item into the combo box
							combo.innerText = values[i-1].innerText;					
						}
					}
					break;
			
				}
		
			}

		} else if (key == 27) {
			
			closeMenu('pmInnerNav');
			
		} else {
			
			combo.innerText = combo.innerText;
		
		} 
		
	}