You have a couple options here (...I've used both successfully in the past):
1) Call _spBodyOnLoadFunctionNames.push("function()");
replacing function with the name of the function in your webpart. This will cause your function to be executed after the body of the page if fully loaded and in sequence with other startup client-side scripts.
2) You can go the Scripts on Demand route that's new in 2010. There's a method called ExecuteOrDelayUntilScriptLoaded that causes functions to be queued up until their dependent scripts are loaded...this is usefull if you're using the client object model and you want to make sure SP.js is loaded before you do anything else, but it can be used to check for the presence of any script file. You would just add the method to your web part's script block and have it execute you start-up function after the dependent script is loaded.
ExecuteOrDelayUntilScriptLoaded(myfunction, "sp.js");
function myfunction() {
// do something
}
Here's a good write-up from Christian Glessner on SOD if you want to learn more on the topic: http://www.ilovesharepoint.com/2010/08/sharepoint-scripts-on-demand-spsod.html