pre prendere per id un elemento in un iframe la sintassi è:

document.NomeIframe.getElementById("idElemento")