antes del <script prueba a poner esto:
Código HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; chaset=iso-8859-1">
<title>Fechas</title>
// Aqui el script
<body>
</body>
</html>
de todas formas tu codigo no deberia de dar ningun problema si el idioma del navegador es el español.