title: How to move/slide an image from left to right
body: <p>I want to slide or move a image from left to right something like in</p>
  <p><a href="http://rajeevkumarsingh.wix.com/pramtechnology" rel="nofollow noreferrer">http://rajeevkumarsingh.wix.com/pramtechnology</a></p>
  <p>The read pentagonal box that moves Ok!</p>
  <p>I tried a bit but failed to do so.
  I used the code as below:</p>
  <pre><code>&lt;script type=&quot;text/javascript&quot;&gt;
  
  &lt;!--
  var imgObj = null;
  var animate ;
  function init(){
     imgObj = document.getElementById('myImage');
     imgObj.style.position= 'absolute'; 
     imgObj.style.top = '240px';
     imgObj.style.left = '-300px';
     imgObj.style.visibility='hidden';
     moveRight();
  } 
  function moveRight(){
  if (parseInt(imgObj.style.left)&lt;=10)
  {
     imgObj.style.left = parseInt(imgObj.style.left) + 5 + 'px';
     imgObj.style.visibility='visible';
     animate = setTimeout(moveRight,20); // call moveRight in 20msec
     //stopanimate = setTimeout(moveRight,20);
    }
  else
    stop();
    f();
  }
  
  function stop(){
     clearTimeout(animate);
  }
  window.onload =init;
  //--&gt;
  &lt;/script&gt;
  &lt;img id=&quot;myImage&quot; src=&quot;xyz.gif&quot; style=&quot;margin-left:170px;&quot; /&gt;
  </code></pre>
  <p>There some kind of resolution problem with Firefox and IE as well. How to solve them. Also I am not able to move the things so clearly. Is this possible or not? I want it to be with JavaScript and not Flash.</p>