<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>blank</title>
<script type="text/javascript">
var handleCheckboxClick = function(checkbox) {
var option = document.getElementById('select1').options[checkbox.value - 1];
option.selected = !option.selected;
};
</script>
</head>
<body>
<form id="form1" action="blank.html" method="post">
<input value="1" type="checkbox" onclick="handleCheckboxClick(this);" />1<br />
<input value="2" type="checkbox" onclick="handleCheckboxClick(this);" />2<br />
<input value="3" type="checkbox" onclick="handleCheckboxClick(this);" />3<br />
<input value="4" type="checkbox" onclick="handleCheckboxClick(this);" />4<br />
<input value="5" type="checkbox" onclick="handleCheckboxClick(this);" />5<br />
<select id="select1" multiple="multiple" size="5">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</form>
</body>
</html>