window.onload = function insertPseudoProtocol() {		// switches munged email addresses for mailto: email addresses
	if (document.getElementsByTagName) {		// check that UA understands this method
		if (document.getElementById) {		// check that UA understands this method
		
			// creates a faux mailto: pseudo-protocol

			if (document.getElementById("email_address")) { 	
				$munged = document.getElementById("email_address");		// get <p> element with id email_address
				while ($munged.childNodes[0]) {		// cycle through all of $munged's children	
					$munged.removeChild($munged.childNodes[0]);		// delete $munged's children
				}
				var $pieces = "info" + "@" + "fwbosheffield" + ".org";		// construct an email ddress
				var $jigsaw = "mailto:" + $pieces;		// add the pseudo-protocol
				var $substitute = document.createElement("a");		//create the anchor
				$substitute.setAttribute("href",$jigsaw);		//insert an href attribute and pseudo-protocol
				var $text = document.createTextNode($pieces);		// create the link text
				$substitute.appendChild($text);		// insert the link text into the node tree
				$munged.appendChild($substitute); 		// insert the anchor into the node tree
			}; 
			
			// creates a faux mailto: pseudo-protocol
			
			if (document.getElementById("yoga_instructor")) { 	
				$munged = document.getElementById("yoga_instructor");		
				while ($munged.childNodes[0]) {		
					$munged.removeChild($munged.childNodes[0]);				
				}
				var $pieces = "nicolaharpin" + "@" + "hotmail" + ".com";
				var $jigsaw = "mailto:" + $pieces;
				var $substitute = document.createElement("a");
				$substitute.setAttribute("href",$jigsaw);
				var $text = document.createTextNode($pieces);
				$substitute.appendChild($text);
				$munged.appendChild($substitute);
			};
		}		// function ends
	}
}
