﻿function adjustwidth() {
    var corner=100
    var bodyv = document.getElementById('body')
    var pagev = document.getElementById('page')
    if (self.innerWidth) {
        if (self.innerWidth < 1150) {
            iwidth=self.innerWidth-150
        }
        else {
            iwidth = 1000
            
        }
    }
    else {
            if (document.documentElement.clientWidth < 1150) {
            iwidth = document.documentElement.clientWidth - 150
        }
        else {
           iwidth=1000
        }

   }
   
   var topLeft = document.getElementById('pageTopLeft')
   var topRight = document.getElementById('pageTopRight')
   var bottomLeft = document.getElementById('pageBottomLeft')
   var bottomRight = document.getElementById('pageBottomRight')
   if (iwidth < 635) {
       iwidth = 635
   }
   if (iwidth < 800) {
   var corner=Math.floor((iwidth-600)/2)
   }
   
topLeft.style.width = corner + 'px'
topRight.style.width = corner + 'px'
bottomLeft.style.width = corner + 'px'
bottomRight.style.width = corner + 'px'
topLeft.style.height = corner + 'px'
topRight.style.height = corner + 'px'
bottomLeft.style.height = corner + 'px'
bottomRight.style.height = corner + 'px'


var menuv = document.getElementById('menu')
//var mright = Math.ceil(corner / 2) + 5
var mright=corner
menuv.style.left = mright + 'px'
var logol = (iwidth - 455) / 2 + 50
document.getElementById('logo').style.left=logol+'px'
document.getElementById('footer').style.right = mright + 'px'

bodyv.style.width = parseInt(iwidth) + 'px'
pagev.style.width = parseInt(iwidth) + 'px'
var bro = document.getElementById('brochure')
var cap = document.getElementById('capabilitiesdl')
if (bro.className == 'download') {
    bro.style.left = mright + 'px'
}
else if (cap.className == 'download') {
    cap.style.left = mright + 'px'
    document.getElementById('capbody').style.width=(iwidth-222)+'px'
}

    
}
