                                                                                                                                              

//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//
// gps-sante.js
// Javascript functions for gps sante website
//
// FASTBOIL                     1.0         12/09/2009
// http://www.fastboil.net
// hot@fastboil.net
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

//============================================================================//
//                             Layout                                         //
//============================================================================//
var h;
var fullMinHeight = 500;
var goLayout = false;

//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// function setLayout
// Object : Setting div height
// FASTBOIL                     1.0         14/09/2009
// http://www.fastboil.net
// hot@fastboil.net
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function setLayout() {
  if (goLayout) {
    goLayout = false;
    if (self.innerHeight) // all except Explorer
      h = self.innerHeight;
    else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode
      h = document.documentElement.clientHeight;
    else if (document.body) // other Explorers
      h = document.body.clientHeight;

    var fullHeight = h;
    if (fullHeight<fullMinHeight) fullHeight = fullMinHeight;

    if (document.getElementById('headermaingpssante') && document.getElementById('menumaingpssante')
      && document.getElementById('footermaingpssante') && document.getElementById('contentmaingpssante')
      && document.getElementById('contentgpssante')) {

      var contentHeight = document.getElementById('contentgpssante').offsetHeight;
      var contentMinHeight = fullHeight - document.getElementById('headermaingpssante').offsetHeight - document.getElementById('menumaingpssante').offsetHeight - document.getElementById('footermaingpssante').offsetHeight;

      if (contentHeight<contentMinHeight) contentHeight = contentMinHeight;
      if (document.getElementById('contentmaingpssante')) document.getElementById('contentmaingpssante').style.height = contentHeight+'px';
    }

    goLayout = true;
  }
}

//============================================================================//
//                             On load                                        //
//============================================================================//

//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// function gpsOnLoad
// Object : To be called onLoad
// FASTBOIL                     1.0         14/09/2009
// http://www.fastboil.net
// hot@fastboil.net
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function gpsOnLoad() {
  goLayout = true;
  setLayout();
}


