// This code extracts the filename of the current web page minus extension
// Example: if path is .../index.htm, then trimname="index"
var filename1=location.pathname.substring(location.pathname.lastIndexOf('/')+1);
var filename=filename1.substring(filename1.lastIndexOf('\\')+1);
var trimname=filename.substring(0, filename.indexOf("."));
if (trimname==""){
var trimname="index"
}
// The following code makes certain items (e.g. links on a repeating menu) appear differently if that particular link is open.
// Example: Links marked class=index will have white background, and items marked class=indexhide will be hidden, if the page index.htm is open.
document.write('<style> .'+trimname+' a:visited {background-color: white;} .'+trimname+'hide {display:none;}</style>');