function setHeight() { 
	//alert('in set ground!' + document.body.clientHeight);
	var groundHeight = document.body.clientHeight; 
	if (groundHeight > 0) { 
		var groundElement = document.getElementById('main'); 
		groundElement.style.height = groundHeight - 118 + 'px'; 
	}
}

window.onload = function() { 
	setHeight(); 
} 

window.onresize = function() { 
	setHeight(); 
}

function ColorCol(colName, color)
{
    var allCells = document.getElementsByTagName("td");

    var row = 0;

    for (var i=0; i < allCells.length; i++) {
        var cell = allCells[i];
        
        if (cell.cellIndex==colName && row >= 1) {
            //alert(cellName);
            if (color==1)
                cell.className="hlt_"+cell.className;
             else
                cell.className=cell.className.substring(4);
            
        } else if (cell.cellIndex==colName && row == 0)
            row++;
    
    }
}

/* open/closes divs on pages such as the syllabus or cv */
function toggleLayer( whichLayer, sender )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';

    sender.value=(sender.value=='-'?'+':'-');      
}