function main_nav_handler ( nav_name ) {

	if ( ! document.getElementById ) { return; }

    var regex    =  /^https?:\/\/[^\/]+\/([^\/]*)\/?.*$/;
    var matches  =  window.location.href.match( regex );
    var abbr     =  '';

	if ( ! matches ) {
		return;
	}

	abbr  =  matches[1];

	var nav_element  =  document.getElementById( nav_name + '-nav-' + abbr );

	if ( ! nav_element ) { 
		return; 
	}

	nav_element.className  =  nav_element.className + ' on';

	return true;
}


function sub_nav_handler ( nav_name ) {

	if ( ! document.getElementById ) { return; }

    var regex    =  /^https?:\/\/[^\/]*\/[^\/]*\/[^\/]*\/([^\/]*)\/?.*$/;
    var matches  =  window.location.href.match( regex );
    var abbr     =  '';

	if ( ! matches ) {
		return;
	}

	abbr  =  matches[1];

	var nav_element  =  document.getElementById( nav_name + '-nav-' + abbr );

	if ( ! nav_element ) { 
		return; 
	}

	nav_element.className  =  nav_element.className + ' on';

	return true;

}