document.observe('dom:loaded', function() {

	
	try {
		var location_sub = /([^\/]+?)\/([^\/]+?)\.asp$/;
		var folder_name, file_name, window_location;
		window.location.href.gsub(location_sub, function (match) {
			window_location = match[0];
			folder_name = match[1];
			file_name = match[2];
		});
	
	
		$$('.menu a').each(function (element) {
			$(element).readAttribute('href').gsub(location_sub, function (match) {
				if (match[0] === window_location) {
						element.addClassName('selected');
					}
				if (match[2] !== 'home') {
					
					if (match[2] === folder_name) {
						element.addClassName('selected');
					}
				}
			});
		});
		
		$$('.submenu li a').each(function (element) {
			$(element).readAttribute('href').gsub(location_sub, function (match) {
				if (match[0] === window_location) {
						element.addClassName('selected');
					}
				if (match[2] !== 'home') {
					
					if (match[2] === folder_name) {
						element.addClassName('selected');
					}
				}
			});
		});
	

	} catch (err) {}
});