var MinWidth = 960;
var MinHeight = 580;



function Get(Ob) {
                ob = document.getElementById(Ob);
                if (ob) {
                        return ob;
                } else {
                        return false;
                }
}

function Scale() {
        //  document.getElementById('HolderImage').style.height = 200 + 'px';
                window.setTimeout('Scale()',500);


                var Content = Get('Content');
                var MImage = Get('MImage');
                var Holder = Get("HolderBottom");
                var Holder2 = Get("HolderBottom2");


                NewWidth = document.body.clientWidth;
                NewHeight = Math.floor((document.body.clientHeight-90) / 3);
                NewHeightImage = Math.floor(NewHeight  * 2)


                
				Content.style.top = 90;
                Content.style.position = 'absolute';

                Content.style.height = NewHeight + 'px';

                // NEW
                Content.style.display = 'block';
                Get('HolderImage').style.display = 'block';
				document.getElementById('HolderBottom1').style.display = 'block';
                // END NEW

				// 9.3.2011 - loadtext
                // Start = parseInt(Content.style.top) + parseInt(Content.style.height) - 0;
                Start = parseInt(Content.style.top) + parseInt(Content.style.height) - 0;

                //NewHeight -= 100;
                Holder.style.width = NewWidth;
                Holder.style.height = NewHeightImage;
                Holder.style.position = 'absolute';
                Holder.style.top = Start - 10 + 'px';
                Holder.style.left = 0 + 'px';

                Holder2.style.width = NewWidth;
                Holder2.style.height = 100;
                Holder2.style.position = 'absolute';
                Holder2.style.top = Start + NewHeightImage - 10 + 'px';
                Holder2.style.left = 0 + 'px';

                ImageStart = Math.floor(Start / 100 * 100);
                ImageHeight = Math.floor((NewHeightImage / 100) * 100);







                var BaseWidth = HolderImage.width;
                var BaseHeight = HolderImage.height;



                HolderImage.removeAttribute('width');
                HolderImage.removeAttribute('height');

                HolderImage.width = NewWidth;

                //HolderImage.style.height = ImageHeight + 'px';

                if (HolderImage.height < ImageHeight) {

                        HolderImage.removeAttribute('width');
                        HolderImage.height = ImageHeight;
                }

                HolderImage.style.position = 'absolute';
                HolderImage.style.top = (parseInt(ImageStart) -10) + 'px';
                HolderImage.style.left = 0 + 'px';

        }


         function findPosTop(obj) {
        var curleft = curtop = 0;
        if (obj.offsetParent) {
                curleft = obj.offsetLeft
                curtop = obj.offsetTop
                while (obj = obj.offsetParent) {
                        curleft += obj.offsetLeft
                        curtop += obj.offsetTop
                }
        }
        return curtop;
}

