/* [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','1801',jdecode('Home'),jdecode(''),'/1801.html','true',[],'',''],
	['PAGE','2743',jdecode('About+Us'),jdecode(''),'/2743.html','true',[],'',''],
	['PAGE','9801',jdecode('Philosophy'),jdecode(''),'/9801.html','true',[],'',''],
	['PAGE','9822',jdecode('Vision'),jdecode(''),'/9822.html','true',[],'',''],
	['PAGE','2701',jdecode('Services'),jdecode(''),'/2701/index.html','true',[ 
		['PAGE','7601',jdecode('Land+Planning'),jdecode(''),'/2701/7601.html','true',[],'',''],
		['PAGE','7622',jdecode('Engineering'),jdecode(''),'/2701/7622.html','true',[],'',''],
		['PAGE','7643',jdecode('Landscape+Architecture'),jdecode(''),'/2701/7643.html','true',[],'','']
	],'',''],
	['PAGE','2722',jdecode('Portfolio'),jdecode(''),'/2722/index.html','true',[ 
		['PAGE','7664',jdecode('Apartments'),jdecode(''),'/2722/7664.html','true',[],'',''],
		['PAGE','7685',jdecode('Subdivisions'),jdecode(''),'/2722/7685.html','true',[],'',''],
		['PAGE','9843',jdecode('Amenity'),jdecode(''),'/2722/9843.html','true',[],'',''],
		['PAGE','9864',jdecode('Landscape'),jdecode(''),'/2722/9864.html','true',[],'',''],
		['PAGE','9885',jdecode('Hardscape'),jdecode(''),'/2722/9885.html','true',[],'','']
	],'',''],
	['PAGE','2764',jdecode('Contact+us'),jdecode(''),'/2764.html','true',[ 
		['ITEM','20601',jdecode('How+to+find+us'),jdecode(''),'http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=255+Village+Parkway,+Marietta,+GA&sll=37.0625,-95.677068&sspn=55.718442,114.169922&ie=UTF8&hq=&hnear=255+Village+Pkwy+NE,+Marietta,+Cobb,+Georgia+30067&z=17','true',[],'','_blank']
	],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Medium';
theSitetree.paletteFamily='01343D';
theSitetree.keyvisualId='2152';
theSitetree.keyvisualName='architektur.jpg';
theSitetree.fontsetId='355';
theSitetree.graphicsetId='409';
theSitetree.contentColor='F2880A';
theSitetree.contentBGColor='01343D';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Medium',
				paletteFamily: 	'01343D',
				keyvisualId: 	'2152',
				keyvisualName: 	'architektur.jpg',
				fontsetId: 		'355',
				graphicsetId: 	'409',
				contentColor: 	'F2880A',
				contentBGColor: '01343D',
				a_color: 		'01343D',
				b_color: 		'8EBFC6',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20101005-100557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2764',
internalId:  '',
customField: '20100928-190426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2722',
internalId:  '',
customField: '20101005-110508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2701',
internalId:  '',
customField: '20101004-092113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7664',
internalId:  '',
customField: '20101005-151049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9801',
internalId:  '',
customField: '20101004-091204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9822',
internalId:  '',
customField: '20101004-091546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2743',
internalId:  '',
customField: '20101004-090811'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9843',
internalId:  '',
customField: '20101005-152530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9885',
internalId:  '',
customField: '20101005-152749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9864',
internalId:  '',
customField: '20101005-152631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7685',
internalId:  '',
customField: '20101005-152412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20100927-164324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7622',
internalId:  '',
customField: '20100927-164324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7643',
internalId:  '',
customField: '20100927-164324'
};
webappMappings['7060']=webappMappings['7060-57aed2d2e61bb05bfbdfb5696947fc75']={
webappId:    '7060',
documentId:  '7664',
internalId:  '57aed2d2e61bb05bfbdfb5696947fc75',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-4f6b580006f25a8fb60e24d69acb034c']={
webappId:    '7060',
documentId:  '7685',
internalId:  '4f6b580006f25a8fb60e24d69acb034c',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-9fcacf298e6037b73c9ca630622891ed']={
webappId:    '7060',
documentId:  '9843',
internalId:  '9fcacf298e6037b73c9ca630622891ed',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-267e3739bf3f113e79f7254421f9786c']={
webappId:    '7060',
documentId:  '9864',
internalId:  '267e3739bf3f113e79f7254421f9786c',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-8ca977ea6d119b73629aa0a148342158']={
webappId:    '7060',
documentId:  '9885',
internalId:  '8ca977ea6d119b73629aa0a148342158',
customField: 'language:en;country:US;'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I71G3F';
var companyName   = 'J.+Lancaster+Associates+Inc.';
var htmlTitle	  = 'J.+Lancaster+Associates%2C+inc.+-+Planners+-+Engineers+-+Landscape+Architects';
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();
};

