﻿function ballanceTables(tabID1, tabID2, tabID3)
{
  var tab1 = document.getElementById(tabID1);
  var tab2 = document.getElementById(tabID2);
  var tab3 = document.getElementById(tabID3);
  
  var divHeight1 = tab1.clientHeight;
  var divHeight2 = tab2.clientHeight;
  var divHeight3 = tab3.clientHeight;
  
  if(tab3 != null && tab2 != null && tab3 != null)
  {
      if(divHeight1 > divHeight2 && divHeight1 > divHeight3)
      return tab2.style.height = divHeight1 + "px", tab3.style.height = divHeight1 + 14 + "px";

      if(divHeight3 > divHeight1 && divHeight3 > divHeight2)
      return tab1.style.height = divHeight1 + "px", tab2.style.height = divHeight3 + "px", tab3.style.height = divHeight3 + 14 + "px";
      
  }
  
  else
  {
    return tab1.style.height = divHeight2 + "px", tab3.style.height = divHeight2 + "px";
  } 
} 


