function getCompanionFormCount(obj) { var ownerDoc = obj.document return ownerDoc.forms.length }