<!--//

// this non-function section is for the purpose of 'hiding' all relevant divs 'onload'

if (document.getElementById) {

	var AllDIVs = document.getElementsByTagName("div");
	// alert(AllDivs.length);
	var numDIVs = AllDIVs.length;
	for (i=0; i < numDIVs; i++) {
		if ((AllDIVs[i].className == "detailContainer") || (AllDIVs[i].className == "acroContainer")) {
		AllDIVs[i].style.display = "none";
		}
	}
}

function expandomaticWithParameters(targetID,linkText1,linkText2) {
if (document.getElementById) {
	var Stripper = new String(targetID);
	//alert(Stripper.length);
	var grabbedValue = targetID.substring(2,Stripper.length);
	//alert(grabbedValue);
	var anchorToChange = "show" + grabbedValue;
	//alert(anchorToChange);
	
var detailTarget = document.getElementById(targetID);
var anchorTarget = document.getElementById(anchorToChange);
	if (detailTarget.style.display == "none") { 
		detailTarget.style.display = "";
		anchorTarget.innerHTML = linkText1;
		// what it is AFTER expanded
		anchorTarget.style.color = "#ff0000";
		detailTarget.style.backgroundColor="#ffffff";
	}
	else if (detailTarget.style.display == "") {
		detailTarget.style.display = "none";
		anchorTarget.innerHTML = linkText2;
		// what it is when UNEXPANDED
		anchorTarget.style.color = "#325f99";
		detailTarget.style.backgroundColor="#ffffff";
	}
}
}

function expandomaticAP(targetID,anchorToChange,linkText1,linkText2) {
// parameters:
// targetID is the id for the container that opens and closes
// anchorToChange is the ID of the link that drives the expand / contract; 
// linkText1 & linkText2 are the text strings for that link
// when they are expanded (usually w/ '..Hide..')
// and when they are closed (usually w/ 'show' or 'expand', etc.)

	if (document.getElementById) {
	
	var detailTarget = document.getElementById(targetID);
	var anchorTarget = document.getElementById(anchorToChange);
	// var anchorTarget = targetID + 'ID';

		if (detailTarget.style.display == "none") { 
			detailTarget.style.display = "";
			anchorTarget.innerHTML = linkText1;
			// what it is AFTER expanded
			anchorTarget.style.color = "#ff0000";
			detailTarget.style.backgroundColor="#ffffff";
		}
		else if (detailTarget.style.display == "") {
			detailTarget.style.display = "none";
			anchorTarget.innerHTML = linkText2;
			// what it is when UNEXPANDED
			anchorTarget.style.color = "#325f99";
			detailTarget.style.backgroundColor="#ffffff";
		}
	}
}



function expandomaticSem(obj) {
// parameters:
// the only parameter is the keyword 'this', passed when the function is called in the anchor
// around the words 'Show Abstract'. 
// The text that swaps is not changed
// The anchor for the location of the seminar listing is always in the syntax: SpeakerlastnameTopicYYYYMMDD
// the id of the div to be expanded or hidden is 'SpeakerlastnameTopicYYYYMMDD'a
// no id is needed on the anchor tag for the expand / contract
// this version is only for the seminar listings, which are most used and need to be less pain to code.

	if (document.getElementById) {
	
		var objContainer = obj.parentNode;

		// the div we want to expand and contract is the next non-whitespace neighbor of the parentNode of the anchor tag. No matter what.

		var objHREF = obj.href;
		var divLen = objHREF.length;
		var IDStart = objHREF.indexOf('#') + 1;

		var divID = objHREF.substring(IDStart,divLen);
		var divID = divID + "a";

//		window.alert(IDStart);
//		window.alert(divID);

		var detailTarget = document.getElementById(divID);

			if (detailTarget.style.display == "none") { 
				detailTarget.style.display = "";
				obj.innerHTML = "Hide Abstract";
				// what it is AFTER expanded
				obj.style.color = "#ff0000";
				detailTarget.style.backgroundColor="#ffffff";
			}

			else if (detailTarget.style.display == "") {
				detailTarget.style.display = "none";
				obj.innerHTML = "Show Abstract";
				// what it is when UNEXPANDED
				obj.style.color = "#325f99";
				detailTarget.style.backgroundColor="#ffffff";
			}
	} 
}


//-->