//SmartAssist module - do not remove

function getCookie(Name) {
  var search = Name + "="
  var returnVal = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { 
      offset += search.length
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      returnVal = unescape(document.cookie.substring(offset, end))
      }
   }
  return returnVal;
}

// get the users referrer
var currLocation = location.href;

// get existing cookie if exists
path = getCookie("psam");
path += "###" + currLocation;

// take existing path and split into an array
var aPath = new Array();
aPath = path.split("###");

// Populate the last 10 paths back to the cookie
newPath = "";

// if the path array is greater than 10 we need to start one step forward
startPoint = 0;
if (aPath.length > 10) startPoint = aPath.length - 10;

for (i=startPoint;i<aPath.length;i++) {
	if (aPath[i] != "")	newPath += "###" + aPath[i];
}
//alert(newPath);
document.cookie = "psam=" + newPath + ";path=/; domain=ibm.com;";
