/* [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 theSitetree=[ 
	['PAGE','9401',jdecode('Home'),jdecode(''),'/9401.html','true',[],''],
	['PAGE','21401',jdecode('UVO+Offers'),jdecode(''),'/21401.html','false',[],''],
	['PAGE','43712',jdecode('Our+vehicles'),jdecode(''),'/43712.html','true',[],''],
	['PAGE','45912',jdecode('Our+Drivers'),jdecode(''),'/45912.html','false',[],''],
	['PAGE','9452',jdecode('About+Us'),jdecode(''),'/9452.html','true',[],''],
	['PAGE','20701',jdecode('Our+Promise'),jdecode(''),'/20701.html','true',[],''],
	['PAGE','21201',jdecode('GreenerOil.co.uk++Offers'),jdecode(''),'/21201.html','true',[],''],
	['PAGE','39012',jdecode('GreenerDiesel+Products'),jdecode(''),'/39012.html','true',[],''],
	['PAGE','39612',jdecode('Distribution+%26+Sales'),jdecode(''),'/39612.html','true',[],''],
	['PAGE','40512',jdecode('FAQ%26%23x27%3Bs'),jdecode(''),'/40512.html','true',[],''],
	['PAGE','37438',jdecode('How+is+GreenerDiesel+made%3F'),jdecode(''),'/37438.html','true',[],''],
	['PAGE','17301',jdecode('Why+Use+GreenerDiesel%3F'),jdecode(''),'/17301.html','true',[],''],
	['PAGE','16201',jdecode('Our+Business+Policy'),jdecode(''),'/16201.html','true',[],''],
	['PAGE','24501',jdecode('Terms+and+Conditions'),jdecode(''),'/24501.html','true',[],''],
	['PAGE','16701',jdecode('How+To+Find+Us'),jdecode(''),'/16701.html','true',[],''],
	['PAGE','18401',jdecode('e-mail+Oil+or+Diesel+Orders'),jdecode(''),'/18401.html','true',[],''],
	['PAGE','35912',jdecode('UVO+Collection+Certificate'),jdecode(''),'/35912.html','true',[],''],
	['PAGE','40912',jdecode('Environment+Agency+Permit'),jdecode(''),'/40912.html','true',[],''],
	['PAGE','41512',jdecode('News'),jdecode(''),'/41512.html','true',[],''],
	['PAGE','19901',jdecode('Energy+Saving+Trust+Advice'),jdecode(''),'/19901.html','false',[],''],
	['PAGE','19701',jdecode('Mini+Cooper+Diesel'),jdecode(''),'/19701.html','false',[],''],
	['PAGE','19101',jdecode('Our+Links'),jdecode(''),'/19101.html','true',[],''],
	['PAGE','26612',jdecode('Please+complete+our+guestbook'),jdecode(''),'/26612.html','false',[],''],
	['PAGE','27112',jdecode('Our+Blog'),jdecode(''),'/27112.html','false',[],'']];
var siteelementCount=24;
theSitetree.topTemplateName='Global';
theSitetree.paletteFamily='006600';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='89';
theSitetree.graphicsetId='104';
theSitetree.contentColor='006633';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				name: 			'Global',
				paletteFamily: 	'006600',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'89',
				graphicsetId: 	'104',
				contentColor: 	'006633',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'176B03',
				b_color: 		'669900',
				c_color: 		'000000',
				d_color: 		'E0EEE3',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9401',
internalId:  '',
customField: '20090208-190427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9452',
internalId:  '',
customField: '20090830-181517'
};
webappMappings['7008']=webappMappings['7008-1727']={
webappId:    '7008',
documentId:  '18401',
internalId:  '1727',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18401',
internalId:  '',
customField: '20080607-061825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40512',
internalId:  '',
customField: '20090321-084001'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '43712',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16201',
internalId:  '',
customField: '20090321-084900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19101',
internalId:  '',
customField: '20080615-213414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20090321-084513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16701',
internalId:  '',
customField: '20081116-155116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19701',
internalId:  '',
customField: '20080615-081334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19901',
internalId:  '',
customField: '20080607-060529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20701',
internalId:  '',
customField: '20090208-170810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21201',
internalId:  '',
customField: '20081116-155210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21401',
internalId:  '',
customField: '20080611-125022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24501',
internalId:  '',
customField: '20080615-081023'
};
webappMappings['1002']=webappMappings['1002-26612anbt20in2eif']={
webappId:    '1002',
documentId:  '26612',
internalId:  '26612anbt20in2eif',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26612',
internalId:  '',
customField: '20080612-140238'
};
webappMappings['7050']=webappMappings['7050-835']={
webappId:    '7050',
documentId:  '27112',
internalId:  '835',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27112',
internalId:  '',
customField: '20080615-081525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35912',
internalId:  '',
customField: '20080720-091908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40912',
internalId:  '',
customField: '20090304-132543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37438',
internalId:  '',
customField: '20090321-084236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39012',
internalId:  '',
customField: '20090321-083220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39612',
internalId:  '',
customField: '20090321-083720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41512',
internalId:  '',
customField: '20090305-114218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43712',
internalId:  '',
customField: '20091010-101443'
};
webappMappings['7060']=webappMappings['7060-2490c8afe4d8f73c9e6edb51993a9067']={
webappId:    '7060',
documentId:  '43712',
internalId:  '2490c8afe4d8f73c9e6edb51993a9067',
customField: 'language:en;country:GB;'
};
webappMappings['7060']=webappMappings['7060-8efc385d19edefca899c2af1be10db44']={
webappId:    '7060',
documentId:  '45912',
internalId:  '8efc385d19edefca899c2af1be10db44',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45912',
internalId:  '',
customField: '20091010-194619'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT20IN2EIF';
var companyName   = 'GreenerDiesel.com';
var htmlTitle	  = 'GreenerDiesel.com+%28UK%29+Limited';
var metaKeywords  = 'greendiesel%2C+greenerdiesel%2C+uk%2C+diesel%2C+green%2C+petrol%2C+cheap%2C+renewable+energy%2C+biodiesel%2C+oil%2C+soya%2C+vegetable%2C+cereals%2C+cereals%2C+oils%2C+United%2C+Kingdom%2C+save%2C+cost%2C+costs%2C+least%2C+expensive%2C+cheaper%2C+low%2C+lower%2C+environment%2C+environmentally%2C+friendly%2C+priced%2C+price%2C+prices%2C++planet%2C+save%2C+the%2C+sustainable%2C+travel%2C+recycle%2C+recycling%2C+encourage%2C+hydrocarbons%2C+low%2C+lower%2C+carbon%2C+carbons%2C+emission%2C+emissions%2C+fuel%2C+fuels%2C+pure%2C+fired%2C+central%2C+heating%2C+powered%2C+power%2C+fire%2C+business%2C+local%2C+transport%2C+businesses%2C+support%2C+taxi%2C+cars%2C+car%2C+taxis%2C+lorries%2C+lorry%2C+transporter%2C+save%2C+world%2C+planet%2C+light%2C+graceful%2C+safe%2C+efficient%2C+reliable%2C+long%2C+lasting%2C+efficiently%2C+by-products%2C+products%2C+product%2C+petrol%2C+greenerfuel%2C+greenpetrol%2C+sunflowerdiesel%2C+fuel%2C+petrol%2C+britishbiopetrol%2C+britishbiopetrol%2Cenglishbiodiesel%2C+englishbiofuel%2C+englishbiofuels%2C+englishbiogas%2C+bioenergysuppliers%2C++britishbiofuels+britishbiofuel';
var metaContents  = 'We+create+GreenerDiesel';
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();
};
