﻿document.write ('<style type="text/css">.hide-me {display:none;} .show-me {display:block;}</style>');

	window.onload = show;
	
	function show(id) {
	
		var d = document.getElementById(id);
		var flag = 0;
		
		for (var i = 1; i<=7; i++) {
			
			if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).className='hide-me';}
		}
		
		if (d) {
			
			d.className='show-me';
		}
		
		var path = (window.location.pathname);
		var mkbold = document.getElementsByTagName('a');
		
		for (x=0;x<mkbold.length;x++){
			if (mkbold[x].href == window.location.href){
				mkbold[x].style.fontWeight = 'bold';
				mkbold[x].style.color = '#456F84';
				mkbold[x].style.textDecoration = 'none';
			}
		}
			
		if ((path.match('aboutus') != null) && (!d)){
			document.getElementById('smenu2').className='show-me';
		}
		
		else if  ((path.match('ourservices') != null) && (!d)){
			document.getElementById('smenu3').className='show-me';
		}
		
		else if  ((path.match('infocentre') != null) && (!d)){
			document.getElementById('smenu4').className='show-me';
		} 
		
		/*else if  ((path.match('account_finder') != null) && (!d)){
			document.getElementById('smenu5').className='show-me';
		}*/ 
		
		else if  ((path.match('contactus') != null) && (!d)){
			document.getElementById('smenu6').className='show-me';
		} 
	}


	function show2(id) {
	
		var d = document.getElementById(id);
		var flag = 0;
		
		for (var i = 1; i<=7; i++) {
			
			if (document.getElementById('s2menu'+i)) {document.getElementById('smenu'+i).className='hide-me';}
		}
		
		if (d) {
			
			d.className='show-me';
		}
		
		var path = (window.location.pathname);
		var mkbold = document.getElementsByTagName('a');
		
		for (x=0;x<mkbold.length;x++){
			if (mkbold[x].href == window.location.href){
				mkbold[x].style.fontWeight = 'bold';
				mkbold[x].style.color = '#456f84';
				mkbold[x].style.textDecoration = 'none';
			}
		}
			
		if  ((path.match('ourservices/internet-dealing') != null) && (!d)){
			document.getElementById('s2menu8').className='show-me';
		}
		/*
		else if  ((path.match('ourservices') != null) && (!d)){
			document.getElementById('smenu3').className='show-me';
		}
		
		else if  ((path.match('infocentre') != null) && (!d)){
			document.getElementById('smenu4').className='show-me';
		} 
		
		else if  ((path.match('int') != null) && (!d)){
			document.getElementById('smenu5').className='show-me';
		} */
		
		 
	}
