//Date last modified = 100728
// Modified by = WES
// put var checks into this file for inclusion always


// determine rootname (will be product number in courses directory)
pageRef = window.location.href;
var num1 = pageRef.lastIndexOf('/') + 1;
var num2 = pageRef.lastIndexOf('.')
var rootName = pageRef.substring(num1, num2);

// determine last directory name (will be section by default)
var startPath = pageRef.substring(0, num1 - 1);
var dir1 = startPath.lastIndexOf('/') + 1;
var dirName = startPath.substring(dir1, num1 - 1);

// alert('rootName: ' + rootName +', dirName: ' + dirName);

if (typeof(lpSection)=='undefined')	var lpSection='unknown';	
// alert('lpSection = ' + lpSection);

// set section var on all pages here
if (lpSection == 'unknown') {
	lpSection = dirName;
	if (dirName == 'education') {
		lpSection = "Top";
		if (rootName == 'schedule') {
			lpSection = "schedule";
		}
		if (rootName == 'genform') {
			lpSection = "email";
		}
	}
}
lpAddVars ('page', 'Section', lpSection);
// alert('lpAddVars page/Section= ' + lpSection);


// set product num var on all courses pages
if (dirName == 'courses') {
	prodName = rootName;
	lpAddVars ('page', 'ProductNumber', prodName);
//	alert('lpAddVars page/ProductNumber= ' + prodName);
}

