function loadIframe(id,url) {
try {
var iframeObj = document.getElementById(id+"_iframe");
iframeObj.src = url ;
} catch (err) {
alert("cannot load "+url+" into "+id) ;
}
}
function contentLoaded(parentID) {
//
// slight optimization - if a <div> with id equal to the parent's <div> id exists in the loaded HTML,
// transfer only the HTML markup within the <div>, not the whole body.
//
var contentElement = document.getElementById(parentID) ;
var myContent = contentElement ? contentElement.innerHTML : document.body.innerHTML ;
alert ("content for "+parentID+" loaded into IFRAME");
parent.copyContent(parentID,myContent);
}
function copyContent(id,content) {
try {
var placeholder = document.getElementById(id) ;
placeholder.innerHTML = content;
alert ("content for "+id+" integrated into the main page");
} catch (err) {
alert("Cannot copy HTML content into "+id);
}
}
//
// Fix non-DOM-compliant browsers: add getElementsByTagName and getElementById to document object
//
if (! document.getElementsByTagName) {
document.getElementsByTagName = function(tid) { if (this.all) { return this.all.tags(tid); } }
}
if (! document.getElementById) {
document.getElementById = function(id) {
if (this.all) { return this.all[id] ; }
else if (this.layers) { return this.layers[id] ; }
}
}