// JavaScript Document

function createIndex()
{
	var caseStudy = xmlDoc.getElementsByTagName("JOB");
	var caseStudyLength = caseStudy.length;

	if (caseStudyLength) {
		var caseStudyList = "<ul id='jobs'>";
		for (var i=0; i<caseStudyLength; i++) {
			caseStudyList += "<li>";
			caseStudyList += "<p class='title'>";
			caseStudyList += xmlDoc.getElementsByTagName('TITLE')[i].firstChild.data;
			caseStudyList += "</p><p class='location'>";
			caseStudyList += xmlDoc.getElementsByTagName("LOCATION")[i].firstChild.data;
			caseStudyList += "</p><p class='description'>";
			if (xmlDoc.getElementsByTagName("DESCRIPTION")[i].hasChildNodes()==1) {
				caseStudyList += xmlDoc.getElementsByTagName("DESCRIPTION")[i].firstChild.data;
			}
			caseStudyList += "</p>";
			caseStudyList += "</li>";
		}
		caseStudyList += "</ul>";
		caseStudyList += "<p><img src='/global/icons/envelopeicon_small.gif' alt='Send an email' class='left' />";
		caseStudyList += "If you are interested in learning about one of MZA's open positions, please email a cover letter and resume/CV to ";
		caseStudyList += "<a href='mailto:mzainfo@mzaconsulting.com'>mzainfo@mzaconsulting.com</a></p>";
	} else {
		caseStudyList = "<p>Thank you for your interest in Morse Zehnter Associates. Currently we do not have any open positions.</p>";
	}
	document.write(caseStudyList);
}

function careerslist(whichXML) {
	//var whichXML = "careers_fulltime.xml";
	importXML(whichXML);
	createIndex();
}
