<!--
// ウィンドウを指定されたサイズに変更する

$(window).load(function() {    

        var theWindow        = $(window),
            $bg              = $("#bg"),
            aspectRatio      = $bg.width() / $bg.height();

        function resizeBg() {

                if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
                    $bg
                        .removeClass()
                        .addClass('bgheight');
                } else {
                    $bg
                        .removeClass()
                        .addClass('bgwidth');
                }

        }

        theWindow.resize(function() {
                resizeBg();
        }).trigger("resize");

});

//-->

<!--
// ウィンドウを指定されたサイズに変更する

$(window).load(function() {    

        var theWindow        = $(window),
            $bg              = $("#bg2"),
            aspectRatio      = $bg.width() / $bg.height();

        function resizeBg() {

                if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
                    $bg
                        .removeClass()
                        .addClass('bgheight2');
                } else {
                    $bg
                        .removeClass()
                        .addClass('bgwidth2');
                }

        }

        theWindow.resize(function() {
                resizeBg();
        }).trigger("resize");

});

//-->

window.onresize=function(){
    resizeTextArea();
}


function resizeTextArea(){
    var ta=document.getElementById("myTextArea");
    var myw=0.9*(getBrowserWidth());
    var myh=0.7*(getBrowserHeight());

    var mycss="width:"+myw+"px;height:"+myh+"px;border:solid 1px #333;";
    ta.style.cssText=mycss;
}
function getBrowserWidth() {  
    if ( window.innerWidth ) {
        return window.innerWidth; 
    } 
    else if ( document.documentElement && document.documentElement.clientWidth != 0 ) {
        return document.documentElement.clientWidth; 
    }
    else if ( document.body ) {
        return document.body.clientWidth;
    }
    return 0;  
}  
function getBrowserHeight() {  
    if ( window.innerHeight ) {
        return window.innerHeight; 
    } 
    else if ( document.documentElement && document.documentElement.clientHeight != 0 ) {
        return document.documentElement.clientHeight; 
    }
    else if ( document.body ) {
        return document.body.clientHeight;
    }
    return 0;  
}

window.resizeTo(1089,  880);
<!--

$(window).load(function() {    

        var theWindow        = $(window),
            $bg              = $("#bg3"),
            aspectRatio      = $bg.width() / $bg.height();

        function resizeBg() {

                if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
                    $bg
                        .removeClass()
                        .addClass('bgheight3');
                } else {
                    $bg
                        .removeClass()
                        .addClass('bgwidth3');
                }

        }

        theWindow.resize(function() {
                resizeBg();
        }).trigger("resize");

});
//-->
<!--
$(window).load(function() {    

        var theWindow        = $(window),
            $bg              = $("#bg4"),
            aspectRatio      = $bg.width() / $bg.height();

        function resizeBg() {

                if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
                    $bg
                        .removeClass()
                        .addClass('bgheight4');
                } else {
                    $bg
                        .removeClass()
                        .addClass('bgwidth4');
                }

        }

        theWindow.resize(function() {
                resizeBg();
        }).trigger("resize");

});
//-->
<!--
$(window).load(function() {    

        var theWindow        = $(window),
            $bg              = $("#bg5"),
            aspectRatio      = $bg.width() / $bg.height();

        function resizeBg() {

                if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
                    $bg
                        .removeClass()
                        .addClass('bgheight5');
                } else {
                    $bg
                        .removeClass()
                        .addClass('bgwidth5');
                }

        }

        theWindow.resize(function() {
                resizeBg();
        }).trigger("resize");

});
//-->
<!--
$(window).load(function() {    

        var theWindow        = $(window),
            $bg              = $("#bg6"),
            aspectRatio      = $bg.width() / $bg.height();

        function resizeBg() {

                if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
                    $bg
                        .removeClass()
                        .addClass('bgheight6');
                } else {
                    $bg
                        .removeClass()
                        .addClass('bgwidth6');
                }

        }

        theWindow.resize(function() {
                resizeBg();
        }).trigger("resize");

});
//-->
<!--
$(window).load(function() {    

        var theWindow        = $(window),
            $bg              = $("#bg7"),
            aspectRatio      = $bg.width() / $bg.height();

        function resizeBg() {

                if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
                    $bg
                        .removeClass()
                        .addClass('bgheight7');
                } else {
                    $bg
                        .removeClass()
                        .addClass('bgwidth7');
                }

        }

        theWindow.resize(function() {
                resizeBg();
        }).trigger("resize");

});
//-->
<!--
$(window).load(function() {    

        var theWindow        = $(window),
            $bg              = $("#bg8"),
            aspectRatio      = $bg.width() / $bg.height();

        function resizeBg() {

                if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
                    $bg
                        .removeClass()
                        .addClass('bgheight8');
                } else {
                    $bg
                        .removeClass()
                        .addClass('bgwidth8');
                }

        }

        theWindow.resize(function() {
                resizeBg();
        }).trigger("resize");

});
//-->
$(window).load(function() {    

        var theWindow        = $(window),
            $bg              = $("#bg9"),
            aspectRatio      = $bg.width() / $bg.height();

        function resizeBg() {

                if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
                    $bg
                        .removeClass()
                        .addClass('bgheight9');
                } else {
                    $bg
                        .removeClass()
                        .addClass('bgwidth9');
                }

        }

        theWindow.resize(function() {
                resizeBg();
        }).trigger("resize");

});
