/* [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','1001',jdecode('Home'),jdecode(''),'/1001/index.html','true',[ 
		['PAGE','1052',jdecode('About+Us'),jdecode(''),'/1001/1052.html','false',[],'',''],
		['PAGE','16901',jdecode('Solutions'),jdecode(''),'/1001/16901.html','true',[],'',''],
		['PAGE','24601',jdecode('Expectations'),jdecode(''),'/1001/24601.html','true',[],'',''],
		['PAGE','14701',jdecode('Area+of+Service'),jdecode(''),'/1001/14701.html','true',[],'','']
	],'',''],
	['PAGE','37501',jdecode('Topics+of+Interest'),jdecode(''),'/37501/index.html','false',[ 
		['PAGE','37522',jdecode('ADA+Errors+%26+Omissions'),jdecode(''),'/37501/37522.html','true',[],'',''],
		['PAGE','48601',jdecode('Brick+Issues'),jdecode(''),'/37501/48601.html','true',[],'',''],
		['PAGE','8101',jdecode('Generated+Waste'),jdecode(''),'/37501/8101.html','true',[],'',''],
		['PAGE','57901',jdecode('Interactive+Menu'),jdecode(''),'/37501/57901.html','true',[],'',''],
		['PAGE','54201',jdecode('On-Line+Tools'),jdecode(''),'/37501/54201.html','true',[],'',''],
		['PAGE','76001',jdecode('Social+Media'),jdecode(''),'/37501/76001.html','true',[],'','']
	],'',''],
	['PAGE','10501',jdecode('Contact+us'),jdecode(''),'/10501/index.html','true',[ 
		['PAGE','49801',jdecode('Log+In'),jdecode(''),'/10501/49801.html','true',[],'','']
	],'',''],
	['PAGE','74801',jdecode('Search+Our+Site'),jdecode(''),'/74801.html','false',[],'',''],
	['PAGE','35001',jdecode('Opportunities'),jdecode(''),'/35001.html','false',[],'',''],
	['PAGE','18701',jdecode('Budget+Request'),jdecode(''),'/18701.html','false',[],'',''],
	['PAGE','8001',jdecode('Gallery'),jdecode(''),'/8001.html','false',[],'',''],
	['PAGE','1094',jdecode('Site+Services'),jdecode(''),'/1094/index.html','false',[ 
		['PAGE','31601',jdecode('Service+List'),jdecode(''),'/1094/31601.html','true',[],'','']
	],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='990000';
theSitetree.keyvisualId='1410';
theSitetree.keyvisualName='seminar.jpg';
theSitetree.fontsetId='234';
theSitetree.graphicsetId='279';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Startup',
				paletteFamily: 	'990000',
				keyvisualId: 	'1410',
				keyvisualName: 	'seminar.jpg',
				fontsetId: 		'234',
				graphicsetId: 	'279',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'990000',
				b_color: 		'333333',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-73b7e5398d2a7590960dcbef9b7151e6']={
webappId:    '7060',
documentId:  '8001',
internalId:  '73b7e5398d2a7590960dcbef9b7151e6',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-675']={
webappId:    '7008',
documentId:  '10501',
internalId:  '675',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-677']={
webappId:    '7008',
documentId:  '35001',
internalId:  '677',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-678']={
webappId:    '7008',
documentId:  '18701',
internalId:  '678',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54201',
internalId:  '',
customField: '20090408-153150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1001',
internalId:  '',
customField: '20100714-192803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1052',
internalId:  '',
customField: '20090908-131631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16901',
internalId:  '',
customField: '20100714-192924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1094',
internalId:  '',
customField: '20081201-204144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57901',
internalId:  '',
customField: '20091231-120243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24601',
internalId:  '',
customField: '20100714-193405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31601',
internalId:  '',
customField: '20080630-101547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20080515-055018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8001',
internalId:  '',
customField: '20080425-063541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20090908-133430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35001',
internalId:  '',
customField: '20081213-141630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20100714-193004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37501',
internalId:  '',
customField: '20091209-130424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37522',
internalId:  '',
customField: '20081211-155844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8101',
internalId:  '',
customField: '20081211-155910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48601',
internalId:  '',
customField: '20081211-155952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49801',
internalId:  '',
customField: '20081213-131713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74801',
internalId:  '',
customField: '20090203-093345'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '74801',
internalId:  'search',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76001',
internalId:  '',
customField: '20090408-150805'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INZVM6';
var companyName   = 'Creative+%26+Effective+Solutions';
var htmlTitle	  = '4cornersllc';
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();
};

