﻿/*
function evenColumns() {
 var aDiv = new Array(
   document.getElementById("kolumn_1"),
   document.getElementById("kolumn_2"),
   document.getElementById("kolumn_2_bred"),
   document.getElementById("kolumn_3"));
		
 var iMaxHeight = 0;
 for(var i = 0; i < aDiv.length; i++) {
   if(aDiv[i] != null) {
     aDiv[i].style.height = "auto";
     if(aDiv[i].offsetHeight > iMaxHeight) iMaxHeight = aDiv[i].offsetHeight;
   }
 }
		
 for(var i = 0; i < aDiv.length; i++) {
   if(aDiv[i] != null) {
     aDiv[i].style.height = iMaxHeight + 'px';

     if (aDiv[i].offsetHeight > iMaxHeight) {
       aDiv[i].style.height = (iMaxHeight - (aDiv[i].offsetHeight - iMaxHeight)) + 'px';
     }
   }
 }
}

if(window.addEventListener) {
  window.addEventListener("load", function() { evenColumns(); }, false); // FF
  window.addEventListener("onload", function() { evenColumns(); }, false); // O
} else {
  window.attachEvent("onload", function() { evenColumns(); }); // IE
}
window.onresize = evenColumns;

function setContainerHeight(sId) {
 var oContainer = document.getElementById(sId);
 if(sId == null)
   return;
 
 oContainer.style.height = "auto";
 oContainer.style.height = oContainer.offsetHeight + "px";
}

if(window.addEventListener) {
  window.addEventListener("load", function() { setContainerHeight("sida"); }, false); // FF
  window.addEventListener("onload", function() { setContainerHeight("sida"); }, false); // O
} else {
  window.attachEvent("onload", function() { setContainerHeight("sida"); }); // IE
}
*/