function getScreen() {
  var myWidth = 0, myHeight = 0;
  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;
  }
  return [myWidth, myHeight];
}

function setSizes(center) {

    var iHeaderHeight = 110;

    var size = getScreen();
    var myWidth  = size[0] - 20;
    var myHeight = size[1] - 30;

    if (center || myHeight < 574) {
        myHeight = 574;
    }
    if (center || myWidth < 1000) {
        myWidth = 1000;
    }

    myWidth = myWidth - 20;

    var panelWidth = getPanelWidth();
    var pad = 2;

    document.getElementById('main').style.width = myWidth + 'px';
    document.getElementById('content').style.width = myWidth - panelWidth - pad + 'px';
    document.getElementById('panel').style.width = panelWidth + 'px';

    document.getElementById('mapcontainer').style.height = myHeight - 165 + 'px';
    document.getElementById('panel').style.height = myHeight - 150 + 'px';
    var obj = document.getElementById('country');
    if (obj) {
        obj.style.height = myHeight - 180 + 'px';
    }
}

setSizes();

window.onresize = function () {
    setSizes();
}

eval("initMapData()");
