/* [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','108701',jdecode('TANYAS+WORLD'),jdecode(''),'/108701.html','true',[],'',''],
	['PAGE','10001',jdecode('Welcome'),jdecode(''),'/10001.html','true',[],'',''],
	['PAGE','11301',jdecode('Tanya%26%23x27%3Bs+profile'),jdecode(''),'/11301.html','true',[],'',''],
	['PAGE','11501',jdecode('Meet+the++Larrigans+'),jdecode(''),'/11501.html','true',[],'',''],
	['PAGE','55501',jdecode('The+diary+and+news'),jdecode(''),'/55501.html','false',[],'',''],
	['PAGE','139501',jdecode('BHS+DRAW+THE+LINE'),jdecode(''),'/139501.html','true',[],'',''],
	['PAGE','85901',jdecode('UKCC+Coaching'),jdecode(''),'/85901.html','true',[],'',''],
	['PAGE','14501',jdecode('Para+Equestrian+info'),jdecode(''),'/14501.html','true',[],'',''],
	['PAGE','14301',jdecode('Regional+Foundation+Squads'),jdecode(''),'/14301.html','true',[],'',''],
	['PAGE','11527',jdecode('Lessons+all+levels'),jdecode(''),'/11527.html','true',[],'',''],
	['PAGE','150901',jdecode('The+Book+%26+DVD'),jdecode(''),'/150901.html','true',[],'',''],
	['PAGE','11553',jdecode('DIY+%26+Livery+update'),jdecode(''),'/11553.html','true',[],'',''],
	['PAGE','11353',jdecode('Maywood+Courses'),jdecode(''),'/11353.html','true',[],'',''],
	['PAGE','11701',jdecode('Animals+for+PR+%26+media+work'),jdecode(''),'/11701.html','true',[],'',''],
	['PAGE','13001',jdecode('Displays+available'),jdecode(''),'/13001.html','true',[],'',''],
	['PAGE','11327',jdecode('Meet+Son+of+Idolo+-+Sonny'),jdecode(''),'/11327.html','true',[],'',''],
	['PAGE','11605',jdecode('Animals+who+shaped+my+life'),jdecode(''),'/11605.html','false',[],'',''],
	['PAGE','85801',jdecode('Starring+in+Carmen+%26%23x27%3B08%21'),jdecode(''),'/85801.html','true',[],'',''],
	['PAGE','11727',jdecode('A++quick+look+back+at+%26%23x27%3B07'),jdecode(''),'/11727.html','false',[],'',''],
	['PAGE','11579',jdecode('Patsys+Barn'),jdecode(''),'/11579.html','false',[],'',''],
	['PAGE','10130',jdecode('Enquiry+form+and+contact+details'),jdecode(''),'/10130.html','true',[],'',''],
	['PAGE','11101',jdecode('The+Photos+album'),jdecode(''),'/11101.html','false',[],'',''],
	['PAGE','10104',jdecode('Sign+the+Guestbook+'),jdecode(''),'/10104.html','true',[],'',''],
	['PAGE','12801',jdecode('Links'),jdecode(''),'/12801.html','true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Neon';
theSitetree.paletteFamily='6699CC';
theSitetree.keyvisualId='902';
theSitetree.keyvisualName='feder.jpg';
theSitetree.fontsetId='160';
theSitetree.graphicsetId='186';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Neon',
				paletteFamily: 	'6699CC',
				keyvisualId: 	'902',
				keyvisualName: 	'feder.jpg',
				fontsetId: 		'160',
				graphicsetId: 	'186',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'6699CC',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-10104anbt20in2yy6']={
webappId:    '1002',
documentId:  '10104',
internalId:  '10104anbt20in2yy6',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-610']={
webappId:    '7008',
documentId:  '10130',
internalId:  '610',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20101005-214511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10130',
internalId:  '',
customField: '20080402-225114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10104',
internalId:  '',
customField: '20080511-223651'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '108701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150901',
internalId:  '',
customField: '20100919-234534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139501',
internalId:  '',
customField: '20101005-211126'
};
webappMappings['7060']=webappMappings['7060-23fc88ffd4cfda45a169798673b034b5']={
webappId:    '7060',
documentId:  '11101',
internalId:  '23fc88ffd4cfda45a169798673b034b5',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85901',
internalId:  '',
customField: '20101005-212305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85801',
internalId:  '',
customField: '20100909-230345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11353',
internalId:  '',
customField: '20100910-082044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11327',
internalId:  '',
customField: '20100912-005232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11101',
internalId:  '',
customField: '20100907-150156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11301',
internalId:  '',
customField: '20100920-002153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11553',
internalId:  '',
customField: '20100912-235227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11701',
internalId:  '',
customField: '20100912-215627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11527',
internalId:  '',
customField: '20101005-213815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11501',
internalId:  '',
customField: '20100920-003347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55501',
internalId:  '',
customField: '20100912-220421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13001',
internalId:  '',
customField: '20100911-222548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11579',
internalId:  '',
customField: '20080408-221917'
};
webappMappings['7008']=webappMappings['7008-473']={
webappId:    '7008',
documentId:  '11353',
internalId:  '473',
customField: 'language:en;country:GB;'
};
webappMappings['7008']=webappMappings['7008-474']={
webappId:    '7008',
documentId:  '11553',
internalId:  '474',
customField: 'language:en;country:GB;'
};
webappMappings['7008']=webappMappings['7008-475']={
webappId:    '7008',
documentId:  '13001',
internalId:  '475',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14501',
internalId:  '',
customField: '20101005-213411'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '108701',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20100913-155809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12801',
internalId:  '',
customField: '20090217-065746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11605',
internalId:  '',
customField: '20080410-075752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11727',
internalId:  '',
customField: '20080408-222104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108701',
internalId:  '',
customField: '20101005-211017'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT20IN2YY6';
var companyName   = 'TANYA+LARRIGAN+EQUESTRIAN+PRODUCTIONS';
var htmlTitle	  = 'Meet+International+Trainer+Tanya+Larrigan++her+Amazing+Horses+including+The+Mini+Marvels%C2%AE';
var metaKeywords  = 'tanya+larrigan%2C+mini+marvels+miniature+horses%2C+classical++dressage+trainer%2C+international+rider%2C+magic+of+the+horse%2C+equestrian+displays%2C++paul+maccartney%2C+miniature+horses%2C+riding+holidays%2C++liveries%2C+childrens+soft+toys%2C+kent%2C+natural+horsemanship%2C+lecture+demonstrations%2C+new+sensations%2C+lesson%2C+riding%2C+domination%2C+olympic+rider%2Ccoach%2C+riding+holidays%2C+courses';
var metaContents  = '+Tanya+Larrigan%2C+International+Horse+Pony+and+equestrian+Expert+Meet+the+Horses+and+the+Team%2C+Talks%2C+Demonstrations+and+Displays+for+Bookings%2C+Courses%2C+Lessons%2C+Riding+Holidays%2C+New+Sensations%2C+The+Book+and+the+Video%2C++Links%2C+The+Diary+%2C+The+archive+picture%2C+Mini+Marvels+long+reining+display+team++and+childrens+equestrian+toys%2C+equestrian+show+producer%2C+Kent%2C++';
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();
};

