title: Raphaeljs javascript error
body: <p>I want to draw a rectangle using raphael.js inside a function. What is wrong with my code?</p>
  
  <p>JsFiddle <a href="http://jsfiddle.net/yka3y/" rel="nofollow">Code</a></p>
  
  <pre><code>window.onload = function(){
      var paper = Raphael(0,0,100,200);
  
      var x = 0;
      var y = 0;
      var a = 10;
      var b = 20;
  
      function drawRect(x,y,a,b){            
          paper.rect(x,y,a,b);
      }        
  }​
  </code></pre>