/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],''],
	['PAGE','452',jdecode('Kim+and+Company+Prices'),jdecode(''),'/452.html','true',[],''],
	['PAGE','86588',jdecode('2010+Wedding+flowers'),jdecode(''),'/86588.html','true',[],''],
	['PAGE','70390',jdecode('2009+Wedding+flowers'),jdecode(''),'/70390.html','true',[],''],
	['PAGE','85388',jdecode('2009+more+flowers'),jdecode(''),'/85388.html','true',[],''],
	['PAGE','55501',jdecode('2008+Wedding+Flowers'),jdecode(''),'/55501.html','true',[],''],
	['PAGE','473',jdecode('2007+Wedding+Flowers'),jdecode(''),'/473.html','true',[],''],
	['PAGE','39301',jdecode('2006+Wedding+Flowers'),jdecode(''),'/39301.html','true',[],''],
	['PAGE','42901',jdecode('Amber+and+Ryan'),jdecode(''),'/42901.html','true',[],''],
	['PAGE','14701',jdecode('Josh+and+Kristy'),jdecode(''),'/14701.html','true',[],''],
	['PAGE','41701',jdecode('Kristine%26%23x27%3Bs+Wedding'),jdecode(''),'/41701.html','true',[],''],
	['PAGE','79920',jdecode('Karen+and+Brian'),jdecode(''),'/79920.html','true',[],''],
	['PAGE','79166',jdecode('Meredith+and+Michael'),jdecode(''),'/79166.html','true',[],''],
	['PAGE','37401',jdecode('More+Flowers'),jdecode(''),'/37401.html','true',[],''],
	['PAGE','80688',jdecode('Flowers+on+Cakes'),jdecode(''),'/80688.html','true',[],''],
	['PAGE','494',jdecode('Elopement+Packages'),jdecode(''),'/494.html','true',[],''],
	['PAGE','599',jdecode('Client+Reviews'),jdecode(''),'/599.html','true',[],''],
	['PAGE','87888',jdecode('Special+Discount'),jdecode(''),'/87888.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Blossom';
theSitetree.paletteFamily='7F1EA8';
theSitetree.keyvisualId='7103';
theSitetree.keyvisualName='kv_7103.jpg';
theSitetree.fontsetId='16395';
theSitetree.graphicsetId='12133';
theSitetree.contentColor='7F1EA8';
theSitetree.contentBGColor='E5E2E2';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Blossom',
				paletteFamily: 	'7F1EA8',
				keyvisualId: 	'7103',
				keyvisualName: 	'kv_7103.jpg',
				fontsetId: 		'16395',
				graphicsetId: 	'12133',
				contentColor: 	'7F1EA8',
				contentBGColor: 'E5E2E2',
				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: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100327-190620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20090826-132333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20080219-140224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39301',
internalId:  '',
customField: '20080219-140514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42901',
internalId:  '',
customField: '20080215-143252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79166',
internalId:  '',
customField: '20090827-144956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20081215-202118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41701',
internalId:  '',
customField: '20081215-202258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37401',
internalId:  '',
customField: '20080220-174055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20100408-190152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79920',
internalId:  '',
customField: '20090827-151533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80688',
internalId:  '',
customField: '20090827-153706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87888',
internalId:  '',
customField: '20100605-150217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20080214-004730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70390',
internalId:  '',
customField: '20100327-191535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55501',
internalId:  '',
customField: '20090827-142101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86588',
internalId:  '',
customField: '20100510-175704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85388',
internalId:  '',
customField: '20100408-190618'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN21BH';
var companyName   = 'Kim+and+Company+++++++++++++++++++++++++++++++++++++970-577-1621';
var htmlTitle	  = 'Kim+and+Company';
var metaKeywords  = '';
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();
};
