function getParentElementForm(element) { if(element != undefined) {      if(element.parentNode != undefined) { if(element.parentNode.tagName == "FORM") { return element.parentNode; } else { return getParentElementForm(element.parentNode); } } else { return this.document.forms[0]; } } else { return this.document.forms[0]; } }