Can I define a function in embeded javascript file of a asp.net server control to access Page Load event?
<p>I have designded a asp.net server control that have an embeded javascript file.</p>

<pre><code>document.getElementById("div_Messages_Back").style.left = 0;
document.getElementById("div_Messages_Back").style.top = 0;
document.getElementById("div_Messages_Back").style.width = document.documentElement.clientWidth;
document.getElementById("div_Messages_Back").style.height = document.documentElement.clientHeight;
document.getElementById("tbl_Messages").style.left = (document.documentElement.clientWidth - 250) / 2;
document.getElementById("tbl_Messages").style.top = (document.documentElement.clientHeight - 120) / 2;
function btn_Close() {
    document.getElementById("div_Messages_Back").style.visibility = "collapse";
    document.getElementById("tbl_Messages").style.visibility = "collapse";
}
</code></pre>

<p>I want the first 6 line of my javascript file run at runtime. But I recieve error at runtime:
Error: Object Required.</p>
