// JavaScript Document


function Calculate_The_Content_Dependent_Heights()
{ 
   var The_Minimum_Height = 410; //pixels
   var The_Space_Between_Image_And_Text = 4; // pixels
   var The_Bottom_Padding = 12; //pixels
   
   var The_Image_Height =
          document.getElementById( "Live_Page:Body_Content_Image_Wrapper_ID" ).offsetHeight;
		  
   var The_Footer_Links_Module_Height = 0; //pixels
   var The_Footer_Links_Module_Node =
          document.getElementById( "Live_Page:Body_Content_Footer_Links_Wrapper_ID" );
   if( The_Footer_Links_Module_Node != null )
   {
      The_Footer_Links_Module_Height = The_Footer_Links_Module_Node.offsetHeight;
   };
		  
		  
   var The_Text_Height =
          document.getElementById( "Live_Page:Body_Content_Main_Text_Wrapper_ID" ).offsetHeight;
		  
   var The_Navigation_Wrapper_Height =
          document.getElementById( "Live_Page:Navigation_Wrapper_ID" ).offsetHeight;
		  
   var The_Family_Tree_Height =
          document.getElementById( "Live_Page:Family_Tree_Wrapper_ID" ).offsetHeight;
		  
   var The_Immediate_Family_Height =
          document.getElementById( "Live_Page:Immediate_Family_Wrapper_ID" ).offsetHeight;
		  
   var The_Links_Module_Wrapper_Height =
          document.getElementById( "Live_Page:Links_Module_Wrapper_ID" ).offsetHeight;
		  
   var The_Center_Column_Height = The_Image_Height + The_Space_Between_Image_And_Text + The_Text_Height;
   
   var The_Content_Height = Math.max( The_Links_Module_Wrapper_Height,
									  Math.max( The_Navigation_Wrapper_Height,
											    The_Center_Column_Height       ) );
	
   var The_Body_Content_Positioning_Context_Height =
           Math.max( The_Minimum_Height, The_Family_Tree_Height +
                                         The_Content_Height +
										 The_Bottom_Padding        );
		  
   var The_Text_Vertical_Offset =
          document.getElementById( "Live_Page:Body_Content_Main_Text_Wrapper_ID" ).offsetTop;

   document.getElementById( "Live_Page:Body_Content_Positioning_Context_ID" ).style.height =
      The_Body_Content_Positioning_Context_Height + "px";  
	  
   document.getElementById( "Live_Page:Navigation_Wrapper_ID" ).style.height =
      ( The_Content_Height ) + "px";
	  
   document.getElementById( "Live_Page:Body_Content_Main_Text_Wrapper_ID" ).style.height =
      ( The_Content_Height - ( The_Image_Height + The_Space_Between_Image_And_Text + 2 ) ) + "px";  
	  
}


