register wondow.onload callback