My knowledge of javascript is pathetic

I want to change the image in a layer when the user clicks on a thumbnail image (in another layer). Here is my function:
Code:
function swapImage(imgSRC) {
   if(document.layers) {
      document.layers['lyrLargeImg'].document.images['imgLarge'].src= imgSRC;
   }
   if (document.images) {
      imgLarge.src = imgSRC;
   }
}
And here is where it gets called (you will see that I'm calling some other macromedia dreamweaver functions too)
Code:
<!-- Large Image Layer -->
<div id="lyrLargeImg" style="position:absolute; left:361px;
   top:54px;width:375px; height:300; z-index:3">
   <img src="images/1pixel.gif" width="375" height="300" name="imgLarge"></div>
<!-- Thumbnail Layers -->
<div id="lyrThumb00" style="position:absolute; layer-background-color: #FFFFFF; background-color: #FFFFFF; left:141px; top:65px; width:85; height:68; z-index:5"> 
  <a href="#" 
     onMouseDown="MM_setTextOfLayer('lyrDesc','','fahf')" 
	 onMouseOver="MM_setTextOfLayer('lyrDesc','','blah')" 
	 onMouseOut="MM_setTextOfLayer('lyrDesc','','')" 
	 onClick="swapImage('<?php echo "images/" . $items[0]->large_image_name ?>')"> 
  <img src="<?php echo "images/" . $items[0]->small_image_name ?>" border="0" >
  </a> 
</div>
It works ticky-boo in IE but the image swap doesn't work in NS.
Code:
JavaScript Error: 
line 47:
imgLarge is not defined.