I just wanted to thank you for taking the time to get with me on this. The tech support you guys provide on this forum is outstanding.
Anyway, after doing some research based on what you gave me as a starting point I came up with the following code that works for me.
if( (document.forms.length > 0) && (document.forms.elements.length > 0) )
Then it's just a matter of putting the function in your base template and calling it from the onload portion of the body tag as you have already stated.
<body onload = "setFocus();">
Easy squeezy! Now every page that has an input form based on that template will set the focus to the first input box on the page. No more code more needed.
Thanks again for all your help. You guys rock!