Change case using JavaScript

<html>
<head>
<script>
function setCase (caseType)
{
var firstNameString;
var lastNameString;
firstNameString = document.myForm.firstName.value;
lastNameString = document.myForm.lastName.value;
if (caseType == "upper ")
{
document.myForm.firstName.value = firstNameString.toUpperCase();
document.myForm.lastName.value = lastNameString.toUpperCase();
}
else
{
document.myForm.firstName.value = firstNameString.toLowerCase();
document.myForm.lastName.value = lastNameString.toLowerCase();
}
}
</script>
</head>
<body>
<form name= "myForm ">
<b>First name:</b>
<input type= "text " name= "firstName " size= "20 " value=” "Prajwal "> <br><br>
<b>Last name:</b>
<input type= "text " name=” "lastName " size=”20″ value= "Rai "> <br><br>
Change text to
<input type= "button " value= "UPPERCASE " onClick= "setCase('upper') ">
or
<input type= "button "value= "lowercase " onClick= "setCase('lower') ">
</form>
</body>
</html>