// Enforce pagebody-is-taller-than-side-columns requirement  ** version 1.3.1 **

var FPHconfig = new Array;
FPHconfig["mainCol"] = ("pagebody");
FPHconfig["cols"] = new Array ("pageextra1", "pageextra2", "pageextra3", "pageextra4");

function fixPagebodyHeight()
{
  if (document.layers == null)
  {
    var mainCol = document.getElementById(FPHconfig["mainCol"]);
    var mainColHeight = (mainCol != null) ? mainCol.offsetHeight : 0;

    var isChanged = false;

    var i = FPHconfig["cols"].length - 1;
    if (i+1) { do
    {
      var col = document.getElementById(FPHconfig["cols"][i]);
      var colHeight = (col != null) ? col.offsetHeight : 0;
      if (colHeight > mainColHeight)
      {
        mainColHeight = colHeight;
        isChanged = true;
      }
    } while (i--); }

    if (isChanged) { mainCol.style.height = mainColHeight + "px"; }
    var bdyClass = document.body.className;
    if ((bdyClass == null) || (bdyClass == ""))
    {
      document.body.className += "heightfixed";
    }
    else
    {
      document.body.className += " heightfixed";
    }
  }
};




var StepPWconfig = new Array ();
StepPWconfig["step1"] = 0;

function stepPageWidth()
{
  if (  (document.body.clientWidth > StepPWconfig["step1"])
     && !document.body.className.match(/ width(\d+)/) )
  {
    document.body.className += " width1";
    if (typeof(setCookie) != "undefined") { setCookie('winWidth','width1'); }
  }
  else if (  (document.body.clientWidth < StepPWconfig["step1"])
          && document.body.className.match(/ width(\d+)/) )
  {
    document.body.className = document.body.className.replace(/ width(\d+)/, "");
    if (typeof(setCookie) != "undefined") { setCookie('winWidth',''); }
  }
}




// Obsolete function - merely left in for reasons of backwards compatibility
function disableCSSinStupidBrowsers() { return true; };



/* depends on utils_1.0.js */