






{
function getCpiFromPathLastSegment (path)
{
  var segments = path.split(".");

  return segments[0];
}

function getCpi (containerUrl, cpiName)
{
  var urlParts = containerUrl.split("/");

  var cpi = getCpiFromPathLastSegment(urlParts[urlParts.length - 1]);

  return cpi;
}
var cpi = getCpi(location.href, "productId");
if (cpi.length == 0)
  cpi = "unknown";
document.write('<script src="http://content.webcollage.net/_sites/tweeter/smart-button/index.jsp?productId=' + escape(cpi) + '&wccgsite=tweeter&wccgfunc=smart-button"><\/script>');
}

