// Make sure that the sectionTitle variable is at least 2 characters long
if (sectionTitle.length > 1) {
	
	// Split the sectionTitle variable into an array element
	var sectionTitleArray = sectionTitle.split("|");						
	
	// Remove the first element from the array which comes in as "DELETE"
	sectionTitleArray.splice(0,1);
	
	// Add the current page title which is needed for deeply nested pages
	sectionTitleArray.push(pageTitle);
	
	// Check if the main section is "Newsroom" then do this
	if (sectionTitleArray[0] == "Newsroom") {
		if (sectionTitleArray.length == 1) {
			sectionTitle = sectionTitleArray[sectionTitleArray.length - 1];
		}
		else {
			sectionTitle = sectionTitleArray[sectionTitleArray.length - 2];
		}
	}
	
	// Check if the main section is "Products and Services" then do this
	else if (sectionTitleArray[0] == "Products and Services") {
		
		// window.alert(sectionTitleArray.length);
		// window.alert(sectionTitleArray);
		
		switch (sectionTitleArray.length) {
			
			case 2:
				sectionTitle = sectionTitleArray[sectionTitleArray.length - 1];
				break;
				
			case 3:
				sectionTitle = sectionTitleArray[sectionTitleArray.length - 2];
				break;
				
			case 4:
				sectionTitle = sectionTitleArray[sectionTitleArray.length - 3];
				break;
				
			default:
				sectionTitle = sectionTitleArray[sectionTitleArray.length - 1];
				break;
			
		}
	}
	
	// If the main section is neither of those then do this
	else {
		if (sectionTitleArray.length == 1) {
			sectionTitle = sectionTitleArray[sectionTitleArray.length - 1];
		}
		else {
			sectionTitle = sectionTitleArray[sectionTitleArray.length - 2];
		}
	}
}

// If the sectionTitle variable is empty we have to set it to something
else {
	
	// Set it to equal the pageTitle variable if the pageTitle variable is not empty
	if (pageTitle != "") {
		sectionTitle = pageTitle;
	}
	
	// If all else fails set it to display "Overview"
	else {
		sectionTitle = "Overview";
	}						
}