function killOASspacer() {
  var div = document.getElementById('OAS_bottomleaderboard');
  var a = div.getElementsByTagName('img');
  if (a.length && a[0].width == 2 && a[0].height == 2) {
     a[0].style.display = 'none';
     a[0].style.visibility = 'hidden';
  }
}

function show( id )
{
document.getElementById(id).style.display = 'block';
}
function hide( id )
{
document.getElementById(id).style.display = 'none';
}

function showHelp( id )
{
document.getElementById(id).style.visibility = 'visible';
document.getElementById(id).style.left = '-95px';
}
function hideHelp( id )
{
document.getElementById(id).style.visibility = 'hidden';
document.getElementById(id).style.left = '-5000px';
}

function breakPopup(theLink,closePopup)
{
if (! (window.focus && window.opener))return true;
window.opener.focus();
window.opener.location.href=theLink.href;
if (closePopup)window.close();
return false;
}

function timeStamp(){
var elapsedTime = sectionTime - storyTime;
	if( elapsedTime <= 31536000){
		if( elapsedTime <= 86400){
			if(elapsedTime <= 3600){
				if(elapsedTime <= 60){
				document.write(" <span class=\"timeStamp\">Updated a minute ago</span>")
				}
				else{
				document.write(" <span class=\"timeStamp\">Updated " + Math.round(elapsedTime / 60) + " minutes ago</span>")
				}
			}
			// older than 1 hour, print this pubdate
			else{
			document.write(" <span class=\"timeStamp\">Updated " + dayOld + "</span>");
			}
			}
			// older than 1 day, print this pubdate
			else{
			document.write(" <span class=\"timeStamp\">Published " + dayOld + "</span>");
			}
		}
	// older than 1 year, print this pubdate
	else{
	document.write(" <span class=\"timeStamp\">First published " + dayOld + "</span>");
	}
}

// blockToggle is used to simply turn the display of an element to none or block

function blockToggle(id)
{
	if (document.getElementById(id).style.display == document.getElementById('docLayout').style.display)
	{
		document.getElementById(id).style.display = "none";
	}
	else
	{
		document.getElementById(id).style.display = document.getElementById('docLayout').style.display
	}
}
