var isLoaded = false;
function preloadCustom() {
    var lm = document.getElementById("LoadingMessage");
    if (lm) lm.parentNode.removeChild(lm);
	if (window.loaded) loaded();
	if (window.setupGlossary) setupGlossary();
	var lopc = document.getElementById("lopcframe");
	if (lopc) lopc.src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fapps%2Fapplication.php%3Fid%3D104832439560110&width=183&colorscheme=light&connections=6&stream=false&header=false&height=310";
	var lopp = document.getElementById("loppframe");
	if (lopp) lopp.src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2FLittleOnePregnancyPlace&width=183&colorscheme=light&connections=6&stream=false&header=false&height=300";
	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);
}
