
function foc() //set focus on first input field
{
  if (!document.getElementsByTagName) return false;
  document.getElementsByTagName('input')[0].focus();
}
window.onload = foc; //run the function only after the page loads

