I'm trying to convert my VB Script to a Javascript. This is very important to me because VB script is not supported anymore. Please can someone help me?

Code:
<script language=VBSCRIPT> <!--
      function geturl(nRep)
      dim url
      dim sFrom
      dim sTo
      sFrom = year(date()-7) & "-" & right("00" & month(date()-7),2) & "-" & right("00"
...