<!--//Omniture pagename

/*
 11/12/04 bv
 This file is used by the LATEST version of the message boards
 hosted by Liveworld.  Currently it is only used by this url:

  http://boards.biography.com

 The LATEEST version of the Liveworld boards uses a different file structure
 with different arguments in different sequences vs the older board system,
 which as of this date are still used on boards.historychannel.com and
 boards.aetv.com.

 The full URL  grabbed and is split on the '?', seperating the root URL
 from the parameters. Then the file name is appended with the parameters
 and their corresponding values, all seperated by colons:

 Boards:page_name:arg1:val1:arg2:val2......

 Boards:Category:categoryID:1004
 Boards:Thread:threadID:3000006317:tstart:0:start:1 
 Boards:Advise:forumID:488:threadID:300006317:messageID:300041464
  
*/

var sUrl = window.location.href;

var aUrl = sUrl.split('\?');

//get the file name
var sFileName = parseFileName(aUrl[0]);
var sParams = "";

var thisPageName = "Boards:" + sFileName;

if (aUrl.length > 1)
{
 sParams = parseParams(aUrl[1]);
 thisPageName += (sParams.length>0) ? ":" + sParams : "";
}


/* FUNCS */

function parseFileName (sUrl)
{
  var aPieces = sUrl.split("/");
  var fileName  = aPieces[aPieces.length-1].split('\.');
  var sFileName = caps(fileName[0]);
	sFileName = sFileName.replace(/!/g , ":");
  return sFileName;
}

function parseParams (sParams)
{
  var sParams = sParams.replace(/[=&]/g , ":");
  return sParams;
}

function caps (fileName)
{
  var first = fileName.substring(0,1).toUpperCase();
  var rest = fileName.substring(1,fileName.length);
  fileName = first + rest;
  return fileName;
}

//-->
