/* [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','1674',jdecode('Home'),jdecode(''),'/1674.html','true',[],'',''],
	['PAGE','3201',jdecode('Biography'),jdecode(''),'/3201.html','true',[],'',''],
	['PAGE','3227',jdecode('Flute+and+Guitar'),jdecode(''),'/3227.html','true',[],'',''],
	['PAGE','6401',jdecode('Courses'),jdecode(''),'/6401.html','true',[],'',''],
	['PAGE','6427',jdecode('Workshops'),jdecode(''),'/6427.html','true',[],'',''],
	['PAGE','3279',jdecode('Reviews'),jdecode(''),'/3279.html','true',[],'',''],
	['PAGE','3305',jdecode('Photo+Gallery'),jdecode(''),'/3305.html','true',[],'',''],
	['PAGE','22201',jdecode('Contact'),jdecode(''),'/22201.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Basic';
theSitetree.paletteFamily='36566E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10828';
theSitetree.graphicsetId='11283';
theSitetree.contentColor='36566E';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Basic',
				paletteFamily: 	'36566E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10828',
				graphicsetId: 	'11283',
				contentColor: 	'36566E',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22201',
internalId:  '',
customField: '20090601-115050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1674',
internalId:  '',
customField: '20091219-203618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6401',
internalId:  '',
customField: '20090601-112756'
};
webappMappings['7008']=webappMappings['7008-4821']={
webappId:    '7008',
documentId:  '22201',
internalId:  '4821',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3227',
internalId:  '',
customField: '20090601-112724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3201',
internalId:  '',
customField: '20090601-114458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6427',
internalId:  '',
customField: '20090601-114906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3279',
internalId:  '',
customField: '20090601-114645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3305',
internalId:  '',
customField: '20090601-112847'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1674',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT10INEHP6';
var companyName   = 'Fiona%C2%A0Harrison+-+Classical+Guitarist';
var htmlTitle	  = 'Fiona+Harrison';
var metaKeywords  = 'Fiona%2C+Harrison%2C+Guitar%2C+guitar%2C+guitarist%2C+surrey%2C+dorking%2C+workshop%2C+courses%2C+course%2C+flute%2C+julie+wright%2C+atarah%2C+ben-tovim%2C+yale%2C+yale+university%2C+royal+college%2C+london%2C+girl%2C+female%2C+lessons%2C+music%2C+musician%2C+Ben-tovim%2C+guitar+lessons%2C+Hamer%2C+David+Hamer%2C+teacher%2C+classical+guitar+music%2C+classical+guitarists%2Cclassical+guitar+musicians%2C+classical+guitar+lessons%2Cclassical+guitar+players%2Cclassical+guitar+tuition%2Clearn+classical+guitar%2C+fluteand+guitar+music%2C+guitar+festival+uk%2Chomepage%2C+Fiona+Harrisons+homepage%2C';
var metaContents  = 'Guitarist+of+fiery+energy+and+lyrical+expressiveness.+An+extremely+persuasive+artist+with+immaculate+tone+and+perfectly+balanced+technique.+...+popular%2C+inspirational+teacher.+META+name%3Dkeywords+content%3Dadvanced+guitar+lessons%2Cguitar+courses+uk%2Cguitar+lessons+in+oxford%2Cprivate+guitar+lesson%2Cguitar+learn+master%2Cclassic+guitar+course%2Clearn+classical+guitar%2Cwomen+classical+guitarists%2Cclassical+guitarists%2Cclassical+guitar+artists%2Cclassical+guitar+players%2Cclassical+guitar+lessons%2Cclassical+guitar+music%2Cclassical+guitar+musicians%2Cflute+guitar+music%2Cflute+guitar+duets%2Cflute+and+guitar+duet%2Csolo+guitar+music%2Cclassical+guitar+techniques%2Cguitar+solo+techniques%2Cadult+music+workshops%2Csession+guitarist%2Cfiona+harrison%2Cguitar+art%2C+www.fionaharrison.co.uk';
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();
};
