Como te dije, es mejor que le asignes un id. Por ejemplo, supongamos que tienes este botón:
Código HTML:
<input type="button" value="Botón" id="boton" />
Lo único que tendrás que hacer es:
Código PHP:
printf("<body bgcolor='#7BCA95' onload=\"document.getElementById('boton').focus()\">");