//alert(location.href);
var urlChunks = location.pathname.split('/');
//alert(urlChunks.length);
var filename = urlChunks[urlChunks.length-2]; // need to minus 2 because the array has 4 pieces (a piece on either side of the '/' character of which there are two)
if (location.href.indexOf('.php') > 0) {
	filename = location.pathname.substring(location.pathname.lastIndexOf('/')+1,location.pathname.lastIndexOf('.'));
}
if (location.search.indexOf('tab=') > 0) {
	filename = location.search.substring(location.search.lastIndexOf('=')+1,location.search.length);
}
if (location.hash.indexOf('tab:') > 0) {
	filename = location.hash.substring(location.hash.lastIndexOf(':')+1,location.hash.length);
}
//alert(filename);
document.write('<style type="text/css" media="screen"><!--#sub_'+filename+' { background-color: #EEE !important; text-decoration: none !important; color: #666 !important; }--></style>');

