Use either the contentDocument property or the (deprecated) getSVGDocument function of the embedding element to access the SVG document, for example:
var object = documents.getElementsByTagName('object');
svgDocument = object.contentDocument;
See here for a more elaborate example. Note: For security reasons, the contents of the SVG document can be accessed from the parent document only if both documents are located in the same domain.