Method inside Object undefined?
<p>I'm still learning how to use Javascript properly and have got stuck trying to set an interval on a function which is inside an object.</p>

<p>Here is my code: </p>

<p><a href="http://pastebin.com/hJAtaqKi" rel="nofollow">http://pastebin.com/hJAtaqKi</a></p>

<p>On line 36 I am calling the function which is further down the page.. this works fine and references the function correctly.. but when I try to wrap that function in a setinterval setInterval('homePageFunctionality.animateCarousel($pause)', 4000); </p>

<p>It does not seem to work.. I get a homePageFunctionality is not defined..</p>

<p>Any idea why I cannot seem to reference the function when using setInterval?</p>

<p>Any other general feedback on my code is welcome.</p>

<p>Thanks</p>
