/* Sophus3 logging request - http://www.sophus3.co.uk - Copyright (c) Sophus Ltd 2001-2008. All rights reserved. Patent Pending.
 * For Landrover and Jaguar tagworldwide brochure download enviroment */
 
if (typeof tc_logging_active == 'undefined') tc_logging_active = false;

tc_site_id = tc_get_site_id();
tc_server_url = "ford.touchclarity.com";
tc_log_path = '/touchclarity';

tc_netmining_url = tc_get_netmining_url(tc_site_id);

document.write("<scr"+"ipt language='JavaScript' type='text/javascript' src='"+tc_log_path+"/logging-code.js'></scr"+"ipt>");

if (tc_netmining_url != null) document.write("<scr"+"ipt language='JavaScript' type='text/javascript' src='"+tc_netmining_url+"'></scr"+"ipt>\n");

function tc_get_site_id() {
    tc_domain = location.hostname;
    tc_domain = tc_domain.toLowerCase();
    tc_path = location.pathname;
    tc_path = tc_path.toLowerCase();
    
    if (tc_domain.indexOf("jaguar") != -1) {
        if (tc_path.indexOf("au.php") != -1) return 300;
	else if (tc_path.indexOf("at.php") != -1) return 223;
	else if (tc_path.indexOf("be.php") != -1) return 225;
	else if (tc_path.indexOf("ch.php") != -1) return 230;
	else if (tc_path.indexOf("cz.php") != -1) return 196;
 	else if (tc_path.indexOf("de.php") != -1) return 48;
	else if (tc_path.indexOf("es.php") != -1) return 50;
	else if (tc_path.indexOf("sp.php") != -1) return 50;
        else if (tc_path.indexOf("fr.php") != -1) return 49;
	else if (tc_path.indexOf("gb.php") != -1) return 36;
	else if (tc_path.indexOf("uk.php") != -1) return 36;
	else if (tc_path.indexOf("gr.php") != -1) return 196;
	else if (tc_path.indexOf("hu.php") != -1) return 196;
        else if (tc_path.indexOf("int.php") != -1) return 387;
	else if (tc_path.indexOf("eint.php") != -1) return 387;
	else if (tc_path.indexOf("oint.php") != -1) return 387;      
     	else if (tc_path.indexOf("it.php") != -1) return 51;
	else if (tc_path.indexOf("jp.php") != -1) return 221;         
	else if (tc_path.indexOf("meast.php") != -1) return 388;
        else if (tc_path.indexOf("nl.php") != -1) return 219;
	else if (tc_path.indexOf("pl.php") != -1) return 196;
	else if (tc_path.indexOf("pt.php") != -1) return 224;
	else if (tc_path.indexOf("ru.php") != -1) return 420;
	else if (tc_path.indexOf("sa.php") != -1) return 220;
	else if (tc_path.indexOf("se.php") != -1) return 227;
	else if (tc_path.indexOf("sl.php") != -1) return 196;
	else if (tc_path.indexOf("ua.php") != -1) return 196;
	else if (tc_path.indexOf("us.php") != -1) return 218;
        else return 196;
    }
    else { if (tc_domain.indexOf("landrover") != -1) {
       if (tc_path.indexOf("au.php") != -1) return 299;
	else if (tc_path.indexOf("at.php") != -1) return 209;
	else if (tc_path.indexOf("be.php") != -1) return 198;
	else if (tc_path.indexOf("ca.php") != -1) return 204;
	else if (tc_path.indexOf("ch.php") != -1) return 214;
	else if (tc_path.indexOf("cz.php") != -1) return 195;
 	else if (tc_path.indexOf("de.php") != -1) return 44;
	else if (tc_path.indexOf("es.php") != -1) return 46;
	else if (tc_path.indexOf("sp.php") != -1) return 46;
        else if (tc_path.indexOf("fr.php") != -1) return 45;
	else if (tc_path.indexOf("gb.php") != -1) return 43;
	else if (tc_path.indexOf("uk.php") != -1) return 43;
	else if (tc_path.indexOf("gr.php") != -1) return 195;
	else if (tc_path.indexOf("hu.php") != -1) return 196;
        else if (tc_path.indexOf("int.php") != -1) return 384;
	else if (tc_path.indexOf("eint.php") != -1) return 384;
	else if (tc_path.indexOf("oint.php") != -1) return 384;          
     	else if (tc_path.indexOf("it.php") != -1) return 47;
	else if (tc_path.indexOf("jp.php") != -1) return 207;     
	else if (tc_path.indexOf("meast.php") != -1) return 385;
        else if (tc_path.indexOf("nl.php") != -1) return 201;
	else if (tc_path.indexOf("pl.php") != -1) return 195;
	else if (tc_path.indexOf("pt.php") != -1) return 203;
	else if (tc_path.indexOf("ru.php") != -1) return 217;
	else if (tc_path.indexOf("sa.php") != -1) return 202;
	else if (tc_path.indexOf("se.php") != -1) return 210;
	else if (tc_path.indexOf("sl.php") != -1) return 195;
	else if (tc_path.indexOf("ua.php") != -1) return 195;
	else if (tc_path.indexOf("us.php") != -1) return 197;
        else return 195;
    } else { return 195; } }
}


// custom function for Active Lead Generation on Land Rover UK

function tc_get_netmining_url(site) {
	if (site == 43) return "http://uk-landrover.netmining.com/";
	else return null;
}

