Trying to make a simple javascript. I want to build a online test program. This is what I have but it apears to not work:

Code:
<!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>
    <script type="text/javascript" src="myfunction.js"></script>
</head>
<body>
<div id="choices" >
	<input type="radio" name="group1" onclick="myfunction();" value="Blue" />Blue <br/>
	<input type="radio" name="group1" onclick="myfunction();" value="Red" />Red <br/>
	<input type="radio" name="group1" onclick="myfunction();" value="Green" />Green <br/>
	<input type="radio" name="group1" onclick="myfunction();" value="Yellow" />Yellow <br/>
</div><br/>
</body>
</html>
Code:
<script type="text/javascript" >
 function myfunction()
    {
        var mycolor = document.getElementsByName("Group1");

        switch (mycolor) 
        {
            case "Blue":
				alert("Blue");
				break;
				
			case "Red":
				alert("Red");
				break;
				
			case "Green":
				alert("Green");
				break;
				
			case "Yellow":
				alert("Yellow");
				break;
        }
    }
</script>

This is just a test for the molment. I just need to capture the value the user clicks and use a switch to capture that value to see if they got it right or wrong.