/* [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','5101',jdecode('home'),jdecode(''),'/5101.html','true',[],''],
	['PAGE','11701',jdecode('about+us'),jdecode(''),'/11701.html','true',[],''],
	['PAGE','11727',jdecode('moving+house'),jdecode(''),'/11727.html','true',[],''],
	['PAGE','11753',jdecode('office+relocation'),jdecode(''),'/11753.html','true',[],''],
	['PAGE','11779',jdecode('our+packing+services'),jdecode(''),'/11779.html','true',[],''],
	['PAGE','11805',jdecode('piano+moving'),jdecode(''),'/11805.html','true',[],''],
	['PAGE','11831',jdecode('storage+services'),jdecode(''),'/11831.html','true',[],''],
	['PAGE','11883',jdecode('hints+and+tips'),jdecode(''),'/11883.html','true',[],''],
	['PAGE','14701',jdecode('contact+us'),jdecode(''),'/14701.html','true',[],''],
	['PAGE','19801',jdecode('useful+links'),jdecode(''),'/19801.html','true',[],'']];
var siteelementCount=10;
theSitetree.topTemplateName='Collage';
theSitetree.paletteFamily='6683B6';
theSitetree.keyvisualId='2467';
theSitetree.keyvisualName='umzug.jpg';
theSitetree.fontsetId='403';
theSitetree.graphicsetId='461';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				name: 			'Collage',
				paletteFamily: 	'6683B6',
				keyvisualId: 	'2467',
				keyvisualName: 	'umzug.jpg',
				fontsetId: 		'403',
				graphicsetId: 	'461',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FFFFFF',
				b_color: 		'6683B6',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20090911-184616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11701',
internalId:  '',
customField: '20090619-100046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11727',
internalId:  '',
customField: '20090619-095850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11753',
internalId:  '',
customField: '20090619-100307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11779',
internalId:  '',
customField: '20090619-092336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11805',
internalId:  '',
customField: '20090619-095616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11831',
internalId:  '',
customField: '20090619-092431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20090619-085411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11883',
internalId:  '',
customField: '20090619-101104'
};
webappMappings['7008']=webappMappings['7008-4951']={
webappId:    '7008',
documentId:  '14701',
internalId:  '4951',
customField: 'language:en;country:GB;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19801',
internalId:  '',
customField: '20090619-101449'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT10IN3KWB';
var companyName   = 'Moving+in+Milton+Keynes%3F';
var htmlTitle	  = 'Moving+in+Milton+Keynes%3F';
var metaKeywords  = 'removal%2C+removals%2C+moving%2C+house+removals%2C+house+removal%2C+moving+house%2C+moving+home%2C+home+removals%2C+domestic+removal%2C+domestic+removals%2C+house+removal+milton+keynes%2C+house+removal+bedford%2C+house+removal+leighton+buzzard%2C+house+removal+olney%2C+house+removal+towcester%2C+house+removal+cranfield%2C+house+removal+buckingham%2C+house+removals+milton+keynes%2C+house+removals+bedford%2C+house+removals+leighton+buzzard%2C+house+removals+olney%2C+house+removals+towcester%2C+house+removals+cranfield%2Chouse+removals+buckingham%2C+house+removl%2C+house+removasl%2C+office+relocation%2C+office+move%2C+moving+office%2C+business+removal%2C+company+removal%2C+commercial+removal%2C+removal+company%2C+removal+companies%2C+piano+removal%2C+piano+removals%2C+piano+moving%2C++removal+companies+milton+keynes%2C+removal+companies+bedford%2C+removal+companies+leighton+buzzard%2C+removal+companies+olney%2C+removal+companies+towcester%2C+removal+companies+cranfield%2C+removal+companies+buckingham%2C+packing+services%2C+moving+in+milton+keynes%2C+moving+advice%2C+storage+in+milton+keynes%2C+milton+keynes+removal+companies%2Cdomestic+removals+bedfordshire%2Cremoval+firms+in+mk%2Csmall+removals+milton+keynes%2Chousehold+removals+buckinghamshire%2Cbedford+removal+companies%2Cremoval+firms+buckinghamshire%2Cremovals+buckinghamshire%2Cremovals+bedford%2Cremoval+milton+keynes%2Ccommercial+removals+south+east%2Chousehold+removals+south+east%2Cremoval+firms+milton+keynes%2Chousehold+moving+company%2Cresidential+moving+services%2Cmoving+to+milton+keynes%2Chouse+mover+services%2Coffice+relocation+solutions%2Coffice+relocation+services%2Cpiano+removals+southeast%2Cpiano+moving%2Cstorage+solutions+bedford%2Chousehold+storage+and+removal%2Cremoval+and+storage+buckinghamshire%2C+www.miltonkeynesremoval.co.uk';
var metaContents  = 'Need+a+removal+company+in+Milton+Keynes%3F+Free+advice+and+quotations+for+house+and+office+removals%2C+professional+service%2C+packing+service%2C+packing+materials%2C+storage+facilities.';
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();
};
