/* [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','9301',jdecode('Home'),jdecode(''),'/9301.html','true',[],'',''],
	['PAGE','12901',jdecode('Weddings'),jdecode(''),'/12901/index.html','true',[ 
		['PAGE','43701',jdecode('Wedding+Web'),jdecode(''),'/12901/43701.html','true',[],'',''],
		['PAGE','13801',jdecode('Prices'),jdecode(''),'/12901/13801.html','true',[],'','']
	],'',''],
	['PAGE','13853',jdecode('Portraiture'),jdecode(''),'/13853/index.html','true',[ 
		['PAGE','13827',jdecode('Prices'),jdecode(''),'/13853/13827.html','true',[],'','']
	],'',''],
	['PAGE','45501',jdecode('Client+Area'),jdecode(''),'/45501.html','true',[],'',''],
	['PAGE','37601',jdecode('Gift+Vouchers'),jdecode(''),'/37601.html','true',[],'',''],
	['PAGE','9579',jdecode('Galleries'),jdecode(''),'/9579/index.html','true',[ 
		['PAGE','11401',jdecode('Our+Style'),jdecode(''),'/9579/11401.html','true',[],'',''],
		['PAGE','11427',jdecode('Eve'),jdecode(''),'/9579/11427.html','true',[],'',''],
		['PAGE','11453',jdecode('Sam'),jdecode(''),'/9579/11453.html','true',[],'',''],
		['PAGE','11505',jdecode('Max'),jdecode(''),'/9579/11505.html','true',[],'',''],
		['PAGE','11479',jdecode('Isobella'),jdecode(''),'/9579/11479.html','true',[],'','']
	],'',''],
	['PAGE','11801',jdecode('Event'),jdecode(''),'/11801.html','true',[],'',''],
	['PAGE','15701',jdecode('Studio+Hire'),jdecode(''),'/15701/index.html','true',[ 
		['PAGE','43001',jdecode('Studio+Layout'),jdecode(''),'/15701/43001.html','false',[],'','']
	],'',''],
	['PAGE','15727',jdecode('Training'),jdecode(''),'/15727/index.html','true',[ 
		['PAGE','17501',jdecode('Beginners'),jdecode(''),'/15727/17501.html','true',[],'',''],
		['PAGE','17901',jdecode('On+The+Day'),jdecode(''),'/15727/17901.html','true',[],'',''],
		['PAGE','18201',jdecode('Bring+With+You'),jdecode(''),'/15727/18201.html','true',[],'','']
	],'',''],
	['PAGE','9553',jdecode('Products'),jdecode(''),'/9553/index.html','false',[ 
		['PAGE','11879',jdecode('Photo+Frames'),jdecode(''),'/9553/11879.html','false',[],'',''],
		['PAGE','11905',jdecode('CD+Clocks'),jdecode(''),'/9553/11905.html','false',[],'',''],
		['PAGE','11931',jdecode('Key+Rings'),jdecode(''),'/9553/11931.html','false',[],'','']
	],'',''],
	['PAGE','12101',jdecode('Shop'),jdecode(''),'/12101.html','false',[],'',''],
	['PAGE','13501',jdecode('PISIFI+Forum'),jdecode(''),'/13501.html','false',[],'',''],
	['PAGE','9501',jdecode('Contact+us'),jdecode(''),'/9501.html','false',[],'',''],
	['PAGE','42501',jdecode('Links'),jdecode(''),'/42501.html','true',[],'',''],
	['PAGE','19301',jdecode('Our+Location'),jdecode(''),'/19301.html','true',[],'','']];
var siteelementCount=30;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='003390';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='291';
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: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'291',
				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:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9301',
internalId:  '',
customField: '20090909-090013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13853',
internalId:  '',
customField: '20090817-152937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20090131-211657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9579',
internalId:  '',
customField: '20090818-101932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9553',
internalId:  '',
customField: '20090131-211657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20091130-181758'
};
webappMappings['7060']=webappMappings['7060-b09a2f9e6ab617e8806aec4736855f55']={
webappId:    '7060',
documentId:  '11401',
internalId:  'b09a2f9e6ab617e8806aec4736855f55',
customField: 'language:en;country:GB;'
};
webappMappings['7060']=webappMappings['7060-e604855c7e8adc8178d32ccdd2605f50']={
webappId:    '7060',
documentId:  '11427',
internalId:  'e604855c7e8adc8178d32ccdd2605f50',
customField: 'language:en;country:GB;'
};
webappMappings['7060']=webappMappings['7060-ddecadb792a67c574792eb1326caa2fd']={
webappId:    '7060',
documentId:  '11453',
internalId:  'ddecadb792a67c574792eb1326caa2fd',
customField: 'language:en;country:GB;'
};
webappMappings['7060']=webappMappings['7060-0c6afc89b9b4568d44d501dcd4e3e6bc']={
webappId:    '7060',
documentId:  '11479',
internalId:  '0c6afc89b9b4568d44d501dcd4e3e6bc',
customField: 'language:en;country:GB;'
};
webappMappings['7060']=webappMappings['7060-4e7eabd04809be88ddb871bd17bdd0d2']={
webappId:    '7060',
documentId:  '11505',
internalId:  '4e7eabd04809be88ddb871bd17bdd0d2',
customField: 'language:en;country:GB;'
};
webappMappings['7008']=webappMappings['7008-4002']={
webappId:    '7008',
documentId:  '9501',
internalId:  '4002',
customField: 'language:en;country:GB;'
};
webappMappings['4001']=webappMappings['4001-8993413']={
webappId:    '4001',
documentId:  '12101',
internalId:  '8993413',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20090706-115909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12101',
internalId:  '',
customField: '20090224-200940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11879',
internalId:  '',
customField: '20090224-195635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11905',
internalId:  '',
customField: '20090224-195635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13827',
internalId:  '',
customField: '20091226-092158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11453',
internalId:  '',
customField: '20091030-143035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12901',
internalId:  '',
customField: '20100110-141951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13801',
internalId:  '',
customField: '20100827-172322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20090817-112413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11427',
internalId:  '',
customField: '20100827-172956'
};
webappMappings['1003']=webappMappings['1003-anbt20inegr31221e0e0b85']={
webappId:    '1003',
documentId:  '13501',
internalId:  'anbt20inegr31221e0e0b85',
customField: 'en:GB'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20090626-203232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15727',
internalId:  '',
customField: '20091226-092914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11479',
internalId:  '',
customField: '20090916-151405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11505',
internalId:  '',
customField: '20091030-142944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11931',
internalId:  '',
customField: '20090224-195635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20090707-111610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20090727-121715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20090707-115651'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '19301',
internalId:  'location',
customField: 'language:en;country:GB;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19301',
internalId:  '',
customField: '20090818-102919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37601',
internalId:  '',
customField: '20090911-140034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42501',
internalId:  '',
customField: '20100217-142202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43001',
internalId:  '',
customField: '20091210-123210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43701',
internalId:  '',
customField: '20100110-152334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45501',
internalId:  '',
customField: '20100111-132548'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT20INEGR3';
var companyName   = 'picture-it-snap-it-frame-it';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};
