previousSilo = "layer-standalone";

previousLic = "layer-default";
previousBio = "layer-darren"; //list the initial bio to be shown here and update the if statement in the toggleBio function below
previoushrefLink = "";

function toggleSilo(id) {
	hideDocumentElement(previousSilo);
	document.getElementById('layer-default').style.display="none";
	showDocumentElement(id);
	previousSilo = id;
}

function toggleBio(id, hrefLink) {
	if (id != "layer-darren") document.getElementById("initialBio").className="unselected";
	hrefLink.className="selected";
	previoushrefLink.className="unselected";
	hideDocumentElement(previousBio);
	showDocumentElement(id);
	previousBio = id;
	previoushrefLink = hrefLink;
}

function toggleLic(id, hrefLink) {
	//if (id == previousLic) {
	//	hideDocumentElement(id);
	//	showDocumentElement("layer-default");
	//}
	hrefLink.className="selected";
	previoushrefLink.className="unselected";
	hideDocumentElement(previousLic);
	showDocumentElement(id);
	previousLic = id;
	previoushrefLink = hrefLink;
}

function hideDocumentElement(id) {
    var el = document.getElementById(id);
    if (el) el.style.display = 'none';
}

function showDocumentElement(id) {
    var el = document.getElementById(id);
    if (el) el.style.display = 'block';
}

function demoPopUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=328,height=256,left = 476,top = 384');");
}

function testimonialLargePopUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=636,height=391,left = 20,top = 384');");
}

function jobPopUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=460,height=640,left = 30,top = 30');");
}

function mailer(email){
emailE = "";
if (email == "sales")
	emailE=('sales@' + 'callpod.com');
else if (email == "eng")
	emailE=('engineeringcareers@' + 'callpod.com');
else if (email == "info")
	emailE=('info@' + 'callpod.com');

	document.write(
	  '<A HREF="mailto:' + emailE + '">' 
	  + emailE + '</a>'
)
}
