I would just use javascript to handle this....
window.onload = function() {
//your code
}
You can place that javascript in an external file, or in the head editable region.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.