var NI_SE = "", NI_SC = "", NI_ST = "", NI_SV = "", NI_IW = 0;
var ni_TrackLinks = true;
function ni_TrackHit(server, siteCode, description, section, service, trigger, amount, adCampaign, title, url, layer, basketAdd, basketRemove, parameters, identifier, products)
{
NI_SE = server; NI_SC = siteCode; NI_ST = section; NI_SV = service;
function CB()
{
var cb="", key = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
for (i=0;i<5;i++) cb += key.charAt(Math.floor(Math.random()*52));
return cb;
}
function A(B,C)
{
if (typeof(C) != "undefined" && C != "") return "&"+B+"="+escape(C);
else return "";
}
if (typeof(NI_PAGE) != "undefined")
{
if (url.indexOf("?") > 0) url += "&ni_page=" + NI_PAGE;
else url += "?ni_page=" + NI_PAGE;
}
var p = "http"+(document.URL.indexOf('https:')==0?'s':'');
var t = new Date();
var u = p+"://"+server+"/Hit.aspx?tv=1&sc="+siteCode;
u+=A("lo",description);
u+=A("du",url);
u+=A("st",section);
u+=A("sv",service);
u+=A("ac",adCampaign);
u+=A("tr",trigger);
u+=A("ta",amount);
u+=A("ti",title);
u+=A("tz",t.getTimezoneOffset());
u+=A("ch",t.getHours());
u+=A("cb",CB());
u+=A("ru",window.document.referrer);
u+=A("js","1");
u+=A("ul",navigator.appName=="Netscape" ? navigator.language : navigator.userLanguage);
u+=A("ba", basketAdd);
u+=A("br", basketRemove);
u+=A("pm", parameters);
u+=A("id", identifier);
u+=A("pr", products);
if (typeof(screen)=="object")
{
u+=A("sr",screen.width+"x"+screen.height);
}
if (layer == 1)
{
if (NI_IW == 0) { document.write('

'); NI_IW = 1; }
else { u+=A("ir","1"); document.images.ni_tag.src = u; }
}
else
{
document.write('
'); NI_IW = 2;
}
}
/* The following function may be used any number of times in a page to load a file and track a hit
* against that file. This is useful when the file being loaded is not html,
* or is not under your control, so can't have an Silhouette tracking code inserted into it.
*
* E.g. Download catalogue
*
* If you consider clicking on the link to be the completion of a transaction, use the 'Sale' trigger
* E.g. Download catalogue
*/
function ni_LoadUrl(url, title, trigger)
{
ni_TrackHit(NI_SE, NI_SC, "", NI_ST, NI_SV, trigger, "", "", title, url, NI_IW, "", "", "", "", "");
// document.location.href = url;
}
/* The following functions are used to track links to content that cannot be coded with JavaScript
* The code attachs a JavaScript event to files which either have or do not have a certain extension
* To exclude files with HTM(L), ASP(X) or CFM extensions use the following condition in line 123:
* if (!/\/$|.htm|.asp|.cfm|\#$/.test(links[i].href))
* To include files with PDF, DOC or XLS extensions use the following condition in line 123:
* if (/\/$|.pdf|.doc|.xls|\#$/.test(links[i].href))
*/
function ni_TrackAttachment(event)
{
var link = event.srcElement || event.target;
while(link.tagName!='A') link=link.parentNode;
var linkText = link.innerHTML.replace(/\<.+?\>/g,"");
if (typeof(ni_LoadUrl)!='undefined')
ni_LoadUrl(link.href, escape(linkText))
else
{
var img = new Image(1,1);
img.src = 'http://syd.facilitatedigital.com/Hit.aspx?tv=1&sc='+ NI_SC +'&js=1&du='+escape(link.href)+'&ti='+escape(linkText);
}
}
function ni_ObserveEvent(el,evnt,fnc,capture)
{
if (el.attachEvent) el.attachEvent('on'+evnt,fnc);
else if (el.addEventListener) el.addEventListener(evnt,fnc,capture);
}
// Attach to all non webpage links
if (ni_TrackLinks)
{
var links = document.getElementsByTagName('A');
for (var i=0; i