/* [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','5743',jdecode('Home'),jdecode(''),'/5743.html','true',[],'',''],
	['PAGE','5836',jdecode('About+us'),jdecode(''),'/5836.html','true',[],'',''],
	['PAGE','10643',jdecode('Services'),jdecode(''),'/10643.html','true',[],'',''],
	['PAGE','5794',jdecode('Projects'),jdecode(''),'/5794/index.html','true',[ 
		['PAGE','30954',jdecode('Helen+Woodward'),jdecode(''),'/5794/30954.html','true',[],'',''],
		['PAGE','41354',jdecode('Whispering+Winds'),jdecode(''),'/5794/41354.html','true',[],'',''],
		['PAGE','31017',jdecode('Couser+Canyon+Remodel'),jdecode(''),'/5794/31017.html','true',[],'',''],
		['PAGE','40454',jdecode('Cubic+Exterior+Facade'),jdecode(''),'/5794/40454.html','true',[],'',''],
		['PAGE','30975',jdecode('Toyota+El+Cajon'),jdecode(''),'/5794/30975.html','true',[],'',''],
		['PAGE','30996',jdecode('Toyota+Santee'),jdecode(''),'/5794/30996.html','true',[],'',''],
		['PAGE','30854',jdecode('St.+Paul%26%23x27%3Bs+Church'),jdecode(''),'/5794/30854.html','true',[],'',''],
		['PAGE','31038',jdecode('San+Miguel+Comm.'),jdecode(''),'/5794/31038.html','true',[],'',''],
		['PAGE','28775',jdecode('Zumaque+Fire+Rebuild'),jdecode(''),'/5794/28775.html','true',[],'',''],
		['PAGE','21643',jdecode('Pine+Hill+Rd.+Residence'),jdecode(''),'/5794/21643.html','true',[],'',''],
		['PAGE','25475',jdecode('Bandini+St.+Remodel'),jdecode(''),'/5794/25475.html','true',[],'',''],
		['PAGE','20843',jdecode('K.+Jessee+Office+Bldg'),jdecode(''),'/5794/20843.html','true',[],'',''],
		['PAGE','25454',jdecode('K.+Jessee+TI'),jdecode(''),'/5794/25454.html','true',[],'',''],
		['PAGE','30154',jdecode('Camp+Oakbridge'),jdecode(''),'/5794/30154.html','true',[],'',''],
		['PAGE','23043',jdecode('Phoenix+House'),jdecode(''),'/5794/23043.html','true',[],'',''],
		['PAGE','23064',jdecode('SDCCU+Poway'),jdecode(''),'/5794/23064.html','true',[],'',''],
		['PAGE','25496',jdecode('Maintenance++Bldg'),jdecode(''),'/5794/25496.html','true',[],'',''],
		['PAGE','28754',jdecode('Vons+2735'),jdecode(''),'/5794/28754.html','true',[],'',''],
		['PAGE','24343',jdecode('Sprout%26%23x27%3Bs+Market'),jdecode(''),'/5794/24343.html','true',[],'',''],
		['PAGE','25538',jdecode('Henry%26%23x27%3Bs+Market'),jdecode(''),'/5794/25538.html','true',[],'','']
	],'',''],
	['PAGE','5815',jdecode('Contact'),jdecode(''),'/5815.html','true',[],'',''],
	['PAGE','17043',jdecode('Resources'),jdecode(''),'/17043.html','true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Architekt';
theSitetree.paletteFamily='C8C0A4';
theSitetree.keyvisualId='1690';
theSitetree.keyvisualName='beratung.jpg';
theSitetree.fontsetId='280';
theSitetree.graphicsetId='347';
theSitetree.contentColor='006633';
theSitetree.contentBGColor='C8C0A4';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Architekt',
				paletteFamily: 	'C8C0A4',
				keyvisualId: 	'1690',
				keyvisualName: 	'beratung.jpg',
				fontsetId: 		'280',
				graphicsetId: 	'347',
				contentColor: 	'006633',
				contentBGColor: 'C8C0A4',
				a_color: 		'C8C0A4',
				b_color: 		'5C5438',
				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:  '5743',
internalId:  '',
customField: '20100118-142225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5794',
internalId:  '',
customField: '20100407-173839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5815',
internalId:  '',
customField: '20100120-171942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5836',
internalId:  '',
customField: '20091217-131529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20843',
internalId:  '',
customField: '20091203-152832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17043',
internalId:  '',
customField: '20100120-164743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10643',
internalId:  '',
customField: '20100120-182916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21643',
internalId:  '',
customField: '20091203-174338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41354',
internalId:  '',
customField: '20100524-164149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23043',
internalId:  '',
customField: '20091203-165453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23064',
internalId:  '',
customField: '20091203-175443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24343',
internalId:  '',
customField: '20091204-122134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25454',
internalId:  '',
customField: '20091204-175701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25475',
internalId:  '',
customField: '20091204-180430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25496',
internalId:  '',
customField: '20091204-180957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40454',
internalId:  '',
customField: '20100524-154748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25538',
internalId:  '',
customField: '20091204-181607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28754',
internalId:  '',
customField: '20091217-190142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28775',
internalId:  '',
customField: '20091217-191022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30154',
internalId:  '',
customField: '20100118-165211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30854',
internalId:  '',
customField: '20100209-162256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30954',
internalId:  '',
customField: '20100120-183724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30975',
internalId:  '',
customField: '20100118-145607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30996',
internalId:  '',
customField: '20100209-161248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31017',
internalId:  '',
customField: '20100209-161832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31038',
internalId:  '',
customField: '20100118-164039'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30I7C12T';
var companyName   = 'Starrett+Construction%2C+Inc.';
var htmlTitle	  = '';
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();
};
