/* [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','8301',jdecode('Home'),jdecode(''),'/8301.html','true',[],'',''],
	['PAGE','11901',jdecode('Spanish+Property+Search'),jdecode(''),'/11901.html','true',[],'',''],
	['PAGE','66606',jdecode('Bargain+Property'),jdecode(''),'/66606.html','true',[],'',''],
	['PAGE','6001',jdecode('Overseas+Mortgages'),jdecode(''),'/6001.html','true',[],'',''],
	['PAGE','6027',jdecode('Currency+Transfers+'),jdecode(''),'/6027.html','true',[],'',''],
	['PAGE','18801',jdecode('Home+Insurance'),jdecode(''),'/18801.html','true',[],'',''],
	['PAGE','96936',jdecode('Investment+Property'),jdecode(''),'/96936.html','true',[],'',''],
	['PAGE','72606',jdecode('Contact+Us'),jdecode(''),'/72606.html','true',[],'',''],
	['PAGE','19401',jdecode('Useful+Links'),jdecode(''),'/19401.html','true',[],'',''],
	['PAGE','18501',jdecode('Spanish+Property+To+Rent'),jdecode(''),'/18501.html','false',[],'',''],
	['PAGE','5601',jdecode('Home'),jdecode(''),'/5601.html','false',[],'',''],
	['PAGE','6227',jdecode('Contact+Us'),jdecode(''),'/6227.html','false',[],'',''],
	['PAGE','5652',jdecode('Properties+To+Let'),jdecode(''),'/5652.html','false',[],'',''],
	['PAGE','47306',jdecode('Landlords'),jdecode(''),'/47306/index.html','false',[ 
		['PAGE','79806',jdecode('Our+Services'),jdecode(''),'/47306/79806.html','true',[],'',''],
		['PAGE','50032',jdecode('Landlords+responsibilities'),jdecode(''),'/47306/50032.html','true',[],'',''],
		['PAGE','50006',jdecode('Marketing+your+property'),jdecode(''),'/47306/50006.html','true',[],'',''],
		['PAGE','58606',jdecode('Deposit+Protection+Service'),jdecode(''),'/47306/58606.html','true',[],'',''],
		['PAGE','73406',jdecode('Decorating+Service'),jdecode(''),'/47306/73406.html','true',[],'','']
	],'',''],
	['PAGE','47332',jdecode('Tenants'),jdecode(''),'/47332/index.html','false',[ 
		['PAGE','74206',jdecode('Decorating+Service'),jdecode(''),'/47332/74206.html','true',[],'','']
	],'',''],
	['PAGE','89526',jdecode('No+Deposit+Renting'),jdecode(''),'/89526.html','false',[],'',''],
	['PAGE','90926',jdecode('Smart+Deposit+Enquiry'),jdecode(''),'/90926.html','false',[],'',''],
	['PAGE','72206',jdecode('Tenant+Enquiry'),jdecode(''),'/72206.html','false',[],'',''],
	['PAGE','71806',jdecode('Landlord+Enquiry'),jdecode(''),'/71806.html','false',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1766';
theSitetree.keyvisualName='zuhause.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='353';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='003390';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'003390',
				keyvisualId: 	'1766',
				keyvisualName: 	'zuhause.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'353',
				contentColor: 	'FFFFFF',
				contentBGColor: '003390',
				a_color: 		'003390',
				b_color: 		'000000',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-6399']={
webappId:    '7008',
documentId:  '71806',
internalId:  '6399',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5601',
internalId:  '',
customField: '20100424-122454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5652',
internalId:  '',
customField: '20100407-182646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47332',
internalId:  '',
customField: '20100407-184134'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '8301',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6227',
internalId:  '',
customField: '20100712-222540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6001',
internalId:  '',
customField: '20100828-205515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6027',
internalId:  '',
customField: '20100828-205500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20100828-204123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11901',
internalId:  '',
customField: '20100409-004322'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '8301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50032',
internalId:  '',
customField: '20100407-182950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73406',
internalId:  '',
customField: '20100114-010158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74206',
internalId:  '',
customField: '20100114-012522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79806',
internalId:  '',
customField: '20100407-182903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89526',
internalId:  '',
customField: '20100313-141025'
};
webappMappings['7008']=webappMappings['7008-6904']={
webappId:    '7008',
documentId:  '90926',
internalId:  '6904',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47306',
internalId:  '',
customField: '20100530-135902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90926',
internalId:  '',
customField: '20100305-202555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72206',
internalId:  '',
customField: '20100104-014333'
};
webappMappings['7008']=webappMappings['7008-6401']={
webappId:    '7008',
documentId:  '72606',
internalId:  '6401',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71806',
internalId:  '',
customField: '20100104-003848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66606',
internalId:  '',
customField: '20100530-135326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18501',
internalId:  '',
customField: '20100530-135401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18801',
internalId:  '',
customField: '20100828-205427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19401',
internalId:  '',
customField: '20100530-134744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96936',
internalId:  '',
customField: '20100408-155732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50006',
internalId:  '',
customField: '20100407-183548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72606',
internalId:  '',
customField: '20100828-204410'
};
webappMappings['7008']=webappMappings['7008-6400']={
webappId:    '7008',
documentId:  '72206',
internalId:  '6400',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58606',
internalId:  '',
customField: '20100407-183729'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT20IN2HUU';
var companyName   = 'Albany+Real+Estate+Search+LLP';
var htmlTitle	  = 'Albany+Real+Estate+Search%2C+A+R+E+S+Lettings%2CResidential+lettings%2C+For+Rent%2C+Bournemouth%2CPoole%2CChristchurch%2CDorset%2CProperty+For+Sale+Costa+del+Sol%2CMarbella%2CEstepona%2CSpain%2Coff+plan%2C+new%2Cresale%2C+inland%2Ccoastal%2C+Apartments%2C+Town+Houses%2C+Villas%2C+and+plots+of+l';
var metaKeywords  = 'Residential+lettings%2C+For+Rent%2C+Bournemouth%2CPoole%2CChristchurch%2CDorset%2CProperty+For+Sale+Costa+del+Sol%2CMarbella%2CEstepona%2CSpain%2Coff+plan%2C+new%2Cresale%2C+inland%2Ccoastal%2C+Apartments%2C+Town+Houses%2C+Villas%2C+and+plots+of+land.+';
var metaContents  = 'javascript%3A%3BSEO+Options+Albany+Real+Estate+Search%2CARES+Residential+Lettings%2CLetting+Agent%2CLetting+Agency%2CLetting+Agencies%2CLettings%2CHouses+to+Let%2CHouses+for+Rent%2CRenting%2CHouses+to+Rent%2CFlats+to+Rent%2CLettings+Agent%2CLettings+Agents%2CLettings+Agency%2CLettings+Agencies%2CLetting%2CBuy+to+Let%2CFlats+to+Let%2CRent+Flats%2CBournemouth%2CPoole%2C+Dorset%2C+For+Rent%2CBournemouth%2CPoole%2CChristchurch%2CDorset%2CProperty+For+Sale+Costa+del+Sol%2CMarbella%2CEstepona%2CSpain%2Coff+plan%2C+new%2Cresale%2C+inland%2Ccoastal%2C+Apartments%2C+Town+Houses%2C+Villas%2C+and+plots+of+land.++';
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();
};
