title: Prototype Framework Breaking Other Scripts
body: <p>I have a simple page that has a (non-Prototype) JavaScript pop-up for login.  It has been working fine.  But when I add the Prototype framework to the page the pop-up quits working.</p>
  
  <pre><code>&lt;script type="text/javascript" src="recipes/js/prototype.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  var imgnum = 1;
  
  function nextimg() {
    /* &lt;![CDATA[ */
    imgnum++;
    if (imgnum &gt; 5) imgnum = 1;
    var nextimg = 'recipes/img/iphone_' + imgnum + '.png';
    var nextimg2 = 'recipes/img/iphone_' + (imgnum + 1) + '.png';
    imagepreload = new Image();
    imagepreload.src = nextimg2;
    $('iphoneimg').src=nextimg;
    /* ]]&gt; */
  } 
  &lt;/script&gt;
  </code></pre>
  
  <p>I have tried to move the JS include to the bottom, with no luck.  Any ideas?</p>
  
  <p>Also, it works fine in IE but not Firefox or Safari.</p>