/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','552',jdecode('About+Us'),jdecode(''),'/552.html','true',[],'',''],
	['PAGE','24201',jdecode('Dog+Walking'),jdecode(''),'/24201.html','true',[],'',''],
	['PAGE','24227',jdecode('Cat+Sitting'),jdecode(''),'/24227.html','true',[],'',''],
	['PAGE','25801',jdecode('Home+Boarding+for+Dogs'),jdecode(''),'/25801.html','true',[],'',''],
	['PAGE','29201',jdecode('Puppy+Care'),jdecode(''),'/29201.html','true',[],'',''],
	['PAGE','33601',jdecode('Speciality+Care'),jdecode(''),'/33601.html','true',[],'',''],
	['PAGE','2701',jdecode('Gallery'),jdecode(''),'/2701.html','true',[],'',''],
	['PAGE','35601',jdecode('Lost+and+Found'),jdecode(''),'/35601.html','true',[],'',''],
	['PAGE','594',jdecode('Testimonials'),jdecode(''),'/594.html','true',[],'',''],
	['PAGE','615',jdecode('Contact+Us'),jdecode(''),'/615.html','true',[],'',''],
	['PAGE','7301',jdecode('Links'),jdecode(''),'/7301.html','true',[],'',''],
	['PAGE','16101',jdecode('Charity+Events'),jdecode(''),'/16101.html','true',[],'',''],
	['PAGE','18353',jdecode('Areas'),jdecode(''),'/18353.html','true',[],'','']];
var siteelementCount=14;
theSitetree.topTemplateName='Ornaments';
theSitetree.paletteFamily='BB2D56';
theSitetree.keyvisualId='3903';
theSitetree.keyvisualName='kv_3903.jpg';
theSitetree.fontsetId='10493';
theSitetree.graphicsetId='11075';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Ornaments',
				paletteFamily: 	'BB2D56',
				keyvisualId: 	'3903',
				keyvisualName: 	'kv_3903.jpg',
				fontsetId: 		'10493',
				graphicsetId: 	'11075',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'887248',
				e_color: 		'887248',
				f_color: 		'887248',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2701',
internalId:  '',
customField: '20091026-165008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20091026-164709'
};
webappMappings['7060']=webappMappings['7060-5f9904c255fdb19a0931e42795cd8a5e']={
webappId:    '7060',
documentId:  '2701',
internalId:  '5f9904c255fdb19a0931e42795cd8a5e',
customField: 'language:en;country:GB;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20091026-171605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20091026-165103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20091026-165145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7301',
internalId:  '',
customField: '20100331-194456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20091026-165231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24227',
internalId:  '',
customField: '20091026-164849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18353',
internalId:  '',
customField: '20091026-171709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24201',
internalId:  '',
customField: '20091026-164824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25801',
internalId:  '',
customField: '20091026-164914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29201',
internalId:  '',
customField: '20091026-170640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33601',
internalId:  '',
customField: '20091029-081926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35601',
internalId:  '',
customField: '20100516-135939'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT10INXPT9';
var companyName   = 'Posh+paws+petcare+';
var htmlTitle	  = 'Posh+paws+petcare+-+dog+walking+services+in+Leeds';
var metaKeywords  = 'professional+petcare%2C+care+and+attention+for+your+animals%2C+caring+for+your+pets%2C+dogwalking+services%2C+boarding+at+home%2C+kennelling+at+home%2C+cat+carepetcare%2C+dogwalking%2C+catsitting%2C+poshpaws%2C+posh+paws%2C+poshpaw%2C+dog+pet%2C+petcare+rawdon%2C+dogcare%2C+catcare%2C+paw+radon+pets%2C+homeboarding+for+dogs%2C+home+from+home+dog+boarding%2C+Jo%2C+Jo+Hutchinson%2C+dog+walking+rawdon%2C+dog+walking+guiseley%2C+dog+kennels+rawdon%2C+dog+walking+burley+in+wharfedale%2C+dog+boarding+rawdon%2C+dog+boarding+burley+in+wharfedale%2C+professional+petcare%2C+love+and+care+for+pets%2C+pets+at+home+guiseley%2C+day+care%2C+dog+day+care%2C+dogs+special+diets%2C+speciality+care+for+dogs+and+cats%2C+truly+caring+company+for+your+pets%2C+contact+Jo+on+Rawdon%2C+care+of+your+pets%2C+fretting+and+pining%2C+NARP+registered%2C+NARP%2C+home+boarding%2C+police+checked%2C+poshpawspetcare%2C+poshpawspetcareservices%2C+poshpaws+pet+care%2C+posh+paws+petcare+services+rawdon%2C+furry+friends%2C+founded+posh-paws%2C+rabbits+and+guinea+pigs+pet+care%2C+Joanne+Hutchinson%2C+Jo+Rawdon%2C+DJ+Graham+Privett%2C+Lynda+Forbes-Wake%2C+Lyndaforbeswake%2C+posh+paws+is+reliable%2C+reliable+pet+care%2C+holiday+pet+care%2C+daytime+pet+care%2C+Becks%2C+Benji%2C+Chester%2C+Emma%2C+Dogs+Rawdon%2C+Dogs+Guisley%2C+Kennelling+for+dogs%2C+kennelling+guisley%2C+premier+pet+care';
var metaContents  = 'petcare%2C+dogwalking%2C+catsitting%2C+poshpaws%2C+posh+paws%2C+poshpaw%2C+dog+pet%2C+petcare+rawdon%2C+dogcare%2C+catcare%2C+paw+radon+pets%2C+homeboarding+for+dogs%2C+home+from+home+dog+boarding%2C+Jo%2C+Jo+Hutchinson%2C+dog+walking+rawdon%2C+dog+walking+guiseley%2C+dog+kennels+rawdon%2C+dog+walking+burley+in+wharfedale%2C+dog+boarding+rawdon%2C+dog+boarding+burley+in+wharfedale%2C+professional+petcare%2C+love+and+care+for+pets%2C+pets+at+home+guiseley%2C+day+care%2C+dog+day+care%2C+dogs+special+diets%2C+speciality+care+for+dogs+and+cats%2C+truly+caring+company+for+your+pets%2C+contact+Jo+on+Rawdon%2C+care+of+your+pets%2C+fretting+and+pining%2C+NARP+registered%2C+NARP%2C+home+boarding%2C+police+checked%2C+poshpawspetcare%2C+poshpawspetcareservices%2C+poshpaws+pet+care%2C+posh+paws+petcare+services+rawdon%2C+furry+friends%2C+founded+posh-paws%2C+rabbits+and+guinea+pigs+pet+care%2C+Joanne+Hutchinson%2C+Jo+Rawdon%2C+DJ+Graham+Privett%2C+Lynda+Forbes-Wake%2C+Lyndaforbeswake%2C+posh+paws+is+reliable%2C+reliable+pet+care%2C+holiday+pet+care%2C+daytime+pet+care%2C+Becks%2C+Benji%2C+Chester%2C+Emma%2C+Dogs+Rawdon%2C+Dogs+Guisley%2C+Kennelling+for+dogs%2C+kennelling+guisley%2C+premier+pet+care';
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();
};
