Working with select

Having html code below:

[html]

[/html]

Set current value

[javascript]
document.getElementById(“sel”).value = 3
[/javascript]

or

[javascript]
function setSelectedIndex(s, v)
{
for ( var i = 0; i < s.options.length; i++ )
{
if ( s.options[i].value == v ) {
s.options[i].selected = true;
return;
}
}
}
[/javascript]