title: Calling function within prototype object
body: <p>How can I call PrintIt foo from Set()? I get error that it can't find it...<br>
  I know it's possible to call it via MyObject.prototype.PrintIt but this way i will "lose" the object and it's property (Num) </p>
  
  <pre><code>MyObject = function(){           
      this.Num=6;            
  }
  
  
  MyObject.prototype = {
      initialize: function(){     
          document.getElementById("button1").onclick = this.Set;
      },
      Set: function(){
          this.PrintIt();
      },                                
      PrintIt: function(){
          alert("I Print"); 
          //alert( this.Num);                       
      }                
  }
  
  window.onload = function(){              
      obj = new MyObject;
      obj.initialize();                                
  }
  </code></pre>