/* [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','10001',jdecode('Home'),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','true',[],'',''],
	['PAGE','106401',jdecode('Tanya%26%23x27%3Bs+Blog%21'),jdecode(''),'/106401.html','true',[],'',''],
	['PAGE','85901',jdecode('UKCC+Coaching'),jdecode(''),'/85901.html','true',[],'',''],
	['PAGE','14501',jdecode('What+is+a+Para+Rider'),jdecode(''),'/14501.html','true',[],'',''],
	['PAGE','14301',jdecode('Regional+Foundation+Squads'),jdecode(''),'/14301.html','true',[],'',''],
	['PAGE','11527',jdecode('Details+for+Lessons+%26+costs'),jdecode(''),'/11527.html','true',[],'',''],
	['PAGE','11553',jdecode('Livery+%26+training++info+'),jdecode(''),'/11553.html','true',[],'',''],
	['PAGE','11353',jdecode('Courses++at+Maywood'),jdecode(''),'/11353.html','true',[],'',''],
	['PAGE','14201',jdecode('Para+Rider-+Emma+Kent'),jdecode(''),'/14201.html','true',[],'',''],
	['PAGE','11701',jdecode('Equines++for+PR+%26+media+work'),jdecode(''),'/11701.html','true',[],'',''],
	['PAGE','13001',jdecode('Displays+for+bookings'),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','true',[],'',''],
	['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','true',[],'',''],
	['PAGE','10130',jdecode('Enquiry+form+and+contact+details'),jdecode(''),'/10130.html','true',[],'',''],
	['PAGE','11101',jdecode('The+Photos+album'),jdecode(''),'/11101.html','true',[],'',''],
	['PAGE','10104',jdecode('Read+%26++sign++guestbook+thnx'),jdecode(''),'/10104.html','true',[],'',''],
	['PAGE','12801',jdecode('Links'),jdecode(''),'/12801.html','true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Valiant';
theSitetree.paletteFamily='D43F3F';
theSitetree.keyvisualId='9814';
theSitetree.keyvisualName='kv_9814.jpg';
theSitetree.fontsetId='17626';
theSitetree.graphicsetId='13031';
theSitetree.contentColor='646464';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Valiant',
				paletteFamily: 	'D43F3F',
				keyvisualId: 	'9814',
				keyvisualName: 	'kv_9814.jpg',
				fontsetId: 		'17626',
				graphicsetId: 	'13031',
				contentColor: 	'646464',
				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['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: '20100626-074020'
};
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:  '10001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106401',
internalId:  '',
customField: '20100626-074330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20090603-205305'
};
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: '20100618-074018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85801',
internalId:  '',
customField: '20090528-065727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11353',
internalId:  '',
customField: '20080511-224135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11327',
internalId:  '',
customField: '20090529-061553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11101',
internalId:  '',
customField: '20080511-223724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11301',
internalId:  '',
customField: '20091103-075734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11553',
internalId:  '',
customField: '20080410-162652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11701',
internalId:  '',
customField: '20080722-225001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11527',
internalId:  '',
customField: '20080602-003631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11501',
internalId:  '',
customField: '20090802-215532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55501',
internalId:  '',
customField: '20100626-074408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13001',
internalId:  '',
customField: '20080414-223437'
};
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['7050']=webappMappings['7050-224']={
webappId:    '7050',
documentId:  '106401',
internalId:  '224',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14501',
internalId:  '',
customField: '20090822-231259'
};
webappMappings['1501']=webappMappings['1501-5276554']={
webappId:    '1501',
documentId:  '10001',
internalId:  '5276554',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20090822-235526'
};
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'
};
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();
};
