yes, that's what i think the code is supposed to do.
it chooses the right select field by its id
var select= document.getElementById('s1');
it checks the number of items
var items = select.getElementsByTagName('option');
picks a random number of option
var index= Math.floor(Math.random() * items.length);
and makes the option by this number selected
select.selectedIndex = index;
in separation from the rest of the code, it works as expected.
but in combination, there is always either ford or chevrolet, i.e. the first options selected. considering that the alerted random numbers vary, this part of the code gives no effect.