/* Sophus3 logging request. http://www.sophus3.com
 * Logging.js for Peugeot Europe
 * Copyright (c) Sophus3 Ltd 2001-2007. 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;

tc_site_id = tc_get_site_id();
tc_server_url = "psa.touchclarity.com";
tc_log_path = '/scripts';
//document.write("<scr"+"ipt language='JavaScript' type='text/javascript' src='"+tc_log_path+"/logging-code.js'></scr"+"ipt>");

// custom functions for PSA Portal sites
function tc_get_site_id() {
	var domain = document.location.hostname;
	domain = domain.toLowerCase();
	domain = domain.substring(domain.lastIndexOf(".")+1);
	     if (domain.toLowerCase() == "de") tc_site_id = 465;
	else if (domain.toLowerCase() == "it") tc_site_id = 464;
	else if (domain.toLowerCase() == "es") tc_site_id = 463;
	else if (domain.toLowerCase() == "fr") tc_site_id = 462;
	else if (domain.toLowerCase() == "com") tc_site_id = 462;
	else if (domain.toLowerCase() == "uk") tc_site_id = 382; 
	else if (domain.toLowerCase() == "mt") tc_site_id = 382;
	return tc_site_id;
}
