/* [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(''), jdecode('%2F5743.html'), 'true',[],'',''],
	['PAGE','5836',jdecode('About+us'),jdecode(''), jdecode('%2F5836.html'), 'true',[],'',''],
	['PAGE','10643',jdecode('Services'),jdecode(''), jdecode('%2F10643.html'), 'true',[],'',''],
	['PAGE','5794',jdecode('Projects'),jdecode(''), jdecode('%2F5794%2Findex.html'), 'true',[ 
		['PAGE','42254',jdecode('SDCCU+Oceanside'),jdecode(''), jdecode('%2F5794%2F42254.html'), 'true',[],'',''],
		['PAGE','42275',jdecode('A-way+Motors'),jdecode(''), jdecode('%2F5794%2F42275.html'), 'true',[],'',''],
		['PAGE','30954',jdecode('Helen+Woodward'),jdecode(''), jdecode('%2F5794%2F30954.html'), 'true',[],'',''],
		['PAGE','41354',jdecode('Whispering+Winds'),jdecode(''), jdecode('%2F5794%2F41354.html'), 'true',[],'',''],
		['PAGE','40454',jdecode('Cubic+Exterior+Facade'),jdecode(''), jdecode('%2F5794%2F40454.html'), 'true',[],'',''],
		['PAGE','30975',jdecode('Toyota+El+Cajon'),jdecode(''), jdecode('%2F5794%2F30975.html'), 'true',[],'',''],
		['PAGE','30996',jdecode('Toyota+Santee'),jdecode(''), jdecode('%2F5794%2F30996.html'), 'true',[],'',''],
		['PAGE','30854',jdecode('St.+Paul%26%23x27%3Bs+Church'),jdecode(''), jdecode('%2F5794%2F30854.html'), 'true',[],'',''],
		['PAGE','31038',jdecode('San+Miguel+Comm.'),jdecode(''), jdecode('%2F5794%2F31038.html'), 'true',[],'',''],
		['PAGE','28775',jdecode('Zumaque+Fire+Rebuild'),jdecode(''), jdecode('%2F5794%2F28775.html'), 'true',[],'',''],
		['PAGE','21643',jdecode('Pine+Hill+Rd.+Residence'),jdecode(''), jdecode('%2F5794%2F21643.html'), 'true',[],'',''],
		['PAGE','25475',jdecode('Bandini+St.+Remodel'),jdecode(''), jdecode('%2F5794%2F25475.html'), 'true',[],'',''],
		['PAGE','20843',jdecode('K.+Jessee+Office+Bldg'),jdecode(''), jdecode('%2F5794%2F20843.html'), 'true',[],'',''],
		['PAGE','25454',jdecode('K.+Jessee+TI'),jdecode(''), jdecode('%2F5794%2F25454.html'), 'true',[],'',''],
		['PAGE','30154',jdecode('Camp+Oakbridge'),jdecode(''), jdecode('%2F5794%2F30154.html'), 'true',[],'',''],
		['PAGE','23043',jdecode('Phoenix+House'),jdecode(''), jdecode('%2F5794%2F23043.html'), 'true',[],'',''],
		['PAGE','23064',jdecode('SDCCU+Poway'),jdecode(''), jdecode('%2F5794%2F23064.html'), 'true',[],'',''],
		['PAGE','25496',jdecode('Maintenance++Bldg'),jdecode(''), jdecode('%2F5794%2F25496.html'), 'true',[],'',''],
		['PAGE','28754',jdecode('Vons+2735'),jdecode(''), jdecode('%2F5794%2F28754.html'), 'true',[],'',''],
		['PAGE','24343',jdecode('Sprout%26%23x27%3Bs+Market'),jdecode(''), jdecode('%2F5794%2F24343.html'), 'true',[],'',''],
		['PAGE','25538',jdecode('Henry%26%23x27%3Bs+Market'),jdecode(''), jdecode('%2F5794%2F25538.html'), 'true',[],'','']
	],'',''],
	['PAGE','5815',jdecode('Contact'),jdecode(''), jdecode('%2F5815.html'), 'true',[],'',''],
	['PAGE','17043',jdecode('Resources'),jdecode(''), jdecode('%2F17043.html'), 'true',[],'','']];
var siteelementCount=27;
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 prodDef={
  wl_name: 'grp13-cbeyon',
  product: 'WSCSYSSSSLYTC2ZA'
};
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: '20110727-183948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5815',
internalId:  '',
customField: '20110608-160856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5836',
internalId:  '',
customField: '20110331-153450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20843',
internalId:  '',
customField: '20100524-154403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17043',
internalId:  '',
customField: '20110727-184016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10643',
internalId:  '',
customField: '20110215-184343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21643',
internalId:  '',
customField: '20091203-174338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41354',
internalId:  '',
customField: '20110331-162553'
};
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-160058'
};
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: '20100524-154149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30154',
internalId:  '',
customField: '20100118-165211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30854',
internalId:  '',
customField: '20100524-153637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30954',
internalId:  '',
customField: '20110408-181159'
};
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:  '42254',
internalId:  '',
customField: '20110331-161532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31038',
internalId:  '',
customField: '20100524-153911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42275',
internalId:  '',
customField: '20110331-162253'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
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();
};

