title: adding 'Next' 'Random' 'previous' buttons to this random image script
body: <p>I have a random image script, which displays random images on each page load. I want to add Next, Previous and Random buttons to this script, but don't know how to implement them.</p>
  
  <p>Here's the Script</p>
  
  <pre><code>&lt;script type="text/javascript"&gt; 
  
  var Statements = new Array(
  
  
  '&lt;img src="http://4.bp.blogspot.com/_UdzqQpb36Jo/R9kVS0h1BFI/AAAAAAAAD_o/SRGugAQSF0A/s1600/timming_pictures_37.jpg" height="650" width="625"&gt;',
  '&lt;img src="http://4.bp.blogspot.com/_UdzqQpb36Jo/SCxOksTrn4I/AAAAAAAAFDg/q3RilNGj9kc/s1600/loving_husbands_03.jpg" height="650" width="625"&gt;',
  '&lt;img src="http://3.bp.blogspot.com/_lCRnsgTQgRo/Se2KNaw6bpI/AAAAAAAAA5c/yV2PCN0Pmyo/s1600/pic22806.jpg" height="650" width="625"&gt;',
  '&lt;img src="http://1.bp.blogspot.com/_lCRnsgTQgRo/Se2J4mZjNEI/AAAAAAAAA4s/Q6Z8IlWLS-A/s1600/pic14006.jpg" height="650" width="625"&gt;'
  
  );
  
  function GetStatement(outputtype)
  {
   if(++Number &gt; Statements.length - 1) Number = 0;
   if (outputtype==0)
   document.write(Statements[Number])
   else if (document.getElementById)
   document.getElementById("ponder").innerHTML=Statements[Number];
  }
  
  function GetRandomNumber(lbound, ubound) 
  {
   return (Math.floor(Math.random() * (ubound - lbound)) + lbound);
  }
  
  var Number = GetRandomNumber(0, Statements.length - 1);
  &lt;/script&gt; 
  
  &lt;script type="text/javascript"&gt; 
  
  GetStatement(0)
  
  &lt;/script&gt; 
  </code></pre>
  
  <p>PS. I am using this script in blogger blog as blogpost.</p>