
window.onload = windowDidLoad;
window.onresize = resize;

function windowDidLoad() {
    resize();
    externalLinks();
}


function externalLinks() {
if (!document.getElementsByTagName) return; 
var anchors = document.getElementsByTagName("a"); 
for (var i=0; i<anchors.length; i++) { 
var anchor = anchors[i]; 
if (anchor.getAttribute("href") && 
anchor.getAttribute("rel") == "external") 
anchor.target = "_blank";
} 
} 


function resize() {
    var frame = document.getElementById("container");
    var htmlheight = document.body.scrollHeight;
    var windowheight = window.innerHeight;
    windowheight = document.documentElement.clientHeight;
    if (!windowheight || !htmlheight) return;
    if ( htmlheight < windowheight ) {
        document.body.style.height = windowheight + "px";
        frame.style.height = windowheight + "px";
    }
    else { 
        document.body.style.height = htmlheight + "px";
        frame.style.height = htmlheight + "px";
    }
}

function resized() {}

