I keep on getting `ReferenceError: toggleExpand is not defined` in console on firefox when I click the img

I am trying to get the image to enlarging, floating in center screen on click, no jquery, pure javascript, html, css.

**HTML**

```
<body>
  <script type="text/javascript">
    function toggleExpand(id){
      var doc = document.getElementById(id);
      doc.style.z-index = "1";
      doc.style.width = "512px";
      doc.style.align = "center";
    }
  </script>
  <img id="img1" onclick="toggleExpand('img1');" src="I:\Images\image.jpg" alt="image" style="width:128px; height:auto; cursor:pointer; z-index:0"/>
</body>

```