var isLoaded = false;
function preloadCustom() {
    var lm = document.getElementById("LoadingMessage");
    if (lm) lm.parentNode.removeChild(lm);
	if (window.loaded) loaded();
	if (window.setupGlossary) setupGlossary();

	isLoaded = true;
}

function GetEmail(text, name, dotcom) {
	if (!name) name = 'ehd';
	if (!dotcom) dotcom = 'ehd.org';
	if (!text) text = name+'@'+dotcom;
	return '<a href="mailto:'+name+'@'+dotcom+'">'+text+'</a>';
}

function more(n) { // This function makes the more buttons work within the table.
  document.getElementById("less"+n).style.display="none";
  document.getElementById("more"+n).style.display="";
}

function less(n) { // This function makes the less buttons work within the table
  document.getElementById("less"+n).style.display="";
  document.getElementById("more"+n).style.display="none";
}

function moreAll(tot) { // This function makes the more buttons work within the table.
  while(tot!=0){
    document.getElementById("less"+tot).style.display="none";
    document.getElementById("more"+tot).style.display="";
	tot--;
  }
}

function lessAll(tot) { // This function makes the more buttons work within the table.
  while(tot!=0){
    document.getElementById("less"+tot).style.display="";
    document.getElementById("more"+tot).style.display="none";
	tot--;
  }
}

function showHide(name) {
	var node = document.getElementById(name);
	if (!node) return false;
	if (node.style.display == "none") node.style.display = "";
	else node.style.display = "none";
	return false;
}

function setCell(cell) {
	document.cookie="cell="+escape(cell)+"; path=/";
}
