function makeBreadcrumb() {

	var pathArray = window.location.pathname.split( '/' );
	var cat_home = '';

/* Set category home pages here */
if(pathArray[1] == 'About_the_ISTC') { cat_home = 'about.html'; }
if(pathArray[1] == 'Membership_Details') { cat_home = 'about_membership.html'; }
if(pathArray[1] == 'What_We_Do') { cat_home = 'what_is_technical_communications.html'; }
if(pathArray[1] == 'Publications_&_Downloads') { cat_home = 'publications.html'; }
if(pathArray[1] == 'Upcoming_Events') { cat_home = 'events_home.html'; }
if(pathArray[1] == 'Training') { cat_home = 'training_overview.html'; }
if(pathArray[1] == 'Communication_Resources') { cat_home = 'resources_home.html'; }
if(pathArray[1] == 'International') { cat_home = 'international_organisations.html'; }
if(pathArray[1] == 'Online_Shop') { cat_home = 'shop_front.php'; }

/* Set sub-category home pages here */
if(pathArray[2] == 'National_Occ_Standards') { subcat_home = 'nos_home.html'; }
if(pathArray[2] == 'Newsletter') { subcat_home = 'About_the_Newsletter.html'; }


	if(pathArray[1] == '' || pathArray[1] == 'index.html') {
		document.write('HOME');
	} else {
		if(pathArray[2].match('html') || pathArray[2].match('php')) {
			category = pathArray[1];
			page = pathArray[2];
	
			do {
				category = category.replace('_', ' ');
			} while(category.match('_'))
	
			do {
				page = page.replace('_', ' ');
			} while(page.match('_'))
	
			page = page.replace('.html', '');
			page = page.replace('.php', '');
	
			document.write('<a href="http://istc.org.uk/">HOME</a>');
			document.write(' / <a href="http://istc.org.uk/'+pathArray[1]+'/'+cat_home+'">'+category+'</a>');
			document.write(' / <a href="http://istc.org.uk/'+pathArray[1]+'/'+pathArray[2]+'">'+page+'</a>');
	
		} else {
			category = pathArray[1];
			subcategory = pathArray[2];
			page = pathArray[3];
	
			do {
				category = category.replace('_', ' ');
			} while(category.match('_'))
	
			do {
				subcategory = subcategory.replace('_', ' ');
			} while(subcategory.match('_'))
	
			do {
				page = page.replace('_', ' ');
			} while(page.match('_'))
	
			page = page.replace('.html', '');
			page = page.replace('.php', '');
	
			document.write('<a href="http://istc.org.uk/">HOME</a>');
			document.write(' / <a href="http://istc.org.uk/'+pathArray[1]+'/'+cat_home+'">'+category+'</a>');
			document.write(' / <a href="http://istc.org.uk/'+pathArray[1]+'/'+pathArray[2]+'/'+subcat_home+'">'+subcategory+'</a>');
			document.write(' / <a href="http://istc.org.uk/'+pathArray[1]+'/'+pathArray[2]+'/'+pathArray[3]+'">'+page+'</a>');
		}
	}
}

function showTabs(id) {
	if(id == 'subscriptions') {
		document.getElementById('subscribeL').setAttribute("class", "active_left");
		document.getElementById('subscribe').setAttribute("class", "active");
		document.getElementById('subscribeR').setAttribute("class", "active_right");

		document.getElementById('bookL').setAttribute("class", "tab_left");
		document.getElementById('bookM').setAttribute("class", "tab");
		document.getElementById('bookR').setAttribute("class", "tab_right");

		document.getElementById('conferenceL').setAttribute("class", "tab_left");
		document.getElementById('conferences').setAttribute("class", "tab");
		document.getElementById('conferenceR').setAttribute("class", "tab_right");

		document.getElementById('subscriptions').style.display = 'block';
		document.getElementById('book').style.display = 'none';
		document.getElementById('conference').style.display = 'none';
	}
	if(id == 'book') {
		document.getElementById('subscribeL').setAttribute("class", "tab_left");
		document.getElementById('subscribe').setAttribute("class", "tab");
		document.getElementById('subscribeR').setAttribute("class", "tab_right");

		document.getElementById('bookL').setAttribute("class", "active_left");
		document.getElementById('bookM').setAttribute("class", "active");
		document.getElementById('bookR').setAttribute("class", "active_right");

		document.getElementById('conferenceL').setAttribute("class", "tab_left");
		document.getElementById('conferences').setAttribute("class", "tab");
		document.getElementById('conferenceR').setAttribute("class", "tab_right");

		document.getElementById('subscriptions').style.display = 'none';
		document.getElementById('book').style.display = 'block';
		document.getElementById('conference').style.display = 'none';
	}
	if(id == 'conference') {
		document.getElementById('subscribeL').setAttribute("class", "tab_left");
		document.getElementById('subscribe').setAttribute("class", "tab");
		document.getElementById('subscribeR').setAttribute("class", "tab_right");

		document.getElementById('bookL').setAttribute("class", "tab_left");
		document.getElementById('bookM').setAttribute("class", "tab");
		document.getElementById('bookR').setAttribute("class", "tab_right");

		document.getElementById('conferenceL').setAttribute("class", "active_left");
		document.getElementById('conferences').setAttribute("class", "active");
		document.getElementById('conferenceR').setAttribute("class", "active_right");

		document.getElementById('subscriptions').style.display = 'none';
		document.getElementById('book').style.display = 'none';
		document.getElementById('conference').style.display = 'block';
	}
}


function categoryHighlighting() {
var pathArray = window.location.pathname.split( '/' );

	if(pathArray[1]) {

		if(pathArray[1] == 'index.html') {
			var home_link = pathArray[1].replace('.html','');
			var cat_link = document.getElementById(home_link);
		} else {
			var cat = document.getElementById(pathArray[1]);
			var cat_link = document.getElementById(pathArray[1]+'_link');

			if(cat) {
				cat.style.display = 'block';
			}
		}

	} else  {
		var home_link = 'index';
		var cat_link = document.getElementById(home_link);
	}
	
	cat_link.style.padding = '0 0 0 11px';
	cat_link.style.color = '#3a3fb9';
	cat_link.style.position = 'relative';
	cat_link.style.left = '-11px';
	cat_link.style.fontWeight = 'bold';
	cat_link.style.backgroundImage = 'url(../images/menu-marker.gif)'
	cat_link.style.backgroundRepeat = 'no-repeat';
	cat_link.style.backgroundPosition = 'bottom left';

	if(pathArray[2]) {
		var page = pathArray[2];
		page = page.replace('.html','');
		var page_link = document.getElementById(page);
		page_link.style.color = '#3A3FB9';
	}
}
function categoryHighlighting2() {
	var pathArray = window.location.pathname.split( '/' );

	if(pathArray[2]) {

		if(pathArray[2] == 'index.html') {
			var home_link = pathArray[2].replace('.html','');
			var cat_link = document.getElementById(home_link);
		} else {
			var cat = document.getElementById(pathArray[2]);
			var cat_link = document.getElementById(pathArray[2]+'_link');

			if(cat) {
				cat.style.display = 'block';
			}
		}

	} else  {
		var home_link = 'index';
		var cat_link = document.getElementById(home_link);
	}
	
	cat_link.style.padding = '0 0 0 11px';
	cat_link.style.color = '#3a3fb9';
	cat_link.style.position = 'relative';
	cat_link.style.left = '-11px';
	cat_link.style.fontWeight = 'bold';
	cat_link.style.backgroundImage = 'url(../../images/menu-marker.gif)'
	cat_link.style.backgroundRepeat = 'no-repeat';
	cat_link.style.backgroundPosition = 'bottom left';

	
	if(pathArray[3]) {
		var page = pathArray[3];
		page = page.replace('.html','');
		var page_link = document.getElementById(page);
		page_link.style.color = '#3A3FB9';
	}
}

