/* [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','7601',jdecode('Home'),jdecode(''),'/7601.html','true',[],''],
	['PAGE','8201',jdecode('About+Us'),jdecode(''),'/8201.html','true',[],''],
	['PAGE','7673',jdecode('Veterans'),jdecode(''),'/7673.html','true',[],''],
	['PAGE','7694',jdecode('Granite+Markers'),jdecode(''),'/7694.html','true',[],''],
	['PAGE','10901',jdecode('Monuments'),jdecode(''),'/10901.html','true',[],''],
	['PAGE','10922',jdecode('Bronze+Markers'),jdecode(''),'/10922.html','true',[],''],
	['PAGE','7757',jdecode('Mausoleums'),jdecode(''),'/7757.html','true',[],''],
	['PAGE','18701',jdecode('Benches'),jdecode(''),'/18701.html','true',[],''],
	['PAGE','7778',jdecode('Memorial+Portraits+%26+Vases'),jdecode(''),'/7778.html','true',[],''],
	['PAGE','18722',jdecode('Tree+Memorials'),jdecode(''),'/18722.html','true',[],''],
	['PAGE','8222',jdecode('Signs+%26+Plaques'),jdecode(''),'/8222.html','true',[],''],
	['PAGE','10943',jdecode('Pet+Memorials'),jdecode(''),'/10943.html','true',[],''],
	['PAGE','10964',jdecode('Design+Ideas'),jdecode(''),'/10964.html','true',[],''],
	['PAGE','33522',jdecode('Urns+%26+Solar+Candles+%26+Misc.'),jdecode(''),'/33522.html','true',[],''],
	['PAGE','8243',jdecode('Testimonials'),jdecode(''),'/8243.html','true',[],''],
	['PAGE','10985',jdecode('FAQ'),jdecode(''),'/10985.html','true',[],''],
	['PAGE','8264',jdecode('Contact+Us'),jdecode(''),'/8264.html','true',[],'']];
var siteelementCount=17;
theSitetree.topTemplateName='Blossom';
theSitetree.paletteFamily='AC2E53';
theSitetree.keyvisualId='7103';
theSitetree.keyvisualName='kv_7103.jpg';
theSitetree.fontsetId='16394';
theSitetree.graphicsetId='12128';
theSitetree.contentColor='AC2E53';
theSitetree.contentBGColor='E5E2E2';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Blossom',
				paletteFamily: 	'AC2E53',
				keyvisualId: 	'7103',
				keyvisualName: 	'kv_7103.jpg',
				fontsetId: 		'16394',
				graphicsetId: 	'12128',
				contentColor: 	'AC2E53',
				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: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20091217-143444'
};
webappMappings['7008']=webappMappings['7008-11223']={
webappId:    '7008',
documentId:  '8264',
internalId:  '11223',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '7601',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-13954716']={
webappId:    '1501',
documentId:  '7601',
internalId:  '13954716',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20100709-200438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7673',
internalId:  '',
customField: '20100612-145755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7694',
internalId:  '',
customField: '20091221-160405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7757',
internalId:  '',
customField: '20091117-180653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7778',
internalId:  '',
customField: '20091215-151534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8222',
internalId:  '',
customField: '20090516-164221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8243',
internalId:  '',
customField: '20091216-105333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8264',
internalId:  '',
customField: '20090411-205411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20091221-154338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10922',
internalId:  '',
customField: '20091110-172504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10943',
internalId:  '',
customField: '20100224-111637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10964',
internalId:  '',
customField: '20091124-150624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10985',
internalId:  '',
customField: '20091216-102616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33522',
internalId:  '',
customField: '20091217-144341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20091119-181715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18722',
internalId:  '',
customField: '20091221-153941'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INEBMY';
var companyName   = 'Kapsa+Monument+Co.';
var htmlTitle	  = 'Kapsa+Monument+Co+Headstones+Monuments+Mausoleums+Granite+Bronze+Memorials+Reasonable+Prices+Vases+Downers+Grove+Chicago+Chicagoland+IL+Cemetery+Markers+Dypage+Cook+Kane+County+Family+Owned+Operated+';
var metaKeywords  = 'Kapsa+Monument+Co+Headstones+Monuments+Mausoleums+Granite+Bronze+Memorials+Reasonable+Prices+Vases+Downers+Grove+Chicago+Chicagoland+IL+Cemetery+Markers+Dypage+Cook+Kane+County+Family+Owned+Operated++Highest+Quality++Markers+Family+Ceramic+Pictures+Lisle+Westmont+Hillside+Burr+Ridge+Oak+Brook+Naperville+Warrenville+Winfield+Westchester+Skokie+Morton+Buffalo+Grove+Lombard+Wheaton+Glen+Ellyn+St.+Charles+Barrington+Carol+Stream+Glendale+Heights+Lemont+Plainfield+Oswego+Berwyn+Cicero+Riverside++Pet+memorials+signs+plaques+donor+Veteran+Discount';
var metaContents  = 'Kapsa+Monument+Co+Headstones+Monuments+Mausoleums+Granite+Bronze+Memorials+Reasonable+Prices+Vases+Downers+Grove+Chicago+Chicagoland+IL+Cemetery+Markers+Dypage+Cook+Kane+County+Family+Owned+Operated+Highest+Quality++Markers+Family+Ceramic+Pictures+Lisle+Westmont+Hillside+Burr+Ridge+Oak+Brook+Naperville+Warrenville+Winfield+Westchester+Skokie+Morton+Buffalo+Grove+Lombard+Wheaton+Glen+Ellyn+St.+Charles+Barrington+Carol+Stream+Glendale+Heights+Lemont+Plainfield+Oswego+Berwyn+Cicero+Riverside+Pet+memorials+signs+plaques+donor+Veteran+Discount';
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();
};
