// 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 = document.getElementById&&navigator.userAgent.indexOf("Opera")==-1;
//Ad refresh time.
var adrefreshtime = 80000; // Reduced from 90000. 6/12/2002
var magic2=Math.floor(Math.random() * 4573285835)
function getcookie(n) {
var c=''+document.cookie;
var a=c.indexOf(n+'=');
var b=-1;
var r='';
if(a != -1) {
a += n.length+1;
b=c.indexOf(';',a);
r=(b != -1)?c.substring(a,b):c.substring(a);
}
return r;
}
// Print a page.
function printnow(page) {
if(page == null) {
page = document.location;
}
var url = "http://www.tiscali.co.uk/misc/printnow.php?page="+escape(page);
var win = window.open(url,"printnow","width=1,height=1,left="+screen.width+",top="+screen.height);
}
function relatedlinks(page) {
if(page == null) {
page = document.location;
}
var url = "http://www.tiscali.co.uk/misc/rlinks/rlinks.php?url="+escape(page);
var win = window.open(url,"_self");
}
function relatedproducts(page) {
if(page == null) {
page = document.location;
}
var url = "http://www.tiscali.co.uk/misc/rlinks/rprods.php?url="+escape(page);
var win = window.open(url,"_new");
}
// Send to a friend.
function stf(page) {
if(page == null) {
page = document.location;
}
var url = "http://www.resultslifecoaching.com.au/findtest/send_friend.php?page="+escape(page);
var win = window.open(url,"stf","width=200,height=300,statusbar=1");
}
// Load adverts.
// If noss == 1 then don't call sitestats.
// if nobanner == 1 then don't load banner(ad0)
function loadads(adtag,noss,nobanner) {
var i;
for(i = 0;i <= 5;i++) {
var nm = "ad"+i;
var w = 120;
var h = 60;
var adpos = "R"+i;
if(i == 0) {
w = 468;
}
if((i == 0) && (nobanner == 1)) {
// Don't load banner.
continue;
}
//christmas skyscraper
if(i == 5){
h = 600;
adpos = "L1";
}
var ss = (noss != 1) ? "" : "&noss=1";
var adcode = '';
var obj = null;
if(document.all) {
obj = document.all[nm];
} else if(document.getElementById) {
obj = document.getElementById(nm);
}
if(obj) {
obj.innerHTML = adcode;
}
}
}
// if mode == 1 do specific checks on whether to do refresh.
function refreshads(adtag,mode) {
if(document.all || dom) {
loadads(adtag,0,1);
if(mode == null) {
setInterval("loadads('"+adtag+"',1);",adrefreshtime);
} else {
var host = document.location.host;
var path = document.location.pathname;
if(host.match(/\.tiscali\.co\.uk/)) {
if(path.match(/^\/(business|money|motoring|travel)\//)) {
setInterval("loadads('"+adtag+"',1);",adrefreshtime);
}
}
}
}
}
//date function. added 09/09/2002
function stampaData() {
data = new Date();
me = data.getMonth() + 1;
if (me < 10) me = "0"+me;
de = data.getDate();
if (de < 10) de = "0"+de;
document.write(de+'/'+me+'/'+data.getFullYear());
}
// Browser check. added 01/08/2002
function checkbrowser() {
var ua = ""+navigator.userAgent;
var ver = parseFloat(""+navigator.appVersion);
var supported = 1;
if(ua.indexOf("MSIE") != -1) {
if(ua.indexOf("MSIE 4") != -1) {
supported = 0;
}
} else {
if(ver < 5.0) {
supported = 0;
}
}
if(!supported) {
document.write('');
}
}
function mediaplayer(id) {
var url = "http://www.tiscali.co.uk/broadband/mediaplayer/?id="+id;
var win = window.open(url,"mediaplayer","width=520,height=560,menubar=0");
win.focus();
}
function go2url(url,targ) {
var target = targ || '_self';
var args = window.location.search;
var win = window.open(url + args,target);
}
// Function that carries the querystring to the next page
function jumptourl(url,targ){
var target = targ || '_self';
var qs = window.location.search;
var qsv = qs.substring(qs.indexOf("?"), qs.length);
var win = window.open(url + qsv,target);
}
var host = "" + document.location.host;
var path = "" + document.location.pathname;
var prot = (document.location.protocol == "https:") ? "https:" : "http:";
if(host.match(/www\.tiscali\.co\.uk/)) {
if(path.match(/^(\/|\/index\.html|\/index_new_002\.html|\/index2\.php|\/\w+\/|\/\w+\/index\.html)$/)) {
var loc = ""+document.location;
if(path.match(/^(\/|\/index\.html|\/index2\.php)$/)) {
loc = path+"?refresh=true";
}
if(!path.match(/^\/products\//)) { // Added 7/4/2003
setTimeout('window.open(loc,"_self");',150*1000);
}
}
// Added 09/12/2002 DW.
// Removed 11/03/2003 DW.
//document.write('');
}
document.write('');
checkbrowser();