/* sophus3 logging request. http://www.sophus3.com
 * Site identifier code for Mitsubishi Configurator.
 * Copyright (c) Sophus Ltd 2007. All rights reserved. Patent Pending.
 *
 * At the moment only UK and DE siteid included - others to come
 * Date of issue: 12/12/2007
 */

if (typeof tc_logging_active == 'undefined') 
 tc_logging_active = true;


// required configuration parameters
if (typeof tc_site_id == 'undefined')	tc_site_id = gdh_get_siteid();
tc_server_url = "mitsubishi.sophus3.com";
tc_referrer = tc_get_param("referrer");
document.write("<scr"+"ipt src='/sophus3/logging-code.js'></scr"+"ipt>\n");

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 "null";
}

function gdh_get_siteid() {
	if (tc_page_alias.indexOf("ccode=16") != -1) return 566;
	else if (tc_page_alias.indexOf("ccode=52") != -1) return 562;
	else return 567
}
