/* [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 theSitetree=[ 
	['PAGE','1446',jdecode('Home'),jdecode(''),'/1446.html','true',[],''],
	['PAGE','3401',jdecode('About+Us'),jdecode(''),'/3401.html','true',[],''],
	['PAGE','3427',jdecode('About+Bengals'),jdecode(''),'/3427.html','true',[],''],
	['PAGE','39101',jdecode('Our+Bengal+Boys'),jdecode(''),'/39101.html','true',[],''],
	['PAGE','32201',jdecode('Westwinds+Wesley'),jdecode(''),'/32201.html','false',[],''],
	['PAGE','50901',jdecode('Dazzling+Bengalsdot+Com'),jdecode(''),'/50901.html','false',[],''],
	['PAGE','39127',jdecode('Azanabengals+Aruna'),jdecode(''),'/39127.html','false',[],''],
	['PAGE','3479',jdecode('Our+Bengal+Girls'),jdecode(''),'/3479/index.html','true',[ 
		['PAGE','15101',jdecode('Glitterglam+Wild+At+Heart'),jdecode(''),'/3479/15101.html','false',[],''],
		['PAGE','15127',jdecode('Champion+Glitterglam+Golden+Goddess'),jdecode(''),'/3479/15127.html','false',[],''],
		['PAGE','15153',jdecode('Triple+Gr+Ch+Glitterglam+Golden+Glow'),jdecode(''),'/3479/15153.html','false',[],''],
		['PAGE','25827',jdecode('Wildsidebengals+Satin+Ice'),jdecode(''),'/3479/25827.html','false',[],'']
	],''],
	['PAGE','3505',jdecode('Currently+For+Sale'),jdecode(''),'/3505.html','true',[],''],
	['PAGE','51301',jdecode('Miranda+Litter'),jdecode(''),'/51301.html','false',[],''],
	['PAGE','61001',jdecode('Princess'),jdecode(''),'/61001.html','false',[],''],
	['PAGE','3531',jdecode('News+%26+Show+Results'),jdecode(''),'/3531.html','true',[],''],
	['PAGE','1541',jdecode('Contact+Us'),jdecode(''),'/1541.html','true',[],''],
	['PAGE','1488',jdecode('Photo+Gallery'),jdecode(''),'/1488.html','true',[],''],
	['PAGE','1509',jdecode('Dazzling+Bengals%26%23x27%3B+Blog'),jdecode(''),'/1509.html','true',[],''],
	['PAGE','1520',jdecode('Guestbook'),jdecode(''),'/1520.html','true',[],''],
	['PAGE','8101',jdecode('Links'),jdecode(''),'/8101.html','true',[],'']];
var siteelementCount=21;
theSitetree.topTemplateName='Pet1';
theSitetree.paletteFamily='445ACA';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='17662';
theSitetree.graphicsetId='13054';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='445ACA';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				name: 			'Pet1',
				paletteFamily: 	'445ACA',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'17662',
				graphicsetId: 	'13054',
				contentColor: 	'FFFFFF',
				contentBGColor: '445ACA',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-b8d4a4d31d8da308f9c8d739769da5ec']={
webappId:    '7060',
documentId:  '1488',
internalId:  'b8d4a4d31d8da308f9c8d739769da5ec',
customField: 'language:en;country:GB;'
};
webappMappings['7050']=webappMappings['7050-1417']={
webappId:    '7050',
documentId:  '1509',
internalId:  '1417',
customField: 'language:en;country:GB;'
};
webappMappings['7002']=webappMappings['7002-1248']={
webappId:    '7002',
documentId:  '1520',
internalId:  '1248',
customField: 'language:en;country:GB;'
};
webappMappings['7008']=webappMappings['7008-3088']={
webappId:    '7008',
documentId:  '1541',
internalId:  '3088',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1446',
internalId:  '',
customField: '20091121-111513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3401',
internalId:  '',
customField: '20081228-141429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1488',
internalId:  '',
customField: '20081223-050728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1509',
internalId:  '',
customField: '20081112-192741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1520',
internalId:  '',
customField: '20081221-124445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1541',
internalId:  '',
customField: '20081125-182413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3479',
internalId:  '',
customField: '20091121-111207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3505',
internalId:  '',
customField: '20091121-111218'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1446',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3427',
internalId:  '',
customField: '20081228-141339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39101',
internalId:  '',
customField: '20091121-111155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3531',
internalId:  '',
customField: '20091010-113057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8101',
internalId:  '',
customField: '20090807-133614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15153',
internalId:  '',
customField: '20090420-161527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20090211-161359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15127',
internalId:  '',
customField: '20090214-164216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25827',
internalId:  '',
customField: '20090205-192523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61001',
internalId:  '',
customField: '20090820-202319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32201',
internalId:  '',
customField: '20090623-135728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39127',
internalId:  '',
customField: '20090807-133932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50901',
internalId:  '',
customField: '20090818-063535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51301',
internalId:  '',
customField: '20091010-112816'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT20INEQL0';
var companyName   = 'Dazzling+Bengals';
var htmlTitle	  = 'Bengal+Cat+Breeders+-+Dazzling+Bengals+-+Kittens%2C+Cats+%26+Show+Results';
var metaKeywords  = 'bengal%2Cbengals%2Casian%2Cleopard%2Ccat%2Ccats%2Crosette%2Crosettes%2Cspots%2Casianleopardcat%2Crufus%2Cbrown%2Cbrownspotted%2Cspot%2Cdazzlingbengals%2Cdazzling%2Ckitten%2Ckittens%2Cbreeder%2Cbreeders%2Ccatshow%2Ccat%2Cshow%2Cresults%2Cstuds%2Cqueen%2Cqueens%2Cspotted%2Ccubs%2Ccattery%2Cbengal+studs%2Cbengal+queens%2Cbengal+cat+breeders%2C+bengal+breeders%2Cbengal+cat+breeders+uk%2Cbengal+kittens%2Cbengal+kitten+breeders%2Cbengal+cats+for+sale%2Cbengal+kittens+for+sale%2Cbengal+kitten+pictures%2Cbengal+cat+pictures%2Cbengal+leopard+cats%2C+asian+leopard+cats+for+sale%2Casian+leopard+kittens';
var metaContents  = 'Breeders+of+top+quality+Bengal+Cats+++Kittens.+Combining+the+very+best+bloodlines+from+around+the+world.+Striving+to+produce+large%2C+healthy+Bengals+with+stunning+coat+pattern%2C+the+wild+look+of+an+Asian+Leopard+Cat+and+a+friendly%2C+gentle+temperament.';
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();
};
