function setSelectToValue(thisSelect, thisValue) {
    var found = 0;
    for (i = 0; thisSelect[i]; i++) {
        if (thisSelect[i].value == thisValue) {
            thisSelect[i].selected = true;
            found = 1;
        }
    }
    if (found == 0) {
        alert("Error: Could not locate " + 
                thisValue + " in " + thisSelect + ".");
    }
}
