function toggle( targetId, showhide ){
	//hideall( targetId );
  if (document.getElementById){
  	target = document.getElementById( targetId );
	  
	  if (showhide == "block"){                         
	   target.style.display = "none";   
	  } 
	  else {                                
	   target.style.display = "block";  
	  }
  }
}

function toggle2( targetId, showhide ){
	//hideall( targetId );
  if (document.getElementById){
  	target = document.getElementById( targetId );
	  if (target.style.display == "block"){                         
	   target.style.display = "none";   
	  } 
	  else {                                
	   target.style.display = "block";  
	  }
  }
}

function showall( targetId ){
  if (document.getElementById){
  target = document.getElementById( targetId );
   target.style.display = "block";  
  }
}

function hideall( targetId ){
	//Create an array 
	var allPageTags = new Array(); 
	//Populate the array with all the page tags  
	var allPageTags=document.getElementsByTagName("div");  
	//Cycle through the tags using a for loop  
	for (i=0; i<allPageTags.length; i++) {  
		//Pick out the tags with our class name  
		if ( (allPageTags[i].className == "profilebio") && (allPageTags[i].id != targetId) ) {  
			//Manipulate this in whatever way you want  
			allPageTags[i].style.display='none';    
		} 
	} 	
}


sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


	// this shows or hides a div, tested in firefox, safari and eye smee
	// make sure you set the div='style: block;' to set the initial state of the div
	function togglediv(divName)
	{
		// get the browser type
		var browserType;
		if (document.layers) {browserType = "nn4"}
		if (document.all) {browserType = "ie"}
		if (window.navigator.userAgent.toLowerCase().match("gecko")) {browserType= "gecko"}
		// brower check
		if (browserType == "gecko" ) {
			document.outerLayer = eval('document.getElementById(\''+ divName +'\')');
	 	} else if (browserType == "ie") {
			document.outerLayer = eval('document.all[\''+ divName +'\']');
	 	} else 
	 		{
			document.outerLayer = eval('document.layers[\''+ divName +'\']');
	 	} 
	 	// show/hide who har
	 	if (document.outerLayer.style.display == "block") {
			document.outerLayer.style.display = "none";
		} else {
			document.outerLayer.style.display = "block";
		}
	}


	// this shows or hides a div, tested in firefox, safari and eye smee
	// make sure you set the div='style: block;' to set the initial state of the div
	function setdiv(divName,divstyle)
	{
		// get the browser type
		var browserType;
		if (document.layers) {browserType = "nn4"}
		if (document.all) {browserType = "ie"}
		if (window.navigator.userAgent.toLowerCase().match("gecko")) {browserType= "gecko"}
		// brower check
		if (browserType == "gecko" ) {
			document.outerLayer = eval('document.getElementById(\''+ divName +'\')');
	 	} else if (browserType == "ie") {
			document.outerLayer = eval('document.all[\''+ divName +'\']');
	 	} else 
	 		{
			document.outerLayer = eval('document.layers[\''+ divName +'\']');
	 	} 
	 	// show/hide who har
	 	if (divstyle == "block") {
			document.outerLayer.style.display = "block";
		} else {
			document.outerLayer.style.display = "none";
		}
	}