/* [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','6701',jdecode('HOME'),jdecode(''), jdecode('%2F6701.html'), 'true',[],'',''],
	['PAGE','6752',jdecode('OPENING+HOURS'),jdecode(''), jdecode('%2F6752.html'), 'true',[],'',''],
	['PAGE','7109',jdecode('LOCATION'),jdecode(''), jdecode('%2F7109.html'), 'true',[],'',''],
	['PAGE','6941',jdecode('CAKE+DECORATING+CLASES'),jdecode(''), jdecode('%2F6941%2Findex.html'), 'true',[ 
		['PAGE','6962',jdecode('COURSE+1'),jdecode(''), jdecode('%2F6941%2F6962.html'), 'true',[],'',''],
		['PAGE','27922',jdecode('COURSE+2'),jdecode(''), jdecode('%2F6941%2F27922.html'), 'true',[],'',''],
		['PAGE','27943',jdecode('COURSE+3'),jdecode(''), jdecode('%2F6941%2F27943.html'), 'true',[],'','']
	],'',''],
	['PAGE','38801',jdecode('SPECIALS'),jdecode(''), jdecode('%2F38801.html'), 'true',[],'',''],
	['PAGE','6878',jdecode('CATERING'),jdecode(''), jdecode('%2F6878.html'), 'true',[],'',''],
	['PAGE','23243',jdecode('WEDDING+CAKE'),jdecode(''), jdecode('%2F23243.html'), 'true',[],'',''],
	['PAGE','23264',jdecode('CHILDRENS+B-DAY+CAKE'),jdecode(''), jdecode('%2F23264.html'), 'true',[],'',''],
	['PAGE','23285',jdecode('SPECIAL+OCCATION+CAKE+'),jdecode(''), jdecode('%2F23285.html'), 'true',[],'',''],
	['PAGE','6836',jdecode('CUPCAKE+PARTY'),jdecode(''), jdecode('%2F6836.html'), 'true',[],'',''],
	['PAGE','6815',jdecode('MENU'),jdecode(''), jdecode('%2F6815%2Findex.html'), 'true',[ 
		['PAGE','7401',jdecode('Pastries'),jdecode(''), jdecode('%2F6815%2F7401.html'), 'true',[],'',''],
		['PAGE','33801',jdecode('Cookies+'),jdecode(''), jdecode('%2F6815%2F33801.html'), 'true',[],'',''],
		['PAGE','6857',jdecode('Cakes'),jdecode(''), jdecode('%2F6815%2F6857.html'), 'true',[],'',''],
		['PAGE','33001',jdecode('Cup+Cake+'),jdecode(''), jdecode('%2F6815%2F33001.html'), 'true',[],'',''],
		['PAGE','42001',jdecode('Gluten+%26+Sugar+Free'),jdecode(''), jdecode('%2F6815%2F42001.html'), 'true',[],'',''],
		['PAGE','42501',jdecode('Jelly+Belly'),jdecode(''), jdecode('%2F6815%2F42501.html'), 'true',[],'',''],
		['PAGE','32401',jdecode('Pies'),jdecode(''), jdecode('%2F6815%2F32401.html'), 'true',[],'',''],
		['PAGE','25101',jdecode('Chocolate'),jdecode(''), jdecode('%2F6815%2F25101.html'), 'true',[],'','']
	],'',''],
	['PAGE','23001',jdecode('OUR+CHEF'),jdecode(''), jdecode('%2F23001.html'), 'true',[],'',''],
	['PAGE','7067',jdecode('OUR+TEAM'),jdecode(''), jdecode('%2F7067.html'), 'true',[],'',''],
	['PAGE','7522',jdecode('OUR+BLOG'),jdecode(''), jdecode('%2F7522.html'), 'true',[],'',''],
	['PAGE','6920',jdecode('E-+MAIL+FORM'),jdecode(''), jdecode('%2F6920.html'), 'true',[],'',''],
	['PAGE','23222',jdecode('YOUR+OPINON'),jdecode(''), jdecode('%2F23222.html'), 'true',[],'',''],
	['PAGE','7046',jdecode('GUESTBOOK'),jdecode(''), jdecode('%2F7046.html'), 'true',[],'',''],
	['PAGE','42522',jdecode('SHOP+ONLINE'),jdecode(''), jdecode('%2F42522.html'), 'true',[],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Antique';
theSitetree.paletteFamily='E58F12';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='11063';
theSitetree.graphicsetId='11833';
theSitetree.contentColor='D1C3A6';
theSitetree.contentBGColor='856A3B';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hostway_generic',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Antique',
				paletteFamily: 	'E58F12',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'11063',
				graphicsetId: 	'11833',
				contentColor: 	'D1C3A6',
				contentBGColor: '856A3B',
				a_color: 		'664F23',
				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['7008']=webappMappings['7008-8792']={
webappId:    '7008',
documentId:  '6920',
internalId:  '8792',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-7046ahw050inz9vs']={
webappId:    '1002',
documentId:  '7046',
internalId:  '7046ahw050inz9vs',
customField: 'icq=false'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '7109',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6701',
internalId:  '',
customField: '20111130-090108'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6701',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-7773299']={
webappId:    '1501',
documentId:  '6701',
internalId:  '7773299',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6752',
internalId:  '',
customField: '20110123-211944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38801',
internalId:  '',
customField: '20111130-085154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42001',
internalId:  '',
customField: '20111130-113347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6815',
internalId:  '',
customField: '20110131-221507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6836',
internalId:  '',
customField: '20111130-090017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6857',
internalId:  '',
customField: '20100928-054637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6878',
internalId:  '',
customField: '20101025-061820'
};
webappMappings['7005']=webappMappings['7005-607']={
webappId:    '7005',
documentId:  '23222',
internalId:  '607',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6920',
internalId:  '',
customField: '20100719-235815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7401',
internalId:  '',
customField: '20100802-191804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6941',
internalId:  '',
customField: '20111129-180050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6962',
internalId:  '',
customField: '20110826-095037'
};
webappMappings['7060']=webappMappings['7060-15e279457174bbb830a649b630aaca36']={
webappId:    '7060',
documentId:  '23243',
internalId:  '15e279457174bbb830a649b630aaca36',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23285',
internalId:  '',
customField: '20100928-061821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33801',
internalId:  '',
customField: '20100818-235130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7046',
internalId:  '',
customField: '20100928-055236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7067',
internalId:  '',
customField: '20100928-063510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23264',
internalId:  '',
customField: '20111130-085635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7109',
internalId:  '',
customField: '20110210-081024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7522',
internalId:  '',
customField: '20100802-194040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23243',
internalId:  '',
customField: '20110113-093043'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '6701',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US::;language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-d7b8126b4dab0ec70310505d9603a475']={
webappId:    '7060',
documentId:  '23264',
internalId:  'd7b8126b4dab0ec70310505d9603a475',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-dfd9d56c19c6f6ccc0b22b0907a02e2d']={
webappId:    '7060',
documentId:  '23285',
internalId:  'dfd9d56c19c6f6ccc0b22b0907a02e2d',
customField: 'language:en;country:US;'
};
webappMappings['7050']=webappMappings['7050-2875']={
webappId:    '7050',
documentId:  '7522',
internalId:  '2875',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25101',
internalId:  '',
customField: '20111130-110258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33001',
internalId:  '',
customField: '20111130-101343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23001',
internalId:  '',
customField: '20100708-215932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23222',
internalId:  '',
customField: '20100928-063136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27922',
internalId:  '',
customField: '20110113-092825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27943',
internalId:  '',
customField: '20110113-092901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32401',
internalId:  '',
customField: '20111130-110053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42501',
internalId:  '',
customField: '20111130-105828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42522',
internalId:  '',
customField: '20100908-220305'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INZ9VS';
var companyName   = 'Bakers+Park';
var htmlTitle	  = 'Bakers+Park';
var metaKeywords  = 'cakes%2C+chcoclate%2C+cookies%2C+pastries%2C+wedding+cake%2C+birthday+cake%2C+jelly+belly%2Cwilton%2C+course+1%2Ccourse+2%2Ccourse+3%2C+gluten+free%2C+sugar+free%2C+custom+cake+childrens+birthday+cake+';
var metaContents  = 'cakes%2C+chocolates%2Choliday+cakes%2C+christmas+deserts%2C+christmas+cookies%2Crum+cake%2C+birthday+cake+%2C+wedding+cake+%2C+catonsville%2Cbaltimore+%2C+gluten+free+cookies%2C+sugar+free+cakes+%2C+egg+free+cakes%2C';
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();
};

