/* [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','38612',jdecode('Home+'),jdecode(''),'/38612.html','true',[],'',''],
	['PAGE','33612',jdecode('Digital+Aerials'),jdecode(''),'/33612.html','true',[],'',''],
	['PAGE','32212',jdecode('Freeview'),jdecode(''),'/32212.html','true',[],'',''],
	['PAGE','32238',jdecode('Freesat'),jdecode(''),'/32238.html','true',[],'',''],
	['PAGE','62112',jdecode('Sky+TV'),jdecode(''),'/62112.html','true',[],'',''],
	['PAGE','62312',jdecode('Other+Services'),jdecode(''),'/62312.html','true',[],'',''],
	['PAGE','10101',jdecode('Prices'),jdecode(''),'/10101.html','true',[],'',''],
	['PAGE','63512',jdecode('Hotel%2FCommercial'),jdecode(''),'/63512.html','true',[],'',''],
	['PAGE','15712',jdecode('Curent+Offers'),jdecode(''),'/15712.html','true',[],'',''],
	['PAGE','37912',jdecode('About+Us'),jdecode(''),'/37912.html','true',[],'',''],
	['PAGE','19812',jdecode('Contact+Us'),jdecode(''),'/19812.html','true',[],'',''],
	['PAGE','19212',jdecode('Tell+Us'),jdecode(''),'/19212.html','true',[],'',''],
	['PAGE','33412',jdecode('Search+This+Site'),jdecode(''),'/33412.html','true',[],'',''],
	['PAGE','9401',jdecode('More+About+Us'),jdecode(''),'/9401.html','false',[],'',''],
	['PAGE','70812',jdecode('pictures'),jdecode(''),'/70812.html','true',[],'',''],
	['PAGE','62612',jdecode('Sky+channels+list'),jdecode(''),'/62612.html','false',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Pixelportal';
theSitetree.paletteFamily='96A89B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10375';
theSitetree.graphicsetId='10539';
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: 			'Pixelportal',
				paletteFamily: 	'96A89B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10375',
				graphicsetId: 	'10539',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9401',
internalId:  '',
customField: '20100511-101652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10101',
internalId:  '',
customField: '20100513-181250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15712',
internalId:  '',
customField: '20100513-182140'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '38612',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '38612',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32238',
internalId:  '',
customField: '20100513-180730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32212',
internalId:  '',
customField: '20100513-180707'
};
webappMappings['1002']=webappMappings['1002-19212anbt10in30uq']={
webappId:    '1002',
documentId:  '19212',
internalId:  '19212anbt10in30uq',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19212',
internalId:  '',
customField: '20100513-182429'
};
webappMappings['7060']=webappMappings['7060-9d2e64af38699fca2d06a4fbb34126ed']={
webappId:    '7060',
documentId:  '70812',
internalId:  '9d2e64af38699fca2d06a4fbb34126ed',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19812',
internalId:  '',
customField: '20100511-193449'
};
webappMappings['7008']=webappMappings['7008-5322']={
webappId:    '7008',
documentId:  '19812',
internalId:  '5322',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70812',
internalId:  '',
customField: '20100513-182736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62112',
internalId:  '',
customField: '20100513-180806'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '33412',
internalId:  'search',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33412',
internalId:  '',
customField: '20100513-182531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33612',
internalId:  '',
customField: '20100513-180608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37912',
internalId:  '',
customField: '20100513-182321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38612',
internalId:  '',
customField: '20100513-195404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62612',
internalId:  '',
customField: '20100511-161156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62312',
internalId:  '',
customField: '20100513-181056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63512',
internalId:  '',
customField: '20100513-181320'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT10IN30UQ';
var companyName   = '+GET+THE+BEST+call+01793+745564+NOW%21';
var htmlTitle	  = '';
var metaKeywords  = 'Digtal+tv+aerial+installer%2Ctv+aerial+installation%2Ccabled+communications%2CRDI%2Cinstallation%2Caerial+erector%2Caerial+service%2Creception%2CSky%2Cskytv%2Csky%2B%2Csky+plus%2Ctv%2Caerial%2Csatellite%2Ctelephone%2Cswindon+area%2Cextention%2Cextension%2Cextra%2Cin+swindon%2Cpoint%2Ctelevision%2Ccommunication%2Ccable%2Ctvlink%2Ctv+link%2Cmagic+eye%2Cremote+control%2Cdish%2Cwireless%2Cphone%2Cbt%2Cntl%2Crouter%2Cadsl%2Cbro%2Cdigital+tv%2Cferndale+aerials%2Cadvanced+aerials%2CSwindon%2C+wiltshire%2Cgloucester%2Ccirencester%2Ccricklade%2Cwootton+bassett%2Chighworth%2Crepairs%2Cstfc%2Cbestofswindon%2Cbristol%2Cmatv%2Csmatv%2Cnew+build%2Cfreesat%2Cfreeview%2Cdtv%2Cdigital%2Cplasma%2Clcd%2Cwall+mount%2Cmaster+socket%2Cwireless%2Cbt+vision%2Csetup%2Cvideo%2Caudio%2Chigh+definition%2Chd%2C1080i%2C1080p%2C720p%2Cchimney%2Cstation%2Ctranscable%2Ctv+aerial+fitter%2C+Installation+TV%2CTv%2Ctv+aerials%2Caerial%2Cantenna%2Csky%2Csky%2B%2Cmultiroom%2Ctvlink%2C+telephone%2Cextention%2Cextentions%2Cextra+point%2Crepair%2C+fault%2Cfinding%2C+swindon%2Cwiltshire%2Ctelevision%2Cberkshire%2Cavon%2Ctv+aerial+installers%2Caerial++satellite%2Cgoogle%2Cyahoo%2Ctvsas%2Cdigital+tv%2Cdigital%2Crdi%2Ccai%2Ccable%2Cyell%2CThomson%2Cfirstline%2Cbview%2Cstfc%2Cfootball%2Cswindon+aerials%2Caerial+fitters%2Cdigital+switchover%2Cget+set+for+digital%2C+future+tv%2Caerial++satellites%2Csatelite%2Csatalight%2Carial%2Cairial%2Cairiel%2Cbt%2Cvirgin+media%2Cmobile%2Csky+box%2Cdigi+al%2Cfreesat%2Cbt+vision%2Cfreeview%2Cdtv%2Cbbc%2Citv%2Cchannel+5%2Cchannel+4%2Ctv+channels%2Crecepction%2Cfault+repair%2Csignal+problem%2Creception+problem%2Chd+tv%2Cfree+hd+tv%2C';
var metaContents  = 'CABLED+COMMUNICATIONS+DIGITAL+AERIALS+AND+SATELLITES+INSTALLATIONS.+TOP+QUALITY+AT+AFFORDABLE+PRICES.+Quality+installation+of++Digital+aerials%2C+All+satellite+TV%2CSky+TV+products%2C+telephone+extentions%2C+TV+links%2C+Sky%2B+Extra+points%2C+multiroom.+Fault+finding+and+repair+of+TV+aerials%2C+Sky+TV+products%2C+telephone+extentions%2C+TVlinks%2C+Sky%2B+Extra+points%2C+multiroom';
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();
};
