﻿// JScript File
var myWidth = 0, myHeight = 0,maxHeight=380,scroll=0;
var IsSetMaxHeight = true;
var MovieLeft;
var MovieTop;
function Resize() 
{
    if( typeof( window.innerWidth ) == 'number' ) 
    {
        //Non-IE
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
    } 
    else if( document.documentElement &&( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
    {
        //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;
    }
    else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
    {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
    }
    var Heightspace;
    var Heightspace1;
    if(myHeight>600)
    {
        Heightspace = myHeight - 600;
        //alert('Heightspace1 = '+Heightspace);   
        Heightspace = Heightspace / 2;
        Heightspace1 = Heightspace / 2;
        MovieTop = Heightspace;
        //alert('Heightspace2 = '+Heightspace);   
        document.body.style.marginTop=Heightspace+'px';
        var HeightLogo = 145+Heightspace1;
        if (document.getElementById('divLogo'))
        {
          document.getElementById('divLogo').style.marginTop=145+'px';
          //  document.getElementById('divLogo').style.marginTop=HeightLogo+'px';
            //alert('HeightLogo = '+HeightLogo);   
        }
        if (document.getElementById('divLogoShop'))
        {
            document.getElementById('divLogoShop').style.marginTop=145+'px';
            //document.getElementById('divLogoShop').style.marginTop=HeightLogo+'px';
            //alert('HeightLogo = '+HeightLogo);   
        }
             
    }
    else
    {
    if (document.getElementById('divLogo'))
        {
            document.getElementById('divLogo').style.marginTop=145+'px';
            
        }
        if (document.getElementById('divLogoShop'))
        {
            document.getElementById('divLogoShop').style.marginTop=145+'px';
              
        }
    }
    
    var WidthMovie = 400;
     MovieLeft = myWidth - 400;
     //alert('MovieLeft = '+MovieLeft);  
    MovieLeft = MovieLeft /2;
    //document.getElementById(divMovie).style.Left
    //alert('myWidth = '+myWidth);  
    //alert('MovieLeft = '+MovieLeft);   
    if (document.getElementById('divMovie'))
    {
    //alert('document.getElementById(divMovie).style.Left = '+document.getElementById('divMovie').style.Left); 
    document.getElementById('divMovie').style.Top=Heightspace+"px";
    }
    
   // alert('myWidth = '+myWidth+' myHeight = '+myHeight);   

}
    
window.onload = Resize;
window.onresize = Resize;



