/*
  properties
*/
var clipWidth;
var textSize = GetCookie("textSize") == null ? "normal" : GetCookie("textSize");
/*
  functions
*/

function adjustLayout()
{
	// Get browser height
	var bH= xClientHeight();
	var cH = xHeight("kolom-middle");
	var lH = xHeight("kolom-left");
	var rH = xHeight("kolom-right");
	
	var mxH = cH > lH ? cH : lH;
	var mxH = mxH > rH ? mxH : rH;
	var mxH = mxH > bH ? mxH : bH;
	
	// set the height  			
	xHeight("kolom-right",mxH);
	xHeight("kolom-left",mxH);
    
  /* set textSize active > border */
  if(xGetElementById(textSize) && xGetElementById(textSize).style){xGetElementById(textSize).style.borderBottom = "1px solid #666666";} 
  // clip the Projectslider  			
  clipWidth = xWidth("tijdslijn")+10;
    
  xClip("projectslider",0, clipWidth, 35, 0);
  xShow("projectslider");
}
  		
      
function setTextSize(size)
{
  var expires = new Date(); 
  expires.setMonth(expires.getMonth() + 8); 
  SetCookie("textSize", size, expires, "/");
  var loc = window.location;
  window.location = loc;
}
  
/*
  check for resize of an specific DIV if the letter size in the browser has changed 
*/

var divW,divH,divE;
function startResizeDivEvent(e)
{ // set DIV start size
  divE = e; divW =  xWidth(e);divH = xHeight(e);xResizeDivEvent();
}

function xResizeDivEvent() 
{ // Div resize event simulation
  setTimeout("xResizeDivEvent()", 250);
  var cw = xWidth(divE), ch = xHeight(divE);
  if (divW != cw || divH != ch) {divW = cw; divH = ch; adjustLayout() ; }
}

/*
  event handlers
*/
window.onload = function()
{
  adjustLayout();
  xAddEventListener(window, "resize", adjustLayout, false);
  startResizeDivEvent("header")
}
    
      
     