// JavaScript Document
function embedEmail (idName) {
	// Assumptions: If there's an "A"
	//   The A's first child is an image (or this won't be applied)
	//   Only one image swap for every A
	//   Over file must be name + "-over"
	//   Over file must be in the same folder
	//   Image must have a unique NAME (aboutBtn)
//alert("embedEmail invoked. idName="+idName);
	if (!document.getElementsByTagName) return false;
	if (!document.getElementById) return false;
	if (!document.getElementById(idName)) return false;
	
	// Set pointer to idName
	var divWithLinks = document.getElementById(idName);
	// Get array of links
	var links = divWithLinks.getElementsByTagName("a");
	// For all links
	for (var i=0; i < links.length; i++) {
		// If the class is email
		if (links[i].className=="email") {
			// Set the href of the link to be the title
			if (links[i].title != "") links[i].href = "MAILTO:"+links[i].title;
		}
	}
}
addLoadEvent( function () {embedEmail('content');});