// used for ads
var adtag="";
var jsver = "1.0";
if (jsver.concat){ jsver = "1.2"; }
else if(document.images){ jsver = "1.1";}

function serveAd ()
{
//	var magic2=Math.floor(Math.random() * 4573285835);
//	var now = new Date();
//	var magic=now.getTime();
//	document.write('<sc'+'ript language="JavaScript1.2" src="http://ad.tiscali.com/jserver/SITE=uk.TISCALI/AREA=GAME.NETROPOLIS/AAMSZ=468x60/POS=T/LANG=en/ACC_RANDOM='+magic+'/PAGEID='+magic2+'"></sc'+'ript>');
	document.write('<iframe src="http://www.tiscali.co.uk/misc/adverts/netro_adframe.html" width="468" height="60" alt="advert" frameborder="0" border="0" scrolling="no"></iframe>');
}

function serveAdNS()
{
//To be removed at later date
}

// find out browsers JavaScript version
// storing result in jsver
var jsver = "1.0";
if (jsver.concat){ jsver = "1.2"; }
else if(document.images){ jsver = "1.1";}
var dom = 0;
// Site Stats tagging
var ss_done = false;
var ss_page = "";
function serveSS(tag)
{
	if (ss_done) return;

	if(ss_page==""){
		ss_page = new String(window.location);
	}

	ss_mark = ss_page.lastIndexOf('?');
	if (ss_mark >= 0) ss_page = ss_page.substring(0, ss_mark);

	ss_slash = ss_page.indexOf('/', 8);
	ss_site = ss_page.substring(0, ss_slash);
	referer = document.referrer;
	if (ss_site == referer.substring(0, ss_slash)) referer = "";

	ss_page = ss_page.substring(ss_slash+1, ss_page.length);
	ss_html = '<img width="1" height="1" src="http://sitestats.tiscali.co.uk/ss.php';
	ss_html += '?site=' + escape(ss_site) + '&page=' + escape(ss_page) + '&tag=' + escape(tag) + '&referer=' + escape(referer) + '&jsver=' + jsver;

	if (parseInt(navigator.appVersion) >= 4)
	{
		var date = new Date();
		ss_html += '&screen_size=' + screen.width + 'x' + screen.height;
		ss_html += '&colour_bits=' + (document.all ? screen.colorDepth : screen.pixelDepth);
		ss_html += '&java=' + navigator.javaEnabled();
ss_html += '&time=' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();
	}

	document.write(ss_html + '">');
	ss_done = true;
}
//CUSTOM STATS PAGE

// Illegal Character Strip Function
function _hbxStrip(a){
a = a.split("|").join("");a = a.split("&").join("");a = a.split("'").join("");a= a.split("#").join("");
a = a.split("$").join("");a = a.split("%").join("");a = a.split("^").join("");a= a.split("*").join("");
a = a.split(":").join("");a = a.split("!").join("");a = a.split("<").join("");a= a.split(">").join("");
a = a.split("~").join("");a = a.split(";").join("");a = a.split(",").join("");return a;}


function _doHBX(a){var b="";b=new Image();b.src=a;}
var HBXacct="DM5603166HDN62EN3";
var section="games/3rd+party/";
var file_title='';
try {
   file_title=_hbxStrip(top.document.title);
} catch (e) {}

var cont_title = section + document.domain;
cont_title = cont_title.toLowerCase();
file_title=escape(file_title.toLowerCase());

var a="//a.tiscali.co.uk/HG?hc=&hb=" + HBXacct + "&cd=1&hv=6&n="+ file_title + "&con=&vcon=/" + cont_title + "&tt=none";

_doHBX(a);

