Why dont you try to load it onLoad() page event,so that it will focus as soon as your page is loaded. The problem now might be that you are trying to call focus method on your element even before it is created hence it not being focused.
function myFocus(){
document.getElementById('custpage_scanitem').focus();
}
Write the below code in html
<body onload="myFocus"></body>