Digital clock

I’m making a digital clock to put on my site. I used the tutorial from here on kirupa but i’m still having some trouble. For the minutes and hours, if the value is less than 10 it should have a zero in front of it, but it’s not showing up for me. I used the code that he had posted:

onClipEvent (enterFrame) {
myTime = new Date();
nSeconds = myTime.getSeconds();
nMinutes = myTime.getMinutes();
nHours = myTime.getHours();
if (nHours>=12) {
ampm = “pm”;
} else {
ampm = “am”;
}
if (nHours>=13) {
nHours = nHours-12;
}
if (nHours==0) {
nHours = 12;
}
if (length(nMinutes) == 1) {
nHinutes = “0”+nMinutes;
}
if (length(nSeconds) == 1) {
nSeconds = “0”+nSeconds;
}
nTime = nHours+":"+nMinutes+":"+nSeconds+" "+ampm;
}

what’s wrong? Thanks!