<script type="text/javascript"> function preloadFunc() { alert("PreLoad"); } window.onpaint = preloadFunc(); </script>