metti la funzione sull'onload....
cmq il forum adatto è html o al limite scripting