Şu şekilde olabilir;
<script>
window.onload = resizeimg;
function resizeimg()
{
   if (document.getElementsByTagName)
   {
      for (i=0; i<document.getElementsByTagName('img').length; i++)
      {
         im = document.getElementsByTagName('img')[i];
         if (im.className == "img_resize") {
         if (im.width > 500)
         {
            im.style.width = '500px';
            eval("pop" + String(i) + " = new Function(\"pop = window.open('" + im.src + " ','fullscale','width=400,height=400,scrollbars=1,resizable=1'); pop.focus();\")");
            eval("im.onclick = pop" + String(i) + ";");
            if (document.all) im.style.cursor = 'hand';
            if (!document.all) im.style.cursor = 'pointer';
            im.title = 'Resmin Büyük Hali için tıklayın ';
         }
         }
      }
   }
}
</script>
<script language="JavaScript" type="text/javascript">
<!-- ;
var pencere = ''
function PENCERE(url,en,boy) {
  if (pencere.location && !pencere.closed) {
      pencere.location.href = url;
      pencere.focus(); 
  } else {
      pencere=window.open(url,'htmlname','width='+en +',height='+boy +',resizable=0,top=0,left=100');
  }
}
function tidy() {
  if (pencere.location && !pencere.closed) {
     pencere.close(); 
  }
}
-->
</script>
Sadece iki satır ekledim. Denemedim ama çalışması için büyütmek istediğin resimlere şöyle bir ayar vermen gerekiyor:

<img src="xxx.jpg" class="img_resize" />