/*
 * Parse request (usually a file, but could be cgi), and category
 * (subfolder beneath root menu item folder - ie. /phones/business)
 */
var serverRoot = "/ccs/";
var menuExpanded = true;
var pageTitle = null;

var serverPath = window.location.pathname;
// Sitepath will have form 'phones/business/models.shtml' for example
var sitePath = serverPath.substring(serverRoot.length);

/*
 * Truncate known file extensions.  This does not assume that '.'
 * character represents a file extension delimiter exlusively.
 */
re = /\.(shtml|html|cfm|jsp|txt)$/gi;
sitePath = sitePath.replace(re, '');

/* The / character in the remaining path is replaced with : because / is
 * (unfortunately) not * a valid character in XHTML id attributes.
 */
re = /\//g;
sitePath = sitePath.replace(re, ':');

/* When javascript if off, or the Opera browser is being used, 3rd level menus are expanded.
 * Also, rollover background highlights on 2nd level menu items are removed.
 * This represents the 'Fully Expanded' view.
 */
var enabled = false;
if (navigator.userAgent.indexOf('Konqueror') == -1 && document.getElementById)
	enabled = true;
	
if (enabled)
	document.writeln('<link type="text/css" rel="stylesheet" href="/ccs/wwwresources/stylesheets/ccs_enabled.css" />');
