// ----------------------------------------
// This code has been heavily stripped down
// in light of lnurladmin and only does a few
// directories that have a need to have the 
// wss code hardcoded on the pages on which
// the wss code is included.  To see a full 
// and original listing of how this file looked
// open the megasite_OLD_date.js file
// ----------------------------------------
// By: Carl R. Bach
// Created:  March 4, 2002
// Modified:  March 6, 2002
// Modified:  October 9, 2003
// ----------------------------------------
// This assigns str to equal the directory name
// that follows the lexisnexis.com in the URL
// of the page on which it is loaded
// ----------------------------------------
var str=location.pathname
str=str.substr(1, str.length)
var pos=str.indexOf("/")
str=str.substr(0, pos)
// ----------------------------------------
// Here is where we are assigning a content category
// for use in the code that is determined based upon
// what the str, or directory, in the URL is
// ----------------------------------------

switch (str)
{
// ----------------------------------------
// Here is where we assign a content category depending
// on what the directory is in which the page being loaded
// resides.  Content categories are used to organize our 
// tracking statistics within the WSS reporting area. 
// Each WSS code can have a single content category
// up to 8-levels deep.  

case " ":
  contentcategory = "/Mega/RootLevel"
  webtrendscontentcategory = "Mega;RootLevel"
break;
case "":
  contentcategory = "/Mega/RootLevel"
  webtrendscontentcategory = "Mega;RootLevel"
break;
case "partners":
  contentcategory = "/Mega/Partners"
  webtrendscontentcategory = "Mega;Partners"
  break;
case "bcls":
  contentcategory = "/Mega/NALM/bcls"
  webtrendscontentcategory = "Mega;NALM;bcls"
  break;
case "iphrasesearch":
  contentcategory = "/Mega/NALM/iphrasesearch"
  webtrendscontentcategory = "Mega;NALM;iphrasesearch"
  break;
case "totalsearch":
  contentcategory = "/Mega/NALM/totalsearch"
  webtrendscontentcategory = "Mega;NALM;totalsearch"
  break;
case "variety":
  contentcategory = "/Mega/Community/Variety"
  webtrendscontentcategory = "Mega;Community;Variety"
  break;

// ----------------------------------------
// The following is the default content category if 
// none of the above define one for a specific directory. 
// This content category is ALERT and it should be monitored
// on a regular basis within the reporting tool as any pages 
// receiving this content category would be an indication that
// its directory is not included in the above code and it 
// more than likely should be.  Basically, a catchall to notify
// us of any missed directories.  
// ----------------------------------------
default:
  contentcategory = "/ALERT"
  webtrendscontentcategory = "ALERT";
}
// ----------------------------------------
// The following piece of code is defining what the page
// name will be in the reporting tool for WSS.  This code
// is taking everything after lexisnexis.com, including 
// directories and file names that display in the url.  
// There is still work to do here because if the url accessed
// simply ends with a directory name and has the default
// page loading without it displaying in the URL/Address Line
// of the browser, the page will get the Unknown Pages 
// page name.  This will be worked on so as to generate a 
// better page name in these instances at some time in the
// future.  See Carl if you have any problems. 
// ----------------------------------------
pagename = (location.pathname)