/* [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','2701',jdecode('Home'),jdecode(''),'/2701.html','true',[],''],
	['PAGE','2752',jdecode('Design%2FFabricate%2FBuild'),jdecode(''),'/2752.html','true',[],''],
	['PAGE','2815',jdecode('Shapes+and+Forms'),jdecode(''),'/2815.html','true',[],''],
	['PAGE','8401',jdecode('Fabric+and+Structure'),jdecode(''),'/8401.html','true',[],''],
	['PAGE','2773',jdecode('Fabric+Architecture'),jdecode(''),'/2773.html','true',[],''],
	['PAGE','2836',jdecode('Make+Mine+Sustainable'),jdecode(''),'/2836.html','true',[],''],
	['PAGE','2794',jdecode('How+much+does+it+cost%3F'),jdecode(''),'/2794.html','true',[],''],
	['PAGE','2857',jdecode('Resources%2FLinks%2FCalendar'),jdecode(''),'/2857.html','true',[],''],
	['PAGE','2878',jdecode('Contact+Me'),jdecode(''),'/2878.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='D72B2B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10893';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Alpha',
				paletteFamily: 	'D72B2B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10893',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'D72B2B',
				e_color: 		'D72B2B',
				f_color: 		'D72B2B',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2701',
internalId:  '',
customField: '20090426-213043'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2701',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-12034042']={
webappId:    '1501',
documentId:  '2701',
internalId:  '12034042',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2752',
internalId:  '',
customField: '20090426-235248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2773',
internalId:  '',
customField: '20090426-223848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2794',
internalId:  '',
customField: '20090813-103211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2815',
internalId:  '',
customField: '20090426-215250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2836',
internalId:  '',
customField: '20090426-223936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2857',
internalId:  '',
customField: '20090426-233158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2878',
internalId:  '',
customField: '20090425-101813'
};
webappMappings['7008']=webappMappings['7008-11205']={
webappId:    '7008',
documentId:  '2878',
internalId:  '11205',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8401',
internalId:  '',
customField: '20090426-223802'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN2QW8';
var companyName   = 'FabricArchitect.com';
var htmlTitle	  = 'Sam+Armijos%2C+AIA%2C+FabricArchitect.com';
var metaKeywords  = 'Sam+Armijos%2C+Samuel+Armijos%2C+Fabric+Structures%2C+Fabric+Architecture%2C+Tension+Fabric+Structures%2C+Tension+Membrane+Structures%2C+Fabritec%2C+Fabritec+Structures%2C+Samuel+J.+Armijos%2C+awnings%2C+umbrellas%2C+canopies%2C+tents%2C+band+shells%2C+FabricArchitect%2C+Birdair%2C+Architectural+Fabric+Structures%2C+Shade+Structures%2C+Sunports%2C+solar+canopies%2C+transit+shelters%2C+bus+shelters%2C+outdoor+classrooms%2C+membrane+structures%2C+facades%2C+covered+parking%2C+covered+walkways%2C+retractable+structures%2C+covered+bleachers%2C+ferry+terminals%2C+fabric+roof%2C+tensioned+fabric+roof%2C+tensioned+fabric+systems%2C+clear+span%2C+temporary+buildings%2C+festive+structures%2C+PTFE%2C+Ferrari+Pre-contraint%2C+Ferrari+Textile%2C+Eide%2C+Tension+Structures%2C+Sheerfill%2C+Tenara%2C+Shelter-Rite%2C+Tedlar%2C+Structurflex%2C+Span+Systems%2C+Anchor+Industries%2C+Gore%2C+Seaman%2C+Naizil%2C+Mehler%2C+ETFE%2C+HDPE%2C+amphitheaters%2C+NFPA701%2C+ASTM+E84%2C+Textile+Architecture%2C+ASTM+E108';
var metaContents  = 'FabricArchitect.com+is+the+website+of+Sam+Armijos%2C+AIA%2C+Architect+and+Author+of+Fabric+Architecture%3A+Creative+Resources+for+Shade%2C+Signage+and+Shelter.+Armijos+is+an+experienced+designer+and+builder+of+fabric+structures+from+awnings+to+dome+stadiums+and+has+a+network+of+consultants+and+manufacturers+around+the+world.+He+is+Vice+President+of+Fabritec+Structures%2C+a+brand+of+USA+Shade+and+Fabric+Structures.';
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();
};
