/* [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','2101',jdecode('Home'),jdecode(''),'/2101.html','true',[],''],
	['PAGE','2122',jdecode('About+Us'),jdecode(''),'/2122.html','true',[],''],
	['PAGE','2701',jdecode('Menu'),jdecode(''),'/2701.html','true',[],''],
	['PAGE','2194',jdecode('Gallery'),jdecode(''),'/2194/index.html','true',[ 
		['PAGE','2215',jdecode('Pretty+Cakes'),jdecode(''),'/2194/2215.html','true',[],''],
		['PAGE','2901',jdecode('Sculpted+Cakes'),jdecode(''),'/2194/2901.html','true',[],''],
		['PAGE','3701',jdecode('%22Copy%22+Cakes'),jdecode(''),'/2194/3701.html','true',[],'']
	],''],
	['PAGE','2722',jdecode('Booking+and+Tasting'),jdecode(''),'/2722.html','true',[],''],
	['PAGE','2173',jdecode('He+Said+She+Said'),jdecode(''),'/2173.html','true',[],''],
	['PAGE','8101',jdecode('Confection+Connection'),jdecode(''),'/8101.html','false',[],''],
	['PAGE','3601',jdecode('Specials'),jdecode(''),'/3601.html','false',[],''],
	['PAGE','2257',jdecode('Contact+Us'),jdecode(''),'/2257.html','true',[],''],
	['PAGE','2278',jdecode('Vendor+Spotlight'),jdecode(''),'/2278.html','true',[],''],
	['PAGE','11501',jdecode('google5b170b099c6276be.html'),jdecode(''),'/11501.html','false',[],'']];
var siteelementCount=14;
theSitetree.topTemplateName='Antique';
theSitetree.paletteFamily='D34CFA';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='11061';
theSitetree.graphicsetId='11839';
theSitetree.contentColor='D1C3A6';
theSitetree.contentBGColor='856A3B';
var theTemplate={
				name: 			'Antique',
				paletteFamily: 	'D34CFA',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'11061',
				graphicsetId: 	'11839',
				contentColor: 	'D1C3A6',
				contentBGColor: '856A3B',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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['7060']=webappMappings['7060-d6b07055a4746b7664f913b8c0a9711f']={
webappId:    '7060',
documentId:  '2215',
internalId:  'd6b07055a4746b7664f913b8c0a9711f',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-e6eb0d0fb5981cd4575704fe8167c4de']={
webappId:    '7060',
documentId:  '3701',
internalId:  'e6eb0d0fb5981cd4575704fe8167c4de',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-64c8e09ee1f56e2a96adb4396558c81d']={
webappId:    '7060',
documentId:  '2901',
internalId:  '64c8e09ee1f56e2a96adb4396558c81d',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2122',
internalId:  '',
customField: '20090307-080801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2173',
internalId:  '',
customField: '20090422-164710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20090307-092707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2701',
internalId:  '',
customField: '20090307-083713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2194',
internalId:  '',
customField: '20090307-085621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2215',
internalId:  '',
customField: '20090218-065335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2901',
internalId:  '',
customField: '20090307-081022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3701',
internalId:  '',
customField: '20090305-172322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2722',
internalId:  '',
customField: '20090307-081235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3601',
internalId:  '',
customField: '20090122-174134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8101',
internalId:  '',
customField: '20090307-082919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2257',
internalId:  '',
customField: '20090307-081934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2278',
internalId:  '',
customField: '20090307-080404'
};
webappMappings['7008']=webappMappings['7008-2318']={
webappId:    '7008',
documentId:  '2257',
internalId:  '2318',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11501',
internalId:  '',
customField: '20090317-181352'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INVLV9';
var companyName   = 'Special+cakes+for+special+moments.';
var htmlTitle	  = 'Tracy+Cakes+LLC...Custom+Specialty+Cakes+for+Every+Occasion';
var metaKeywords  = 'specialty+cakes%2C+custom+cakes%2C+wedding+cakes%2C+birthday+cakes%2C+kids+birthday+cakes%2C+Wedding+Cake%2C++Bridal+Fondant+Wedding+Cakes%2C+Long+Island+Wedding+Cake+Bakers%2C+Custom+Wedding+Cakes%2C+Wedding+Cakes+Of+Long+Island%2C+Long+Island+Bakeries%2CWedding+Cake+Designers%2C+Long+Island+Wedding+Cake+Designers%2C++Fondant+Wedding+Cakes%2C+LI+Bakeries%2C+Custom+Wedding+Cakes%2C+Long+Island%2C+LI%2C+New+York%2C+NY%2C+Queens%2C+Wedding+Cake+Bakery%2C+Wedding+Cakes+Of+Suffolk+County%2C+Bakeries+of+Long+Island+New+York%2C+Suffolk++Nassau+County+Long+Island%2C++Long+Island+Bakery%2C+New+York+Bakeries%2C+New+York+Bakery%2C+NY+Bakery%2C+NY+Bakeries%2C+picture+cakes%2C+photo+cakes%2C+create-a-cake%2C+cakes+by+mona%2C+sugar+chic%2C+madame+butterfly+cakes%2C+bridal+cakes%2C+grooms+cakes%2C++birthday+cakes%2C+cookies+favors%2C+long+island+party+services%2C++Specialty+Cakes%2C+princess+cakes%2C+long+island+princess+cakes%2C+princess+cakes+on+long+island%2C+character+birthday+cakes%2C+fondant+cakes%2C+sculpted+cakes%2C+designer+cakes';
var metaContents  = 'Tracy+Cakes...specializes+in+wedding+cakes%2C+birthday+cakes%2C+and+specialty+cakes+for+all+occasions.++We+serve+the+New+York+Metropolitan+Area%2C+including+Long+Island%2C+Brooklyn%2C+Queens%2C+Staten+Island+and+Manhattan.';
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();
};
