var gTrackerHostName = 'www.forestrd.co.uk';
var gMemberCookie = "";
var gMemberCookieVariable = "";
if (gTrackerHostName == "www.forestrd.co.uk") {
gMemberCookie = "visiting";
gMemberCookieVariable = "pk";
} else if (gTrackerHostName == "www.forestrd.co.uk") {
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 scr;
var sw = 0;
var sh = 0;
var sbd = 0;
if ( document.screen ) { scr = document.screen; }
else if ( screen )     { scr = screen; }
if ( scr ) {
sw = screen.width;
sh = screen.height;
if ( ns ) { sbd = scr.pixelDepth; }
else      { sbd = scr.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 promoid = "", category = "";
if ( location.search )
{
pairs = location.search.substr(1).split("&");
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]; }
if ( pair[0] == "mtk_cat_param" )
{
var cat_param = pair[1];
for ( var j = 0; j < pairs.length; j++ )
{
pair = pairs[j].split("=");
if ( pair[0] == cat_param )
{
category = pair[1];
}
}
}
}
}
var tracking_form = document.forms["mtk"];
var page_name = "";
if ( tracking_form )
{
if ( typeof tracking_form.category == "object" )
category  = escape( tracking_form.category.value );
if ( typeof tracking_form.page_name == "object" )
page_name = escape( tracking_form.page_name.value );
}
r  = escape( document.referrer );
u  = 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 +
"&pv="  + pv + "&promoid=" + promoid +
"&r="   + r  + "&lu="  + lu  + "&u="   + u   +
"&co="  + category + "&pn=" + page_name + basket_string +
"&e=1";
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 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 TrackHit( page_name )
{
var name_start = magic.indexOf( "&pn=" );
var suffix_1   = magic.substring( name_start + 1, magic.length );
var name_end   = name_start + suffix_1.indexOf("&") + 1;
var old_prefix = magic.substring( 0, name_start );
var old_name   = magic.substring( name_start, name_end );
var old_suffix = magic.substring( name_end, magic.length );
var new_magic  = old_prefix + "&pn=" + escape(page_name) + old_suffix;
document.images.trackerimg.src = gTrackerURL + "?" + new_magic;
}
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 );
}