scrollTop issue on constant moving div
<p>I have a FLASH object that I mouse over which in turn calls the following function to scroll a div.  It works but due to the constant high speed scrolling it would throw up NULLS.  This in turn caused IE to open a new page through my FLASH ActionScript 2.0</p>

<p>I found that by creating the SC variable and throwing in the condition "if it exists" keeps FLASH from causing IE to open a new page.</p>

<p>However, it still creates an error behind the scenes of "Object Required".  Although my application works I do not want load up memory with errors.</p>

<p>Any thoughts? </p>

<pre><code>var SC;

function pP(PT){
 SC=document.getElementById('P'+PT).offsetTop;
 if(SC){document.getElementById('CBOX').scrollTop=SC;}
 }
</code></pre>
