/* Touch Clarity logging request - http://www.touchclarity.com - Copyright (c) Touch Clarity Ltd 2001-2002. All rights reserved. Patent Pending.
 * Change the value of tc_logging_active to switch off logging on the site.
 */

if (typeof tc_logging_active == 'undefined') 
	tc_logging_active = true;

// custom page alias code for IW and HSBC
function tc_make_alias() {
	var tc_cp, tc_bu;
	if ( (tc_cp = tc_get_param('cp')) && (tc_cp != "")) {
		return tc_cp + document.location.search;
	} else if ( (tc_bu = tc_get_param('bu')) && (tc_bu != "")) {
		return '/' + tc_bu + document.location.search;
	} else return "";
}

function tc_get_param(param) {
	var query = document.location.search.substring(1);
	var startPos = query.toLowerCase().indexOf(param.toLowerCase()+"="); 
	if (startPos> -1) { 
		startPos = startPos + param.length + 1; 
		var endPos = query.indexOf("&",startPos); 
		if (endPos == -1) endPos = query.length; 
		return unescape(query.substring(startPos,endPos)).toLowerCase(); 
	} 
	return ""; 
} 

if ((tc_myAlias = tc_make_alias()) && (tc_myAlias != "")) tc_page_alias = tc_myAlias;

// required configuration parameters
tc_site_id = 145;
tc_server_url = "hsbc.touchclarity.com";
tc_log_path = "/public/ukbusiness/script/touchclarity";
document.write("<scr"+"ipt language='JavaScript' type='text/javascript' src='"+tc_log_path+"/logging-code.js'></scr"+"ipt>\n");