Javascript Image shrinking for specific users
<p>I have a javascript function for shrinking images but I dont want the shrinking function to work if an administrator logs in.</p>

<p>Here is part of the code</p>

<pre><code> function shrinkImages(){
 var i=0, maxWidth;
 //if (/^(?:artistnews|albums|news|exitnews|reviews)$/.test(arg(0))) maxWidth=236;
 if(typeof homepage != 'undefined') maxWidth=530;
 else maxWidth=236;
 var first = getElementsByClassName('first');
 if(first.length&gt;1)
  first = first[0].getElementsByTagName('img');
 var imgs = document.getElementsByTagName('img');
 while(imgs[i]) {
  if(imgs[i].width &gt; maxWidth &amp;&amp; imgs[i].name!="shadow") {
   if (has(imgs[i], first) &amp;&amp; maxWidth==236) {
    imgs[i].height = Math.round(521 * imgs[i].height / imgs[i].width);
    imgs[i].width = 521;
    i++;
    continue;
   }
   imgs[i].height = Math.round(maxWidth * imgs[i].height / imgs[i].width);
   imgs[i].width = maxWidth;
  }
  i++;
 }
 imgs = null;
</code></pre>
