<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><head></head>
<body>
<div style="width: 100px; height: 100px; background-color: red;" id="block"></div>
<input type="radio" name="color" onclick="divClick(0);" checked="checked"><br>
<input type="radio" name="color" onclick="divClick(1);"><br>
<input type="radio" name="color" onclick="divClick(2);"><br>
<script type="text/javascript">
var block = document.getElementById('block');
var colors = ['red', 'silver', 'yellow'];
var index = 0;
function divClick(ind)
{
block.style.background = colors[ind];
};
</script>
</body>
</html>