exhibit at the UK's leading advanced engineering exhibition
Enquire about exhibiting at Advanced Engineering
Boost your business growth by meeting with the most relevant decision-makers in the industry.
Simply fill in the form below, and a member of the team will be in touch to discuss your objectives and options.
Thank you for your submission
We have received your submission and a member of the team will be in touch shortly. If you have any questions please don’t hesitate to reach out to a member of the team via our Contact Us page.
document.addEventListener("DOMContentLoaded", function() {
const tab1 = document.getElementById('top-tab-1');
const tab2 = document.getElementById('top-tab-2');
// 1. If user explicitly clicks a top tab button, save that context immediately
if (tab1) {
tab1.addEventListener('click', function() {
sessionStorage.setItem('activeTabContext', 'tab1');
});
}
if (tab2) {
tab2.addEventListener('click', function() {
sessionStorage.setItem('activeTabContext', 'tab2');
});
}
// 2. Find the menu link that matches the current page URL
const currentUrl = window.location.href.split('?')[0].replace(/\/$/, ""); // Clean URL
const matchingLink = document.querySelector(`.main-navigation a[href*="${window.location.pathname}"]`);
let tabToHighlight = sessionStorage.getItem('activeTabContext');
if (matchingLink) {
const isTab1Link = matchingLink.classList.contains('menu-tab1');
const isTab2Link = matchingLink.classList.contains('menu-tab2');
// If the link explicitly belongs to only ONE tab, force that tab
if (isTab1Link && !isTab2Link) {
tabToHighlight = 'tab1';
} else if (isTab2Link && !isTab1Link) {
tabToHighlight = 'tab2';
}
// If it's a shared link (has both or neither), rely on the existing session memory
}
// 3. Fallback: If there's no memory yet (e.g. direct link/first visit), default to Tab 1
if (!tabToHighlight) {
tabToHighlight = 'tab1';
}
// 4. Save the final decision back to memory for the next page load
sessionStorage.setItem('activeTabContext', tabToHighlight);
// 5. Apply the active visual state
if (tabToHighlight === 'tab1' && tab1) {
tab1.classList.add('active-tab');
} else if (tabToHighlight === 'tab2' && tab2) {
tab2.classList.add('active-tab');
}
});