aboutsummaryrefslogtreecommitdiff
path: root/dst/js/showhide.js
blob: afc9c06c1749bfa4129f926985c9852db88fcd77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
http://www.tutorialhelpdesk.com/tutorials/web-development/javascript/how-to-show-hide-a-dhtml-div-using-onclick()-event.html
*/

function ShowHide(elementId)
{
	var element = document.getElementById(elementId);
	if(element.style.display != "block")
	{
		element.style.display = "block";
	}
	else
	{
		element.style.display = "none";
	}
}
function UpdateText(element)
{
	if(element.innerHTML.indexOf("Hide") == -1)
	{
		element.innerHTML = "Hide Abstract";
	}
	else
	{
		element.innerHTML = "Abstract";
	}
}