﻿// These functions provide for window and map resizing

function windowSizes() 
{
  // return the window width and height as an array
  var winSize=new Array();
  var myWidth = 0, myHeight = 0;
  if(typeof(window.innerWidth)=='number') { winSize[0]=window.innerWidth; winSize[1]=window.innerHeight; } 
  else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)) { winSize[0]=document.documentElement.clientWidth; winSize[1]=document.documentElement.clientHeight; }
  else if(document.body&&(document.body.clientWidth||document.body.clientHeight)) { winSize[0]=document.body.clientWidth; winSize[1]=document.body.clientHeight; }
  return winSize;
}

function mapSize() 
{ 
  // resizes the map DIV to fill the window
  var map=document.getElementById('map');
  var winSize=windowSizes();
  map.style.width =winSize[0] - 197;
  map.style.height=winSize[1] - 87;
}