function getBrowserType(){
	var browserType;	
	if (document.layers) {browserType = "nn4"}
	if (document.all) {browserType = "ie"}
	if (window.navigator.userAgent.toLowerCase().match("gecko")) {
	   browserType= "gecko"
	}
	return browserType;
}

function projectRollOver(id){
	if (document.getElementById){
		obj = document.getElementById(id);
		obj.style.background = '#CCCCCC';
		obj.style.cursor = "pointer";
	}
}

function projectRollOut(id){
	if (document.getElementById){
		obj = document.getElementById(id);
		obj.style.background = '#ffffff';
		obj.style.cursor = "pointer";
	}
}


//  From the Netlobo Article
//  Showing and Hiding a DIV using CSS and Javascript
//  by lobo235
//  http://www.netlobo.com/div_hiding.html

function toggleLayer(parent, whichLayer )
{
  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';

  
  if (document.getElementById){
		obj = document.getElementById(parent);
		if(vis.display == "block"){
			obj.style.marginTop="0.3cm";
		} else {
			obj.style.marginTop="0cm";
		}
	}
}


function showAll(tracker){
	var i;
	for(i=1;i<(tracker+1);i++){
		var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( "project_content"+i );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all["project_content"+i];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers["project_content"+i];
  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':'block';
  vis.display = (vis.display==''||vis.display=='block')?'block':'block';

  
  if (document.getElementById){
		obj = document.getElementById("project"+i);
		if(vis.display == "block"){
			obj.style.marginTop="0.3cm";
		} else {
			obj.style.marginTop="0cm";
		}
	}
	}
}

function closeAll(tracker){
	var i;
	for(i=1;i<(tracker+1);i++){
		var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( "project_content"+i );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all["project_content"+i];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers["project_content"+i];
  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)?'none':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'none';

  
  if (document.getElementById){
		obj = document.getElementById("project"+i);
		if(vis.display == "block"){
			obj.style.marginTop="0.3cm";
		} else {
			obj.style.marginTop="0cm";
		}
	}
	}
}