I am trying to format a date as say(May 12 2010) But My output is undefined 12 2010.

here is my code, Can you help me know where I am going wrong here:

Code:
<html>

<head>

<title>exercise 1</title>
<script type="text/javascript">
var dt = new Date();
var m_names =new Array{"January", "Feberuary", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
var month = dt.getMonth()+1;
var day = dt.getDate();
var year = dt.getFullYear();
//dateFormat(dt, "mmm, dS, yyyy");
document.write(m_names[month] +"/" +day +"/" +year);

</script>
</head>

<body>

</body>

</html>
Thanks