//母頁面動態更新 iframe(子頁面)的高度
//子頁面<body onload="if (parent.adjustIFrameSize) { parent.adjustIFrameSize(window); }"> 
function adjustIFrameSize(iframeWindow)
{
    if (iframeWindow.document.height)
    {
        var iframeElement = parent.document.getElementById(iframeWindow.name);
        iframeElement.style.height = iframeWindow.document.height + 'px';
        iframeElement.style.width = iframeWindow.document.width + 258 + 'px';
    }
    else if (document.all)
    {
        var iframeElement = parent.document.all[iframeWindow.name];

        if (iframeWindow.document.compatMode && iframeWindow.document.compatMode != 'BackCompat')
        {
            iframeElement.style.height = iframeWindow.document.documentElement.scrollHeight + 5 + 'px';
            iframeElement.style.width = iframeWindow.document.documentElement.scrollWidth + 5 + 'px';
        }
        else
        {
            iframeElement.style.height = iframeWindow.document.body.scrollHeight + 5 + 'px';
            iframeElement.style.width = iframeWindow.document.body.scrollWidth + 5 + 'px';
        }
    }
}
