Prova così:
codice:
<head>
<script>
wiondow.onload=function(){qui_scrivi_funzione_che_vuoi_lanciare}
</script>
</head>