function equalColHeights(numCols, minHeight) {
  
   leftcolHeight = "";
   centrecolHeight = "";
   rightcolHeight = "";
	
   colheightarr = getColHeights (numCols);
   //alert(colheightarr[0] + ", " + colheightarr[1] + ", " + colheightarr[2]);
   if (numCols == 2){
     leftcolHeight = colheightarr[0];
     rightcolHeight  =  colheightarr[1];
   } else if (numCols == 3){
     leftcolHeight = colheightarr[0];
	 centrecolHeight = colheightarr[1];
     rightcolHeight  =  colheightarr[2];
   } 
    // remove the "px" in the height values to do a numerical comparison
  minHeightInt = parseInt(minHeight);
  leftcolHeightInt = parseInt(leftcolHeight);
  if (numCols == 3)  centrecolHeightInt = parseInt(centrecolHeight);
  rightcolHeightInt = parseInt(rightcolHeight);
  //alert(leftcolHeightInt + ", " + centrecolHeightInt + ", " + rightcolHeightInt); 
    // get the height of the tallest col
  if (numCols == 2) 
    maxHeight = getMax(leftcolHeightInt, rightcolHeightInt);
  else if (numCols == 3) {
    lcmax = getMax(leftcolHeightInt, centrecolHeightInt);
    maxHeight = getMax(lcmax, rightcolHeightInt);
  }
 
    // make columns the same height
  if (maxHeight < minHeightInt) {  
      // MIN LEFT COL
    document.getElementById("leftcol").style.height = minHeightInt + "px";
	  //CENTRE RIGHT COL 
    if (numCols == 3) document.getElementById("centrecol").style.height = minHeightInt + "px";
      //MIN RIGHT COL
    document.getElementById("rightcol").style.height = minHeightInt + "px";
  } else {
      
      document.getElementById("leftcol").style.height = maxHeight + "px";
	  
	  if (numCols == 3){
	    if (browser.isNS)
		  maxHeight += 8; 
	    document.getElementById("centrecol").style.height = maxHeight + "px";
	  } 
	  
	  if (browser.isNS)
	    if (numCols == 3)
		  maxHeight += 12; 
	    document.getElementById("rightcol").style.height = maxHeight + "px"; 
	       
  }
}

function getColHeights (numCols){

  
    if (browser.isIE){
      leftcolHeight = document.all.leftcol.offsetHeight;
	  if (numCols == 3) centrecolHeight = document.all.centrecol.offsetHeight;
	  rightcolHeight = document.all.rightcol.offsetHeight;
    } else { 
      leftcolObj = document.getElementById("leftcol");
      leftcolHeight = document.defaultView.getComputedStyle(leftcolObj, "").getPropertyValue("height");
   
      if (numCols == 3){
	    centrecolObj = document.getElementById("centrecol");
        centrecolHeight = document.defaultView.getComputedStyle(centrecolObj, "").getPropertyValue("height");
	  }
      rightcolObj = document.getElementById("rightcol");
      rightcolHeight = document.defaultView.getComputedStyle(rightcolObj, "").getPropertyValue("height");
    }
	colheightarr = new Array(2);
	colheightarr[0] = leftcolHeight;
	if (numCols == 2)
	  colheightarr[1] = rightcolHeight;
	else if (numCols == 3) {
	  colheightarr[1] = centrecolHeight;
	  colheightarr[2] = rightcolHeight;
	}
	
	return colheightarr;
}

function getMax(x,y) {   
  return Math.max(x,y);
}


