Panels have associated markup files and if they contain <wicket:head> and <body onLoad="..."> then the body's onLoad attribute will be appended to the page's onLoad attribute.
<wicket:head>
<body onLoad="...">
onLoad