на вскидку:
<script type="text/javascript">
window.onload = function(){
(function(){
var i = arguments.length, select = document.form.elements[0];
while(i--){
document.getElementById(arguments[i]).style.display = 'none';
var option = document.createElement('option');
option.text = arguments[i];
option.value = i;
try {
select.add(option, null);
}
catch(e) {
select.add(option);
}
}
})('div1', 'div2', 'div3');
};
</script>
<div id="div1">text1</div>
<div id="div2">text2</div>
<div id="div3">text3</div>
<form action="" method="" name="form">
<select></select>
</form>