>Page.RegisterClientScriptBlock will insert the referenced text/script after the HTML header - this is good for javascript function declarations.
>
>Page.RegisterStartupSript will insert the script in the form's onLoad attribute (event) that fires after the form's closing tag is received.
>
>Use these two together so that the bulk of the script is inside of a function and call the function with RegisterStartupScript.
Thanks