function sameHeight() // Bring in an array of your divs
{
  var highest = 0;
  var divs = new Array('main', 'right_shdw','left_shdw');
  for(i = 0; i < divs.length; i++) // Loop through the divs
  {
    document.getElementById(divs[i]).style.height = "auto";
    // Check to see if this div is the highest?
    if(document.getElementById(divs[i]).offsetHeight > highest)
    {
      // Yes its the highest so set the highest value to this div’s height
      highest = document.getElementById(divs[i]).offsetHeight;
    }
  }
  // Loop through all divs again
  for(i = 0; i < divs.length; i++)
  {
    // Set all divs height to the highest value
    document.getElementById(divs[i]).style.height = highest+"px";
  }
}

function fixSubRight() // Bring in an array of your divs
{
  var highest = 0;
  var divs = new Array('sub_left','sub_right');
  for(i = 0; i < divs.length; i++) // Loop through the divs
  {
    document.getElementById(divs[i]).style.height = "auto";
    // Check to see if this div is the highest?
    if(document.getElementById(divs[i]).offsetHeight > highest)
    {
      // Yes its the highest so set the highest value to this div’s height
      highest = document.getElementById(divs[i]).offsetHeight;
    }
  }
  // Loop through all divs again
  for(i = 0; i < divs.length; i++)
  {
	  if(document.getElementById(divs[i]) == "sub_right")
	  {
		  document.getElementById(divs[i]).style.height = (highest - 50)+"px";
	  }
	  else
	  {
		  document.getElementById(divs[i]).style.height = highest+"px";
	  }
    
  }
}

window.onload=function(){
	// var div = new Array('side_main', 'right_main');
	sameHeight();
	// fixSubRight();
}
