/* [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','52',jdecode('Home'),jdecode(''),'/52.html','true',[],'',''],
	['PAGE','73',jdecode('About+us'),jdecode(''),'/73.html','true',[],'',''],
	['PAGE','100',jdecode('Contact+us'),jdecode(''),'/100.html','true',[],'',''],
	['PAGE','24712',jdecode('Current+Offers'),jdecode(''),'/24712.html','true',[],'',''],
	['PAGE','28212',jdecode('Earthly+News'),jdecode(''),'/28212.html','true',[],'',''],
	['PAGE','668',jdecode('Assortment'),jdecode(''),'/668.html','true',[],'',''],
	['PAGE','1385',jdecode('Signature+Designs'),jdecode(''),'/1385.html','true',[],'',''],
	['PAGE','1592',jdecode('Corporate+Designs'),jdecode(''),'/1592.html','true',[],'',''],
	['PAGE','1945',jdecode('Funeral+Designs'),jdecode(''),'/1945.html','true',[],'',''],
	['PAGE','3401',jdecode('Decorating+Service'),jdecode(''),'/3401.html','true',[],'',''],
	['PAGE','2043',jdecode('Community+Events'),jdecode(''),'/2043.html','true',[],'',''],
	['PAGE','10901',jdecode('Sponsorships'),jdecode(''),'/10901/index.html','true',[ 
		['PAGE','10922',jdecode('BBBS+of+NYC'),jdecode(''),'/10901/10922.html','false',[],'',''],
		['PAGE','10943',jdecode('Making+Strides'),jdecode(''),'/10901/10943.html','false',[],'','']
	],'',''],
	['PAGE','21801',jdecode('Partnerships'),jdecode(''),'/21801.html','true',[],'',''],
	['PAGE','1409',jdecode('Directions'),jdecode(''),'/1409.html','true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Angkor';
theSitetree.paletteFamily='A5B351';
theSitetree.keyvisualId='6861';
theSitetree.keyvisualName='kv_6861.jpg';
theSitetree.fontsetId='11212';
theSitetree.graphicsetId='12031';
theSitetree.contentColor='657025';
theSitetree.contentBGColor='C1CF70';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Angkor',
				paletteFamily: 	'A5B351',
				keyvisualId: 	'6861',
				keyvisualName: 	'kv_6861.jpg',
				fontsetId: 		'11212',
				graphicsetId: 	'12031',
				contentColor: 	'657025',
				contentBGColor: 'C1CF70',
				a_color: 		'C1CF70',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-6cb95b39df2470962854a5659c2673e8']={
webappId:    '7060',
documentId:  '1945',
internalId:  '6cb95b39df2470962854a5659c2673e8',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '52',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '1409',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['7060']=webappMappings['7060-de61e3dc60ddaacb4d2e7315d4be84cb']={
webappId:    '7060',
documentId:  '1945',
internalId:  'de61e3dc60ddaacb4d2e7315d4be84cb',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-0904c0438f7aacc11b986c3b574e16a9']={
webappId:    '7060',
documentId:  '1592',
internalId:  '0904c0438f7aacc11b986c3b574e16a9',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-1f573ecaa5d12a8e2e925e45534b62d9']={
webappId:    '7060',
documentId:  '1385',
internalId:  '1f573ecaa5d12a8e2e925e45534b62d9',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-5bf29a807ce34b2b681427566c9e90fd']={
webappId:    '7060',
documentId:  '1592',
internalId:  '5bf29a807ce34b2b681427566c9e90fd',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-ecf37a83c0b6bad088733b98251ff26d']={
webappId:    '7060',
documentId:  '1945',
internalId:  'ecf37a83c0b6bad088733b98251ff26d',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52',
internalId:  '',
customField: '20100430-161217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73',
internalId:  '',
customField: '20091201-175101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100',
internalId:  '',
customField: '20091202-151533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24712',
internalId:  '',
customField: '20100617-120226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '668',
internalId:  '',
customField: '20090713-203106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1385',
internalId:  '',
customField: '20090713-201921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1592',
internalId:  '',
customField: '20090713-203028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1945',
internalId:  '',
customField: '20090713-202618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3401',
internalId:  '',
customField: '20090713-202702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2043',
internalId:  '',
customField: '20090713-202727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20090713-202808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10922',
internalId:  '',
customField: '20080925-090816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10943',
internalId:  '',
customField: '20080907-203937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20091201-180312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1409',
internalId:  '',
customField: '20091202-152901'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '52',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US::;language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28212',
internalId:  '',
customField: '20100617-121133'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INX29Y';
var companyName   = 'Earthly+Horizons+Floral+Designs';
var htmlTitle	  = 'Earthly+Horizons+Floral+Designs';
var metaKeywords  = 'flowers%2C+floral%2C+creations%2C+designs%2C+earth%2C+precious%2C+horizons%2C+gifts%2C+earthly%2C+plants%2C+weddings%2C+funerals%2C+arrangements%2C+get+well%2C+anniversaries%2C+birthday%2C+floral+cakes%2C+custom+flowers%2C+corporate+designs%2C+table+designs%2C+funeral+designs%2C++';
var metaContents  = '';
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();
};
