/**
* This functions checks the actual height ob the element with the given id,
* and sets another elements to the same height.
*/
function precheck() {
	var heightvalue;
	var heightvaluefirst;
	var heightvaluesecond;
	heightvaluefirst = readStyles('maincontent', 'height');
	heightvaluesecond = readStyles('secondcontent', 'height');
	//alert(heightvalue);
	heightvalue = parseInt(heightvaluefirst) + parseInt(heightvaluesecond);
	document.getElementById('leftCol').style.height = heightvalue + "px";	
	document.getElementById('centerCol').style.height = heightvalue + "px";		
	
}

/**
* Function reads the css value of the given css class type
*
* @param string strId - The ID of the HTML Element to read
* @param string strCSS - The CSS class to read.
*
*/
function readStyles(strID, strCSS){
  var strRet;

  //  Falls der Brower die Methode "getComputedStyle" kennt (W3C-DOM)
  if(window.getComputedStyle){
    strRet = window.getComputedStyle(document.getElementById(strID), null)[strCSS];
  }

  //  Falls der Browser die Methode "currentStyle" kennt (neuere IEs)
  else if(document.getElementById(strID).currentStyle){
    strRet = document.getElementById(strID).currentStyle[strCSS];
  }
	
  return parseInt(strRet);
}