if (window.location.href.search('/broadband/index_notbb') > 1) {
   wssTitle = 'Tiscali Broadband notbb';
}


//Custom Functions for HBX

// 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;}

var HBXpagetitle= _hbxStrip(document.title);//Strip Illegal Characters from the page title
<!--WEBSIDESTORY CODE HBX2.0 (Universal)-->
<!--COPYRIGHT 1997-2005 WEBSIDESTORY,INC. ALL RIGHTS RESERVED. U.S.PATENT No. 6,393,479B1. MORE INFO:http://websidestory.com/privacy-->
var _hbEC=0,_hbE=new Array;function _hbEvent(a,b){b=_hbE[_hbEC++]=new Object();b._N=a;b._C=0;return b;}
var hbx=_hbEvent("pv");hbx.vpc="HBX0200u";hbx.gn="a.tiscali.co.uk";

//BEGIN EDITABLE SECTION
//CONFIGURATION VARIABLES
hbx.acct="DM5603166HDN62EN3";//ACCOUNT NUMBER(S)
if((typeof(hbx_acct) != 'undefined') && (hbx_acct != '')) {
  hbx.acct += ';'+hbx_acct;
}

// Override acct code
var thisLink = window.location.href;
if ((thisLink.search('/broadband/mediaplayer/featured_iframe') > 1 || thisLink.search('/vhub/featured_iframe') > 1) || thisLink.search('/video/hub/featured_iframe') > 1 || thisLink.search('/music/music_videos/featured_iframe') > 1 || thisLink.search('/music/music-video/featured_iframe') > 1 || thisLink.search('/property/video/featured_iframe') > 1 || thisLink.search('/video/hub/film-featured_iframe') > 1 || thisLink.search('/broadband/vhub/featured_embed') > 1 || thisLink.search('/radio/new2/now_playing') > 1 || thisLink.search('/radio/new2/player') > 1) {
    hbx.acct = "DM560804D4DD";
}

if (thisLink.search('/business-services/') > 1 || thisLink.search('/businessservices/') > 1 || thisLink.search('pipex.co.uk') > 1 || thisLink.search('mypipex.net') > 1) {
    hbx.acct = 'DM560804OODZ';
}

if (typeof wssTitle == 'undefined') {
 hbx.pn=HBXpagetitle;//PAGE NAME(S)
} else {
 hbx.pn=wssTitle; //PAGE NAME(S)
}

hbx.pn = hbx.pn.replace(/\"/g,"");

if (typeof wssContent == 'undefined') {
 hbx.mlc="CONTENT+CATEGORY";//MULTI-LEVEL CONTENT CATEGORY
} else {
 hbx.mlc=wssContent;//MULTI-LEVEL CONTENT CATEGORY
}

hbx.pndef="title";//DEFAULT PAGE NAME
hbx.ctdef="full";//DEFAULT CONTENT CATEGORY

if(typeof wssLt == 'undefined') {
  //if (thisLink.match("tiscali.co.uk/{0,1}(index[^/]*)*$") || thisLink.match("tiscali.co.uk\/[^/]+/{0,1}(index\.html){0,1}$") || thisLink.match("business/features/ebay-business.html") || thisLink.match("nissan-qashqai-roadtest-1.html") || thisLink.match("products/broadband/home.html")) {
if (thisLink.match("tiscali.co.uk\/(index\.html){0,1}(.refresh=true){0,1}$") || thisLink.match("business/features/ebay-business.html") || thisLink.match("nissan-qashqai-roadtest-1.html") || thisLink.match("products/broadband/home.html") || thisLink.match("index-test.html") || thisLink.match("email/index.html")) {
    hbx.lt="auto";//LINK TRACKING
  } else {
    hbx.lt="none";
  }
} else {
  hbx.lt = wssLt;
}


if (0) {
	if (thisLink.match("tiscali.co.uk/.refresh=true") || thisLink.match("tiscali.co.uk/index.html.refresh=true")) {
	   hbx.pn += " - refresh";
	}
}

// track product links SC - 23/10/08
if(thisLink.match("tiscali.co.uk/products/.code=ZZ-NL-12UH")) {
   hbx.pn = "/products/ Intelligent button talk";
}else if(thisLink.match("tiscali.co.uk/products/.code=ZZ-NL-12UJ")) {
   hbx.pn = "/products/ Intelligent button TV";
}

hbx.dlf="!.do";

var mediajs = "";
if ((thisLink.search('/motoring/broadband/') > 1 && thisLink.search('mp_action=play') > 1) || thisLink.search('/vhub/') > 1 || thisLink.search('/events/') > 1 || thisLink.search('/(motoring|games)/video/') > 1 || thisLink.match("music/wireless/") || thisLink.match("music/music-video/") || thisLink.match("business-services/video/") || thisLink.match("/entertainment/film/video/")|| thisLink.match("entertainment/film/hub/prince-caspian/") || thisLink.match("property/video/")|| thisLink.match("/events/2008/") || thisLink.match("/film/raindance-festival/") || thisLink.match("radio/new2/player") || thisLink.match("/community/")) {
   mediajs = '<script type="text/javascript" src="//www.tiscali.co.uk/media-compressed/js/hbxmedia.js"><\/script>';
   if (document.getElementById('vid')) {
        hbx.media = "vid";
   } else if (document.getElementById('rd_player')) {
        hbx.media = "rd_player";
   } else {
        hbx.media = "player";
   }

   if (typeof hbx_mediafile != 'undefined') {
      hbx.mediafile = hbx_mediafile;
  }

}

//INSERT CUSTOM EVENTS
if (thisLink.search('results.html') > 1 || thisLink.search('results.php') > 1 || thisLink.search('exp.php')) {
// SEARCH PAGE DETECTED IN MAIN SITE

// LT
hbx.elt = 'n';

var QueryArray = location.href.split("query=");

if (QueryArray[1]!=null) {
  var ev1 = new _hbEvent("search");ev1.results = "1";
  ev1.keywords=QueryArray[1];
  ev1.attr1 = "Tiscali"  // Search mode
  var whichPageArray = location.href.split("start=");
  if (whichPageArray[1]!=null) {
     ev1.attr1 += " - " + whichPageArray[1];
  } 
  var searchpage="YES";
}}

try{
	if (top.location.href.search('tiscali.uk.shopping.com') > 1) 
	{
	// SEARCH PAGE DETECTED IN SHOPPING CHANNEL
	var QueryArray = top.location.href.split("KW=");
	  
	if (QueryArray[1]!=null) {
	  var ev1 = new _hbEvent("search");ev1.results = "1";
	  ev1.keywords=QueryArray[1];
	  ev1.attr1 = "Shopping.com"  // Search mode
	  var searchpage="YES";
	}}
}catch(e){}

    
    if (typeof searchpage == 'undefined') // NON SEARCH PAGE, LOADING LINK TRACKING HBX JS
    {
    document.write('<script type="text/javascript" src="//www.tiscali.co.uk/scripts/hbx4.js"><\/script>');
    }
    else { //LOADING STANDARD HBX JS
    document.write('<script type="text/javascript" src="//www.tiscali.co.uk/media-compressed/js/hbx.js"><\/script>');
    }
    document.write(mediajs);

<!--END WEBSIDESTORY CODE-->

function addSearchReq(frm,channel,loc) {
   // Send custom search details to HBX
   if (frm.query.value != "") {
        _hbSet("search.keywords",frm.query.value);
        _hbSet("search.attr1",frm.type.value);
        _hbSet("search.attr2",channel);
        _hbSet("search.attr3",loc);
        _hbSet("search.results",1);
        _hbSend();
        var now = new Date();
	var exitTime = now.getTime() + 500;
	while (true) {
	   now = new Date();
	   if (now.getTime() > exitTime) {
	      return;
	   }
	}
   }
}