// init email address components
dom = "adambankin";
sym = "@";
fN = "adam";
dot = ".com";
pro = "mailto:"
	
function emailHide(){
	if(!document.getElementById("email")){
		createParts()
	}
} 

function createParts(){
	// create br
	bEml = document.createElement("br"); // br Email
	
	// create anchor
	aEml = document.createElement("a"); // anchor Email
	
	// set anchor attributes e.g. href
	aEml.href = pro+fN+sym+dom+dot;
	// ad id to anchor
	aEml.id = "email";
	
	// create text nodes
	txt1 = document.createTextNode("Contact me ");
	txt2 = document.createTextNode(fN+sym+dom+dot);
	
	// insert the email address into the anchor node
	aEml.appendChild(txt2);
	
	// an existing object
	ftr = document.getElementById('footer').firstChild;
	ftr.appendChild(bEml);
	ftr.appendChild(txt1);
	ftr.appendChild(aEml);
}
