/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

if (typeof(decodeURIComponent) == 'undefined') {
  decodeURIComponent = function(s) {
    return unescape(s);
  }
}

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return decodeURIComponent(s);
}

var POS_NODENAME=0;
var POS_ID=1;
var POS_NAME=2;
var POS_NAVIGATIONTEXT=3;
var POS_HREF=4;
var POS_ISNAVIGATION=5;
var POS_CHILDS=6;
var POS_TEMPLATENAME=7;
var POS_TARGET=8;
var theSitetree=[ 
	['PAGE','4901',jdecode('Home'),jdecode(''),'/4901.html','true',[],'',''],
	['PAGE','26023',jdecode('Sky+Helpline'),jdecode(''),'/26023.html','false',[],'',''],
	['PAGE','23823',jdecode('Ebay+Helpline'),jdecode(''),'/23823.html','false',[],'',''],
	['PAGE','17812',jdecode('Royal+Mail'),jdecode(''),'/17812.html','false',[],'',''],
	['PAGE','12490',jdecode('Driving+Licence+Replacement'),jdecode(''),'/12490.html','false',[],'',''],
	['PAGE','18512',jdecode('Tax+Credit+Helpline'),jdecode(''),'/18512.html','false',[],'',''],
	['PAGE','12464',jdecode('Child+Benefits+Helpline'),jdecode(''),'/12464.html','false',[],'',''],
	['PAGE','25523',jdecode('nPower'),jdecode(''),'/25523.html','false',[],'',''],
	['PAGE','12412',jdecode('Couriers+%26+Tracking'),jdecode(''),'/12412.html','false',[],'',''],
	['PAGE','27323',jdecode('AA+Roadwatch'),jdecode(''),'/27323.html','false',[],'',''],
	['PAGE','8212',jdecode('Search+a+Number'),jdecode(''),'/8212.html','true',[],'',''],
	['PAGE','5030',jdecode('Contact+Us'),jdecode(''),'/5030.html','true',[],'',''],
	['PAGE','27823',jdecode('Amazon+Helpline'),jdecode(''),'/27823.html','false',[],'',''],
	['PAGE','29123',jdecode('Orange+Helpline'),jdecode(''),'/29123.html','false',[],'',''],
	['PAGE','30323',jdecode('O2+Helpline'),jdecode(''),'/30323.html','false',[],'',''],
	['PAGE','30349',jdecode('Virgin+Helpline'),jdecode(''),'/30349.html','false',[],'',''],
	['PAGE','31223',jdecode('Facebook+Helpline'),jdecode(''),'/31223.html','false',[],'',''],
	['PAGE','31823',jdecode('Zanussi'),jdecode(''),'/31823.html','false',[],'',''],
	['PAGE','31849',jdecode('X-Box'),jdecode(''),'/31849.html','false',[],'',''],
	['PAGE','31875',jdecode('Whirlpool'),jdecode(''),'/31875.html','false',[],'',''],
	['PAGE','32923',jdecode('British+Airways'),jdecode(''),'/32923.html','false',[],'',''],
	['PAGE','35823',jdecode('Vodafone'),jdecode(''),'/35823.html','false',[],'',''],
	['PAGE','35849',jdecode('T-Mobile'),jdecode(''),'/35849.html','false',[],'',''],
	['PAGE','35875',jdecode('National+Rail'),jdecode(''),'/35875.html','false',[],'',''],
	['PAGE','35901',jdecode('Natwest'),jdecode(''),'/35901.html','false',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Global';
theSitetree.paletteFamily='333399';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='87';
theSitetree.graphicsetId='105';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Global',
				paletteFamily: 	'333399',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'87',
				graphicsetId: 	'105',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'242E8A',
				b_color: 		'FF9900',
				c_color: 		'000000',
				d_color: 		'EAEAEA',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-4799']={
webappId:    '7008',
documentId:  '5030',
internalId:  '4799',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20100126-163846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8212',
internalId:  '',
customField: '20100125-155328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23823',
internalId:  '',
customField: '20100415-105006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5030',
internalId:  '',
customField: '20100125-155350'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12412',
internalId:  '',
customField: '20100419-135804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29123',
internalId:  '',
customField: '20100415-101916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12464',
internalId:  '',
customField: '20100415-101901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12490',
internalId:  '',
customField: '20100415-101820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17812',
internalId:  '',
customField: '20100415-101754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18512',
internalId:  '',
customField: '20100415-101841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25523',
internalId:  '',
customField: '20100419-140338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26023',
internalId:  '',
customField: '20100415-101739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27323',
internalId:  '',
customField: '20091223-092429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27823',
internalId:  '',
customField: '20100415-105023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30323',
internalId:  '',
customField: '20100415-101935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30349',
internalId:  '',
customField: '20100415-101952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31223',
internalId:  '',
customField: '20100419-135116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31823',
internalId:  '',
customField: '20100415-102023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31849',
internalId:  '',
customField: '20100415-105038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31875',
internalId:  '',
customField: '20100301-145401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32923',
internalId:  '',
customField: '20100415-105235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35901',
internalId:  '',
customField: '20100423-120349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35875',
internalId:  '',
customField: '20100423-120357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35849',
internalId:  '',
customField: '20100423-120335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35823',
internalId:  '',
customField: '20100423-120327'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT10IN31KF';
var companyName   = 'Customer+Service+Helplines+%28UK%29';
var htmlTitle	  = '';
var metaKeywords  = '+DVLA+Licence+Renewals%2C+DVLA%2C+Licence+Replacement%2C+Tax+Credit+Helpline%2C+Tax+Credit%2C+UPS+Tracking+Helpline%2C+UPS+Customer+Service+Number%2C+TNT+Tracking+Helpline%2C+TNT+Customer+Service+Number%2C+DHL+Tracking+Helpline%2C+DHL+Customer+Service+Number%2C+Child+Benefits+Helpline%2C+Child+Tax+Benefits+Customer+Service+Number%2C+Child+Tax+Benefits+Number%2C+%2C+DVLA+Driving+Licence+Renewal%2C+DVLA+Driving+Licence+Replacement%2C+Customer+Service+Helplines++Telephone+Numbers%2C+UPS%2C+TNT%2C+DHL%2C+Tracking%2C+Driving+Licence+replacement++Renewal%2C+Child+Benefit%2C+BT.+AA+Roadwatch+number+%2C+AA+Roadwatch%2C+AA+Roadwatch+Helpline%09%0D%0AAbbey+National%09Customer+Service%2C+Abbey+National+Customer+Service+Number%2C+Abbey+Helpline%0D%0AAir+India+Customer+Service%2C+Air+India+Customer+Service+Number+%0D%0AAlliance+%26+Leicester+Customer+Service%2C+Alliance+%26+Leicester+Customer+Service+Number%0D%0AAllied+Irish+Bank%09+Customer+Service%2C+Allied+Irish+Bank+Customer+Service+Number%0D%0AAmazon+Customer+Service%2C+Amazon+Customer+Service+Number%0D%0AAOL+Customer+Service%2C+AOL+Customer+Service+Number%0D%0AApple+Customer+Service%2C+Apple+Customer+Service+Number%0D%0AArgos+Customer+Service%2C+Argos+Customer+Service+Number%0D%0AAsda+Customer+Service%2C+Asda+Customer+Service+Number%0D%0AAtlantic+Electric+%26+Gas+Customer+Service%2C+Atlantic+Electric+%26+Gas+Customer+Service+Number%0D%0AB%26Q+Customer+Service%2C+B%26Q+Customer+Service+Number%0D%0ABank+of+Scotland+Customer+Service%2C+Bank+of+Scotland+Customer+Service+Number%0D%0ABarclays+Customer+Service%2C+Barclays+Customer+Service+Number%0D%0ABritish+Airways+Customer+Service%2C+British+Airways+Customer+Service+Number%0D%0ABritish+Gas+Customer+Service%2C+British+Gas+Customer+Service+Number%0D%0ABurtons+Customer+Service%2C+Burtons+Customer+Service+Number%0D%0AChild+Benefit+Office+Number%2C+Child+Benefit+Number%2C++Child+Benefit+Helpline+Number%0D%0ACo-op+Customer+Service%2C+Co-op+Customer+Service+Number%0D%0ACo-operative+Bank+Plc+Customer+Service%2C+Co-operative+Bank+Plc+Customer+Service+Number%0D%0ADHL+Customer+Service%2C+DHL+Customer+Service+Number%0D%0ADHL+Tracking%2C+DHL+Customer+Services%2C+DHL+Customer+Service+Number%0D%0ADo-It-All+%2F+Focus+Customer+Service%2C+Do-It-All+%2F+Focus+Customer+Service+Number%0D%0ADVLA+Licence+Hepline%2C++DVLA+Licence+replacement%2C+Driving+Licence%2C+Lost+Licence%2C+DVLA+Number%0D%0AEasyJet++Customer+Service%2C+EasyJet++Customer+Service+Number%0D%0AEbay+Customer+Service%2C+Ebay+Customer+Service+Number%0D%0AEDF+Customer+Service%2C+EDF+Customer+Service+Number%0D%0AE-on+Customer+Service%2C+E-on+Customer+Service+Number%0D%0AFacebook+Customer+Service%2C+Facebook+Customer+Service+Number%0D%0AGood+energy+Customer+Service%2C+Good+energy+Customer+Service+Number%0D%0AHalifax+Customer+Service%2C+Halifax+Customer+Service+Number%0D%0AHomebase+Customer+Service%2C+Homebase+Customer+Service+Number%0D%0AHSBC+Customer+Service%2C+HSBC+Customer+Service+Number%0D%0ALloyds+Customer+Service%2C+Lloyds+Customer+Service+Number%0D%0AMarks+%26+Spencer+Customer+Service%2C+Marks+%26+Spencer+Customer+Service+Number%0D%0AMBNA+Europe+Customer+Service%2C+MBNA+Europe+Customer+Service+Number%0D%0ANational+Lottery+Customer+Service%2C+National+Lottery+Helpline%2C+National+Lottery+Customer+Service+Number%0D%0ANational+Rail+Customer+Service%2C+National+Rail+Customer+Service+Number%0D%0ANatwest+Customer+Service%2C+Natwest+Customer+Service+Number%0D%0AO2+Customer+Service%2C+O2+Customer+Service+Number%2C+O2+Helpline%0D%0AOrange++Customer+Service%2C+Orange++Customer+Service+Number%0D%0APassport+Helpline+Customer+Service%2C+Passport+Helpline+Customer+Service+Number%0D%0APC+World+Customer+Service%2C+PC+World+Customer+Service+Number%0D%0ARAC+Customer+Service%2C+RAC+Helpline%2C+RAC+Customer+Service+Number%0D%0ARiver+Island+Customer+Service%2C+River+Island+Customer+Service+Number%0D%0ARoyal+Bank+of+Scotland+Customer+Service%2C+Royal+Bank+of+Scotland+Customer+Service+Number%2C+RBS+Customer+Service%2C+RBS+Customer+Service+Number%0D%0ARoyal+Mail+Customer+Service%2C+Royal+Mail+Customer+Service+Number%0D%0ARyan+Air+Customer+Service%2C+Ryan+Air+Customer+Service+Number%0D%0AScottish+hydro+electric+Customer+Service%2C+Scottish+hydro+electric+Customer+Service+Number%0D%0AScottish+power+Customer+Service%2C+Scottish+power+Customer+Service+Number%0D%0ASky+Customer+Service%2C+Sky+Customer+Service+Number%2C+Sky+Helpline%2C+Sky+Helpline+Number%0D%0ASony+Customer+Service%2C+Sony+Customer+Service+Number%0D%0ATax+Credit+Helpline%2C+Tax+Credits%2C+Tax+Credits+Number%2C+Tax+Credit+Number%2C+Tac+Credit%2C+Tax+Credit+Office%2C+%0D%0ATesco+Customer+Service%2C+Tesco+Customer+Service+Number%0D%0AThomas+Cook+Customer+Service%2C+Thomas+Cook+Customer+Service+Number%0D%0AThomsons+Customer+Service%2C+Thomsons+Customer+Service+Number%0D%0AT-Mobile+Customer+Service%2C+T-Mobile+Customer+Service+Number%0D%0ATwitter+Customer+Service%2C+Twitter+Number%2C+Twitter+UK+Number%2C+Twitter+Customer+Service+Number%0D%0AUBS+Customer+Service%2C+UBS+Customer+Service+Number%0D%0AUPS+Customer+Service%2C+UPS+Tracking%2C+UPS+Helpline%2C+UPS+Customer+Service+Number+%0D%0AUtilita+Customer+Service%2C+Utilita+Customer+Service+Number%0D%0AVirgin+Customer+Service%2C+Virgin+Customer+Service+Number%0D%0AVodafone+Customer+Service%2C+Vodafone+Customer+Service+Number%0D%0AXbox+live+Customer+Service%2C+Xbox+live+Customer+Service+Number%2C+Xbox+cancelation%2C+%0D%0A';
var metaContents  = 'Customer+Service+Helplines+to++DVLA+Licence+Renewals%2C+Child+Benefit+Helpline+number%2C+UPS%2C+Post+Office+and+Royal+Mail+Customer+Service+departments.+';
theSitetree.getById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		if (ar[i][POS_ID] == id){
			return ar[i];
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getParentById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		for (var j = 0; j < ar[i][POS_CHILDS].length; j++) {
			if (ar[i][POS_CHILDS][j][POS_ID] == id) {
				// child found
				return ar[i];
			}
			var result=this.getParentById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getName = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAME];
	}
	return null;
};

theSitetree.getNavigationText = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAVIGATIONTEXT];
	}
	return null;
};

theSitetree.getHREF = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_HREF];
	}
	return null;
};

theSitetree.getIsNavigation = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_ISNAVIGATION];
	}
	return null;
};

theSitetree.getTemplateName = function(id, lastTemplateName, ar) {
	if (typeof(lastTemplateName) == 'undefined'){
		lastTemplateName = this.topTemplateName;
	}
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		var actTemplateName = ar[i][POS_TEMPLATENAME];
		if (actTemplateName == ''){
			actTemplateName = lastTemplateName;
		}
		if (ar[i][POS_ID] == id) {
			return actTemplateName;
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getTemplateName(id, actTemplateName, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getByXx = function(lookup, xx, ar) {
    if (typeof(ar) == 'undefined'){
    	ar = this;
    }
    for (var i=0; i < ar.length; i++) {
        if (ar[i][xx] == lookup){
        	return ar[i];
        }
        if (ar[i][POS_CHILDS].length > 0) {
        	var result=this.getByXx(lookup, xx, ar[i][POS_CHILDS]);
            if (result != null){
                return result;
               }
        }
    }
    return null;
};

function gotoPage(lookup) {
	if(__path_prefix__ == "/servlet/CMServeRES" && typeof (changePage) == 'function'){
		changePage(lookup);
		return;
	}
	var page = theSitetree.getHREF(lookup);
	if (!page) {
		var testFor = [ POS_NAME, POS_NAVIGATIONTEXT ];
		for (var i=0 ; i < testFor.length ; i++) {
			var p = theSitetree.getByXx(lookup, testFor[i]);
			if (p != null) {
				page = p[POS_HREF];
				break;
			}
		}
	}
	document.location.href = (new URL(__path_prefix__ + page, true, true)).toString();
};
