title: javascript takes too long to perform, Makes viewers wait too long
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function change(element) {
    document.getElementById('imageReplace').src = element;
  }
  
  function change_1() {
    document.getElementById('1').style.background = '#111';
    document.getElementById('1').style.color = '#FFF';
    document.getElementById('1').style.cursor = 'auto';
    document.getElementById('2').style.background = '#FFC300';
    document.getElementById('2').style.color = '#FFF';
    document.getElementById('2').style.cursor = 'pointer';
    document.getElementById('3').style.background = '#FFC300';
    document.getElementById('3').style.color = '#FFF';
    document.getElementById('3').style.cursor = 'pointer';
  }
  
  function change_2() {
    document.getElementById('2').style.background = '#111';
    document.getElementById('2').style.color = '#FFF';
    document.getElementById('2').style.cursor = 'auto';
    document.getElementById('1').style.background = '#FFC300';
    document.getElementById('1').style.color = '#FFF';
    document.getElementById('1').style.cursor = 'pointer';
    document.getElementById('3').style.background = '#FFC300';
    document.getElementById('3').style.color = '#FFF';
    document.getElementById('3').style.cursor = 'pointer';
  }
  
  function change_3() {
    document.getElementById('3').style.background = '#111';
    document.getElementById('3').style.color = '#FFF';
    document.getElementById('3').style.cursor = 'auto';
    document.getElementById('1').style.background = '#FFC300';
    document.getElementById('1').style.color = '#FFF';
    document.getElementById('1').style.cursor = 'pointer';
    document.getElementById('2').style.background = '#FFC300';
    document.getElementById('2').style.color = '#FFF';
    document.getElementById('2').style.cursor = 'pointer';
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.row_1 {
    float: left;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="row_1"&gt;
    &lt;button id="1" onclick="change('somepic.jpg'); change_1()"&gt;1&lt;/button&gt;
    &lt;button id="2" onclick="change('somepic2.jpg'); change_2()"&gt;2&lt;/button&gt;
    &lt;button id="3" onclick="change('somepic3.jpg'); change_3()"&gt;3&lt;/button&gt;
   &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I'm kinda new here...
  Just started my website and tried some javascript coding.</p>
  
  <p>The funny thing is it works very well in Adobe Dreamweaver CS6 when opened in Firefox.</p>
  
  <p>However, when it's placed in my website manager (How my website gets put on the internet), it works super slowly...</p>
  
  <p>Please help. I suspect the code must be too long, but I've tried a lot of methods and it doesn't show the way I want it to...</p>
  
  <p>As you may have guessed, I'm trying to make a button that changes style when clicked and the other buttons will get back to default styling...</p>
  
  <p>Thanks in advance!</p>