/* [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','2701',jdecode('Home'),jdecode(''),'/2701.html','true',[],'',''],
	['PAGE','2752',jdecode('About+Bengals'),jdecode(''),'/2752.html','true',[],'',''],
	['PAGE','2778',jdecode('About+Us'),jdecode(''),'/2778.html','true',[],'',''],
	['PAGE','33201',jdecode('Bella+-+Queen'),jdecode(''),'/33201.html','true',[],'',''],
	['PAGE','33227',jdecode('Coco+-+Queen'),jdecode(''),'/33227.html','true',[],'',''],
	['PAGE','33253',jdecode('Lily+-+Queen'),jdecode(''),'/33253.html','true',[],'',''],
	['PAGE','2804',jdecode('Tori+-+Queen'),jdecode(''),'/2804.html','true',[],'',''],
	['PAGE','2830',jdecode('Saffy+-+Queen'),jdecode(''),'/2830.html','true',[],'',''],
	['PAGE','25301',jdecode('Zeppy+-+Stud'),jdecode(''),'/25301.html','true',[],'',''],
	['PAGE','2856',jdecode('Velvet+-+Stud'),jdecode(''),'/2856.html','true',[],'',''],
	['PAGE','2882',jdecode('Kittens'),jdecode(''),'/2882.html','true',[],'',''],
	['PAGE','17501',jdecode('Cat+Care+Guides'),jdecode(''),'/17501.html','true',[],'',''],
	['PAGE','2908',jdecode('Contact+Us'),jdecode(''),'/2908.html','true',[],'',''],
	['PAGE','31101',jdecode('Tessa+FIP+Fund'),jdecode(''),'/31101.html','true',[],'',''],
	['PAGE','2960',jdecode('Guestbook'),jdecode(''),'/2960.html','true',[],'',''],
	['PAGE','8501',jdecode('Links'),jdecode(''),'/8501.html','true',[],'',''],
	['PAGE','2934',jdecode('Gallery'),jdecode(''),'/2934.html','false',[],'',''],
	['PAGE','2986',jdecode('Forum'),jdecode(''),'/2986.html','false',[],'',''],
	['PAGE','9001',jdecode('Website+Building'),jdecode(''),'/9001.html','false',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Holz';
theSitetree.paletteFamily='FF7112';
theSitetree.keyvisualId='8821';
theSitetree.keyvisualName='KV_07.swf';
theSitetree.fontsetId='17181';
theSitetree.graphicsetId='12654';
theSitetree.contentColor='FF7112';
theSitetree.contentBGColor='262626';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Holz',
				paletteFamily: 	'FF7112',
				keyvisualId: 	'8821',
				keyvisualName: 	'KV_07.swf',
				fontsetId: 		'17181',
				graphicsetId: 	'12654',
				contentColor: 	'FF7112',
				contentBGColor: '262626',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'FF6600',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20091030-132402'
};
webappMappings['7008']=webappMappings['7008-1694']={
webappId:    '7008',
documentId:  '2908',
internalId:  '1694',
customField: 'language:en;country:GB;'
};
webappMappings['7060']=webappMappings['7060-3ede83cc9feb54366e90cfc6f0b48421']={
webappId:    '7060',
documentId:  '2934',
internalId:  '3ede83cc9feb54366e90cfc6f0b48421',
customField: 'language:en;country:GB;'
};
webappMappings['1002']=webappMappings['1002-2960anbt20in23zy']={
webappId:    '1002',
documentId:  '2960',
internalId:  '2960anbt20in23zy',
customField: 'icq=false'
};
webappMappings['1003']=webappMappings['1003-anbt20in23zy11a4b1b8d26']={
webappId:    '1003',
documentId:  '2986',
internalId:  'anbt20in23zy11a4b1b8d26',
customField: 'en:GB'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2701',
internalId:  '',
customField: '20091116-075055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2752',
internalId:  '',
customField: '20091030-130537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2778',
internalId:  '',
customField: '20091027-173738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2804',
internalId:  '',
customField: '20091030-141028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2830',
internalId:  '',
customField: '20091030-140942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2856',
internalId:  '',
customField: '20091030-140401'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2882',
internalId:  '',
customField: '20100430-165238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2908',
internalId:  '',
customField: '20091030-132150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2934',
internalId:  '',
customField: '20080602-220753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2960',
internalId:  '',
customField: '20091030-120914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2986',
internalId:  '',
customField: '20080602-220754'
};
webappMappings['7008']=webappMappings['7008-1740']={
webappId:    '7008',
documentId:  '9001',
internalId:  '1740',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20080713-001555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20100430-172619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25301',
internalId:  '',
customField: '20100430-173252'
};
webappMappings['1501']=webappMappings['1501-7250383']={
webappId:    '1501',
documentId:  '2701',
internalId:  '7250383',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31101',
internalId:  '',
customField: '20091117-020858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33201',
internalId:  '',
customField: '20100430-172916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33227',
internalId:  '',
customField: '20100430-173024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33253',
internalId:  '',
customField: '20100430-173142'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT20IN23ZY';
var companyName   = 'Bouncy+Bengals';
var htmlTitle	  = 'Bouncy+Bengals';
var metaKeywords  = 'Bouncy+Bengals+%2C+Breeders+of+Bengals+in+Tavistock+near+Plymouth+%2C+Yelverton+%2C+Exeter+in+Devon+%E2%80%93+Blue+Eyed+Snow+Spotted+%2C+Blue+Eyed+Snow+Marbled+%2C+Marble+%2C+Brown+Spotted+%2C+Rosetted+%2C+Brown+Marbled+%2C+Marble+%2C+Silver+Spotted+%2C+Silver+Marbled+%2C+Marble+%2C+Quality+Queens+%2C+Pets+%2C+Studs+%2C+Glitter+%2C+Glittered+%2C+Bengal+Breeders+%2C+cat+care+%2C+bengals+kittens+%2C+bengals+kittens+for+sale';
var metaContents  = 'Bouncy+Bengals+%2C+Breeders+of+Bengals+in+Tavistock+near+Plymouth+%2C+Yelverton+%2C+Exeter+in+Devon+%E2%80%93+Blue+Eyed+Snow+Spotted+%2C+Blue+Eyed+Snow+Marbled+%2C+Marble+%2C+Brown+Spotted+%2C+Rosetted+%2C+Brown+Marbled+%2C+Marble+%2C+Silver+Spotted+%2C+Silver+Marbled+%2C+Marble+%2C+Quality+Queens+%2C+Pets+%2C+Studs+%2C+Glitter+%2C+Glittered';
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();
};
