var gTrackerHostName = "leedsmetropolitanuniversity.mtk1.com";
var gMemberCookie = "";
var gMemberCookieVariable = "";
if (gTrackerHostName == "benjerry.mtk1.com") {
gMemberCookie = "visiting";
gMemberCookieVariable = "pk";
} else if (gTrackerHostName == "aberlour.mtk1.com") {
gMemberCookie = "loto";
gMemberCookieVariable = "pk";
}
var flash2 = false;
var flash3 = false;
var flash4 = false;
var flash5 = false;
var flash6 = false;
var maxFlashVersion = 6;
var vb = 0;
var activex = 0;
var q = 0;
var wmp = 0;
var rp = 0;
var rp1 = 0;
var rp2 = 0;
var lu = "";
var pv = 0;
if ( navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("Win") != -1 )
{
document.write( '<SCR' + 'IPT LANGUAGE=VBScript\> \n' );
document.write( 'vb = 1 \n' );
document.write( 'on error resume next \n' );
document.write( 'activex = (IsObject(CreateObject("Forms.Label.1"))) \n' );
document.write( 'flash2 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n' );
document.write( 'flash3 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n' );
document.write( 'flash4 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n' );
document.write( 'flash5 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n' );
document.write( 'flash6 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n' );
document.write( 'q = (IsObject(CreateObject("QuickTimeCheckObject.QuickTimeCheck.1"))) \n' );
document.write( 'wmp = (IsObject(CreateObject("MediaPlayer.MediaPlayer.1"))) \n' );
document.write( 'rp1 = (IsObject(CreateObject("RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)"))) \n' );
document.write( 'rp2 = (IsObject(CreateObject("rmocx.RealPlayer G2 Control"))) \n' );
document.write( '</SCR' + 'IPT\> \n'); }
var app = escape( navigator.appName );
var av = escape( navigator.appVersion );
var amv = '';
if ( navigator.appMinorVersion ) { amv = escape(navigator.appMinorVersion); }
var ns = 0;
var opera = 0;
if ( app == "Netscape" ) { ns = 1; }
if ( navigator.userAgent.indexOf('Opera') != -1 ) { opera = 1; }
var sw = screen.width;
var sh = screen.height;
var sbd;
if ( ns ) { sbd = screen.pixelDepth; }
else { sbd = screen.colorDepth; }
var ww = 0;
var wh = 0;
if ( window.innerWidth ) { ww = window.innerWidth; wh = window.innerHeight }
else if ( document.body && document.body.clientWidth ) { ww = document.body.clientWidth; wh = document.body.clientHeight; }
var date = new Date();
var tz = date.getTimezoneOffset()/60;
if ( tz != 0 ) { tz = -1 * tz; }
var ul = "";
var sl = "";
if ( navigator.userLanguage ) { ul = navigator.userLanguage.toLowerCase(); }
else if ( window.clientInformation && window.clientInformation.userLanguage ) { ul = window.clientInformation.userLanguage.toLowerCase(); }
else if ( navigator.language ) { ul = navigator.language.toLowerCase(); }
if ( navigator.systemLanguage ) { sl = navigator.systemLanguage.toLowerCase(); }
else if ( window.clientInformation && window.clientInformation.systemLanguage ) { sl = window.clientInformation.systemLanguage.toLowerCase(); }
else if ( navigator.browserLanguage ) { sl = navigator.browserLanguage; }
var j = 0;
if ( navigator.javaEnabled() )
{
j = 1;
}
var js = 1.1;
document.write( '<scr'+'ipt language="JavaScript1.1"> var js = 1.1; </scr'+'ipt>\n' );
document.write( '<scr'+'ipt language="JavaScript1.2"> var js = 1.2; </scr'+'ipt>\n' );
document.write( '<scr'+'ipt language="JavaScript1.3"> var js = 1.3; </scr'+'ipt>\n' );
document.write( '<scr'+'ipt language="JavaScript1.4"> var js = 1.4; </scr'+'ipt>\n' );
document.write( '<scr'+'ipt language="JavaScript1.5"> var js = 1.5; </scr'+'ipt>\n' );
document.write( '<scr'+'ipt language="JavaScript1.6"> var js = 1.6; </scr'+'ipt>\n' );
document.write( '<scr'+'ipt language="JavaScript1.7"> var js = 1.7; </scr'+'ipt>\n' );
var f = escape( GetFlashVersion() );
if ( activex ) { activex = 1; }
if ( q ) { q = 1; }
else { q = GotPlugin("QuickTime"); }
if ( activex == true ) { activex = 1; }
if ( wmp ) { wmp = 1; }
else { wmp = GotPlugin("Windows Media Player"); }
if ( rp1 || rp2 ) { rp = 1; }
else { rp = GotPlugin("RealPlayer"); }
var memberid = '';
var cookiematch = gMemberCookie + "=";
if ( gMemberCookie != "" && document.cookie.indexOf(cookiematch) != -1 )
{
memberid = document.cookie.substring( document.cookie.indexOf(cookiematch)+cookiematch.length, document.cookie.length );
if ( memberid.indexOf(";") != -1 )
{
memberid = memberid.substring( 0, memberid.indexOf(";") );
}
if ( gMemberCookieVariable != "" )
{
cookiematch = gMemberCookieVariable + "=";
if ( memberid.indexOf(cookiematch) != -1 )
{
memberid = memberid.substring( memberid.indexOf(cookiematch) + cookiematch.length, memberid.length );
if ( memberid.indexOf("&") != -1 )
{
memberid = memberid.substring( 0, memberid.indexOf("&") );
}
}
else
{
memberid = "";
}
}
}
var pid = "", pt = "", pcat = "", psubcat = "";
pairs = location.search.substr(1).split("&");
for ( i = 0; i < pairs.length; i++ )
{
pair = pairs[i].split("=");
if ( pair[0] == "pid"     ) { pid     = pair[1]; }
if ( pair[0] == "pt"      ) { pt      = pair[1]; }
if ( pair[0] == "pcat"    ) { pcat    = pair[1]; }
if ( pair[0] == "psubcat" ) { psubcat = pair[1]; }
}
var promoid = "";
var category = "";
for ( i = 0; i < pairs.length; i++ )
{
pair = pairs[i].split("=");
if ( pair[0] == "promoid"      ) { promoid  = pair[1]; }
if ( pair[0] == "mtk_category" ) { category = pair[1]; }
}
r = escape( document.referrer );
u = escape( document.URL );
u2 = escape( document.URL );
pv = history.length;
if ( document.cookie.indexOf("lu=") != -1 )
{
lu = document.cookie.substring( document.cookie.indexOf("lu=")+3, document.cookie.length );
if ( lu.indexOf(";") != -1 )
{ lu = lu.substring( 0, lu.indexOf(";") ); }
}
if ( opera == 1 ) { app = "Opera"; }
ts = date.getTime();
var basket_string       = "";
magic = "z="    + ts + "&app=" + app + "&av="  + av  + "&amv=" + amv +
"&sw="  + sw + "&sh="  + sh  + "&sbd=" + sbd + "&ww="  + ww  +
"&wh="  + wh + "&tz="  + tz  + "&ul="  + ul  + "&sl="  + sl  +
"&j="   + j  + "&f="   + f   + "&q="   + q   + "&vb="  + vb  +
"&x="   + activex            + "&js="  + js  + "&wmp=" + wmp +
"&rp="  + rp + "&pk="  + memberid            + "&pid=" + pid +
"&pt="  + pt + "&pv="  + pv  + "&promoid=" + promoid +
"&r="   + r  + "&lu="  + lu  + "&u="   + u   + "&u2="  + u2  +
"&co="  + category + basket_string;
gTrackerProtocol = "http://";
if (window.location.protocol == "https:") {
gTrackerProtocol = "https://";
}
gTrackerURL = gTrackerProtocol + gTrackerHostName + "/perl/mtk1.pl";
document.write( "<table cellspacing=0 cellpadding=0><tr><td><img width=0 height=0 name=trackerimg src=\""+gTrackerURL+"?"+magic+"\"></td></tr></table>" );
SetRefCk();
function StillHere()
{
var curtime = (new Date()).getTime();
SetRefCk();
document.trackerimg.src = gTrackerURL+"?z="+curtime+"&action=stillhere&u="+u;
if ( (curtime-ts) < 120000 ) { setTimeout( "StillHere()", 8000 ); }
else if ( (curtime-ts) < 1800000 ) { setTimeout( "StillHere()", 21000 ); }
}
function GetFlashVersion()
{
var flashVersion = '0';
var regExp;
var array;
if (navigator.plugins && window.RegExp)
{
if ( navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"])
{
var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
var flashVersion = navigator.plugins["Shockwave Flash" + isVersion2].description;
regExp = new RegExp("([0-9].*)");
array = regExp.exec( flashVersion );
if ( array ) flashVersion = array[0];
}
}
if ( flashVersion == 0 )
{
for ( i = 2; i <= maxFlashVersion; i++ )
{
if ( eval("flash" + i) == true ) flashVersion = i;
}
}
return( flashVersion );
}
function GotPlugin( pluginName )
{
var numPlugins;
var i;
if ( navigator.plugins )
{
numPlugins = navigator.plugins.length
for ( i = 0; i < numPlugins; i++ )
{
if ( navigator.plugins[i].name.indexOf(pluginName) != -1 || navigator.plugins[i].description.indexOf(pluginName) != -1 )
{
return( 1 );
}
}
}
return( 0 );
}
function SetRefCk()
{
var e = new Date();
e.setTime( e.getTime() + (20*1000) );
document.cookie = "lu="+escape(document.URL)+"; expires="+e.toGMTString()+"; path=/";
setTimeout( "SetRefCk()", 18000 );
}