﻿// JScript File


//  adjustwhoweare.js
//  detects the screen resolution and adjusts the whoweare windows base on this data

function adjustwhoweare()
{

    var widthperc;
    var heightperc;
    var widthpercborder;
    var heightpercborder;
    var img1width;
    var img1height;
    var img2width;
    var img2height;
    var whoarewe04;
    

    if (screen.width >= 1600 && screen.height >= 1000)
    {
        widthperc = 40  + '%';
        widthpercborder = 41 + '%';
        heightperc = 28 + '%';
        heightpercborder = 29 + '%';
        img2height = 192 + 'px';
        img2width  = 184 + 'px';
        img3height = 192 + 'px';
        img3width  = 184 + 'px';  
        whoarewe04 = 68 + '%';
    }

    else if (screen.width >= 1024 && screen.height >= 768)
    {
        widthperc = 40  + '%';
        heightperc = 46 + '%';
        widthpercborder = 41 + '%';
        heightpercborder = 47 + '%';
        img2height = 192 + 'px';
        img2width  = 184 + 'px';
        img3height = 192 + 'px';
        img3width  = 184 + 'px';
        whoarewe04 = 82 + '%';    
    }

    else if (screen.width >= 800 && screen.height >= 600 )
    {
        widthperc = 40  + '%';
        widthpercborder = 41 + '%';
        heightperc = 40 + '%';
        heightpercborder = 41 + '%';
        img2height = 125 + 'px';
        img2width  = 115 + 'px';
        img3height = 125 + 'px';
        img3width  = 115 + 'px';   
    }
   

    // alert ("screen width = " + widthperc + " ; height = " + heightperc);

    var obj = document.getElementById('whoarewe02');
    obj.style.width  = widthperc;
    obj.style.height = heightperc;
    
    obj = document.getElementById('whoarewe02border');
    obj.style.width  = widthpercborder;
    obj.style.height = heightpercborder;
    
    obj = document.getElementById('img02');
    obj.style.width  = img2width;
    obj.style.height = img2height;

    
    obj = document.getElementById('whoarewe03');
    obj.style.width  = widthperc;
    obj.style.height = heightperc;
         
    obj = document.getElementById('whoarewe03border');
    obj.style.width  = widthpercborder;
    obj.style.height = heightpercborder;
    
    obj = document.getElementById('img03');
    obj.style.width  = img3width;
    obj.style.height = img3height;
    
    obj = document.getElementById('whoarewe04');
    obj.style.top = whoarewe04;
   
}







 


