/* Sophus3 logging request. http://www.sophus3.com
 * Site identifier code for Lancia FR
 * Copyright (c) Sophus Ltd All rights reserved. Patent Pending.
 *
 * Change the value of tc_logging_active to switch off logging on the site.
  * Issued on 26/02/2008
 */

if (typeof tc_logging_active == 'undefined') tc_logging_active = true;

/* Custom Code by AKQA - to append the 'usePair' parameters only to the tc_page_alias if found */
var usePair = new Array();
usePair['campaignid'] = 1;
usePair['advertiserid'] = 1;
usePair['bannerid'] = 1;

if (location.search != null && location.search.length > 1 && typeof tc_page_alias != 'undefined') {
    var locSearch = location.search.substring(1);
    var fiatTcParams = locSearch.split('&');
    var fiat_tc_params = '';
    var nextAppender = (tc_page_alias.indexOf('?') == -1) ? '?' : '&';
    for (var i=0; i<fiatTcParams.length; i++) {
        if (fiatTcParams[i].indexOf('=') != -1) {
            var pair = fiatTcParams[i].split('=');
            if (usePair[pair[0]] == 1) {
                fiat_tc_params += nextAppender + fiatTcParams[i];
                nextAppender = '&'; // Change from ? to &
            }
        }
    }
    tc_page_alias += fiat_tc_params;
}
/* END */

// required configuration parameters
if (tc_logging_active) {
	tc_site_id = 82;
	tc_server_url = "fiat.touchclarity.com";
	tc_log_path = "/sophus3";
	document.write("<scr"+"ipt src='sophus3/logging-code.js'></scr"+"ipt>\n");
}

