  	// arguments: iframe id, height  (e.g., .5 for height="50%")
function setIframeHeight(id, h) {
    if ( document.getElementById ) {
        var theIframe = document.getElementById(id);
        if (theIframe) {
            //dw_Viewport.getWinHeight();
            wh = $(theIframe).getDimensions();
            // -> { width: Number, height: Number }
            theIframe.style.height = Math.round( h * wh.height ) + "px";
            theIframe.style.marginTop = Math.round( (wh.height - parseInt(theIframe.style.height) )/2 ) + "px";
        }
    }
}

// for sizing and positioning the iframe in the window
// pass iframe id and height (e.g., .5 for height="50%")
// .5 for height="50%"
window.onload = function() { setIframeHeight('ifrm', .8); }
window.onresize = function() { setIframeHeight('ifrm', .8); }