I'm trying to convert the frames and framesets from a web page in divs.
I make this function, but the new divs don't have the same position than the
frames and frameset. Is there any propierty that contains the position of a
frame in the window?
Thank you.
This is my code:

function changeframetodiv(){

fra = content.document.getElementsByTagName("frame")
divnew= content.document.createElement("div")
for(i=0;i {

divn = content.document.createElement("div")
divn.innerHTML=fra[i].contentDocument.getElementsByTagName("body")[0].innerHTML;
divn.style.height = fra[i].innerHeight
divn.style.width = fra[i].innerWidth
divn.style.overflow="auto"
divnew.appendChild(divn)
}



fr = content.document.getElementsByTagName("frameset")

for(i=0;i {
father = fr[i].parentNode
father.removeChild(fr[i])
}

bodynew= content.document.createElement("body")
bodynew.appendChild(divnew)

content.document.getElementsByTagName("html")[0].appendChild(bodynew)