In this specific case, you can do this:
if (document.all[cFieldName].nodeName === "INPUT") {
// It's an input element
}
and
if (document.all[cFieldName].nodeName === "SELECT") {
// It's a select element
}
(That assumes HTML, rather than XHTML. In XHTML, the names will be lower case. To avoid messing myself up, I usually throw .toUpperCase() in there.)
As you've discovered, typeof will just give you "object". It's possible that on some engines, Object.prototype.toString.call(document.all[cFieldName]) might give you "HTMLInputElement", but I wouldn't expect it to be reliable cross-browser (and I assume one reason this code is being translated is to run it on browsers other than IE). There's more on various ways of figuring out what things are in JavaScript (though not specifically in regard to HTML elements) in my blog post Say what?.