function setFontSize(DisplayFontSize, baseUrl)
{
  SetSessionFontSize(DisplayFontSize, baseUrl);

  var footer = document.getElementById('footer');
  var originalTop = footer.offsetTop;
  var FontSize        = "12px";
  var LineHeight      = "16px";
  var InputLineHeight = "16px";
  var DivIdBannersHeight = "125px";
  var Html            = "<img src=\""+g_BaseUrl+"/pics/letter_big.png\" title=\"Grote lettergrote\" class=\"font\" />";
      Html            += "<div style=\"position: absolute; z-index: 240; top: 0px; right: 0px; margin: 53px 10px 0px 0px; width: 40px; height: 30px; cursor: pointer; display: block; background: url(/pics/lightbox-blank.gif) top left repeat;\" onclick=\"setFontSize('big', '" + baseUrl + "')\"></div>"

  switch(DisplayFontSize)
  {
    case 'big' :
    {
        FontSize        = "16px";
        LineHeight      = "24px";
        InputLineHeight = "18px";
        DivIdBannersHeight = "145px";
        Html            = "<img src=\""+g_BaseUrl+"/pics/letter_normal.png\" title=\"Normale lettergrote\" class=\"font\" />";
        Html            += "<div style=\"position: absolute; z-index: 240; top: 0px; right: 0px; margin: 53px 52px 0px 0px; width: 30px; height: 30px; cursor: pointer; display: block; background: url(/pics/lightbox-blank.gif) top left repeat;\" onclick=\"setFontSize('normal', '" + baseUrl + "')\"></div>"
    }
    break;
  }

  oDiv = document.getElementById('site');
  if(oDiv != null) {
    oDiv.style.fontSize   = FontSize;
    oDiv.style.lineHeight = LineHeight;
  }

  oDiv = document.getElementById('FormDiv');
  if(oDiv != null) {
    oDiv.style.fontSize   = FontSize;
    oDiv.style.lineHeight = LineHeight;
  }

  oBannersDiv    = document.getElementById('banners');
  oImgBottomDiv  = document.getElementById('imgbottomright');
  oImgContentDiv = document.getElementById('content');     
  if(oBannersDiv != null) {
  
    if(oImgBottomDiv != null && oImgContentDiv != null) {
        if(DisplayFontSize == "big") {
            oImgBottomDiv.style.paddingBottom = "192px";            
        } else {
            oImgBottomDiv.style.paddingBottom = "172px";    
        }    
    }

    oBannersDiv.style.height = DivIdBannersHeight;
    
    oDivLinks           = document.getElementById("links");      
    if(oDivLinks != null) 
    {   
        var aAnchorElements = oDivLinks.getElementsByTagName("a");
        for(var i=0; i < aAnchorElements.length; i++) {
            aAnchorElements[i].style.fontSize = FontSize;
            aAnchorElements[i].style.lineHeight = LineHeight;
        }
    }
  }

  oDiv = document.getElementsByTagName('input');
  if(oDiv != null) {
    for(var i = 0; i < oDiv.length; i++) {
      if(oDiv[i].type != "submit" && oDiv[i].type != "file") {
        oDiv[i].style.fontSize   = FontSize;
        oDiv[i].style.lineHeight = InputLineHeight;
      }
    }
  }

  oDiv = document.getElementsByTagName('select');
  if(oDiv != null) {
    for(var i = 0; i < oDiv.length; i++) {
      oDiv[i].style.fontSize   = FontSize;
      oDiv[i].style.lineHeight = LineHeight;
    }
  }

  oDiv = document.getElementById('fontsize');
  if(oDiv != null) {
    oDiv.innerHTML = Html;
  }

  /*IE6 fix, force repaint/recalculation for the position of the blocks which are placed at the bottom (footer, banners etc.), without this hack they stay at the original position so the text overlaps with them*/
  if(footer.offsetTop == originalTop)
  {
      footer.style.display = 'none';
      footer.style.display = 'block';
  }
}

function SetSessionFontSize(currentSize, baseUrl)
{
  this.Ajax = new AjaxComponent(baseUrl, currentSize, EmptyFunction);
  this.Ajax.initiateWatch();
}

function EmptyFunction()
{
}

function resetFontSize(baseUrl)
{
  setFontSize(CurrentFontSize, baseUrl);
}
