/* [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','63',jdecode('Home'),jdecode(''),'/63.html','true',[],'',''],
	['PAGE','18201',jdecode('Cheesecakes'),jdecode(''),'/18201.html','true',[],'',''],
	['PAGE','18222',jdecode('Crumbcakes+'),jdecode(''),'/18222.html','true',[],'',''],
	['PAGE','18327',jdecode('Cookies'),jdecode(''),'/18327.html','true',[],'',''],
	['PAGE','18285',jdecode('Yogurt+Muffins'),jdecode(''),'/18285.html','true',[],'',''],
	['PAGE','18243',jdecode('Yogurt+Loaves+'),jdecode(''),'/18243.html','true',[],'',''],
	['PAGE','18264',jdecode('Sheetcakes'),jdecode(''),'/18264.html','true',[],'',''],
	['PAGE','18306',jdecode('Mini+Bundts'),jdecode(''),'/18306.html','true',[],'',''],
	['PAGE','51101',jdecode('Cupcakes'),jdecode(''),'/51101.html','true',[],'',''],
	['PAGE','8997',jdecode('Wholesale'),jdecode(''),'/8997.html','true',[],'',''],
	['PAGE','1097',jdecode('About+us'),jdecode(''),'/1097.html','true',[],'',''],
	['PAGE','2343',jdecode('Special+Events'),jdecode(''),'/2343.html','true',[],'',''],
	['PAGE','2811',jdecode('Reviews'),jdecode(''),'/2811.html','true',[],'',''],
	['PAGE','1142',jdecode('FAQs'),jdecode(''),'/1142.html','true',[],'',''],
	['PAGE','2594',jdecode('How+to+find+us'),jdecode(''),'/2594.html','true',[],'',''],
	['PAGE','1169',jdecode('Directions'),jdecode(''),'/1169.html','true',[],'',''],
	['PAGE','1151',jdecode('Contact+us'),jdecode(''),'/1151/index.html','true',[ 
		['PAGE','3030',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/1151/3030.html','false',[],'','']
	],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Blossom';
theSitetree.paletteFamily='AC2E53';
theSitetree.keyvisualId='7111';
theSitetree.keyvisualName='kv_7111.jpg';
theSitetree.fontsetId='16394';
theSitetree.graphicsetId='12128';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E5E2E2';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blossom',
				paletteFamily: 	'AC2E53',
				keyvisualId: 	'7111',
				keyvisualName: 	'kv_7111.jpg',
				fontsetId: 		'16394',
				graphicsetId: 	'12128',
				contentColor: 	'000000',
				contentBGColor: 'E5E2E2',
				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['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '2594',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51101',
internalId:  '',
customField: '20100715-161005'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '63',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63',
internalId:  '',
customField: '20100728-144438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18327',
internalId:  '',
customField: '20100707-153352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18222',
internalId:  '',
customField: '20100629-132131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18285',
internalId:  '',
customField: '20100630-141730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18264',
internalId:  '',
customField: '20100622-142037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18306',
internalId:  '',
customField: '20100730-135504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18243',
internalId:  '',
customField: '20100730-133907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20100111-133648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8997',
internalId:  '',
customField: '20070228-002228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1097',
internalId:  '',
customField: '20100115-121921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2343',
internalId:  '',
customField: '20061130-222305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2811',
internalId:  '',
customField: '20090319-142627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1142',
internalId:  '',
customField: '20070228-001528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2594',
internalId:  '',
customField: '20080429-184107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1169',
internalId:  '',
customField: '20080429-184039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1151',
internalId:  '',
customField: '20100525-115501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3030',
internalId:  '',
customField: '20070228-000457'
};
webappMappings['7008']=webappMappings['7008-7817']={
webappId:    '7008',
documentId:  '1151',
internalId:  '7817',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INXSTC';
var companyName   = 'New+York%27s+Best+Cheesecake+%26+Desserts';
var htmlTitle	  = 'Jonathan+Lord+Bakery+Cheeecake+and+Desserts';
var metaKeywords  = 'cheesecake%2C+dessert%2C+desserts%2C+cheesecakes%2C+muffins%2C+cookies%2C+gourmet+gifts%2C+bakery%2C+wholesale+bakery%2C+new+york+cheesecake%2C+crumbcake%2C+ny+cheesecake%2C+sampler+cheescake%2C+jonathan+lord%2C+jonathan+lord+bakery%2C+fundraising+ideas%2C+gourmet+desserts%2C+corporate+gifts%2C+birthday+gifts%2C+gifts%2C+crumbcake%2C+school+fundraising+idea%2C+raise+money%2C+christian+company%2C+brownies%2C+black++whites';
var metaContents  = 'cheesecake%2C+bakery%2C+wholesale+bakery%2C+long+island+bakery%2C+long+island+wholesale+cheesecake%2C+long+island+wholesale+desserts%2C+crumbcakes%2C+cookies%2C+black+and+white+cookies%2C+linzer+tarts%2C+muffins%2C+yogurt+loaves%2C+pound+cake%2C+carrot+cake%2C+sheet+cakes%2C+brownies%2C+layer+cakes%2C+new+yorks+best+cheesecake%2C+new+york+cheesecake%2C+crumbcake%2C+crumb+cake%2C+jonathan+lord%2C+dessert%2C+desserts%2C+cheesecakes%2C+gourmet+gifts%2C+ny+cheesecake%2C+fundraiser%2C+school+fundraising+idea%2C+woman+owned+bakery%2C+woman+owned+business%2C+sampler+cheesecake%2C+wholesale+desserts';
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();
};
