/* [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','10501',jdecode('Inspection+Services'),jdecode(''),'/10501/index.html','false',[ 
		['PAGE','1873',jdecode('Pre-Construction+Inspections'),jdecode(''),'/10501/1873.html','true',[],'',''],
		['PAGE','10522',jdecode('Post-Construction+Inspections'),jdecode(''),'/10501/10522.html','false',[],'',''],
		['PAGE','10543',jdecode('Subway+Tunnel+Inspections'),jdecode(''),'/10501/10543.html','false',[],'',''],
		['PAGE','10564',jdecode('Damage+Claim+Investigations'),jdecode(''),'/10501/10564.html','false',[],'','']
	],'',''],
	['PAGE','1852',jdecode('Monitoring+Services'),jdecode(''),'/1852/index.html','false',[ 
		['PAGE','11701',jdecode('Blast+Monitoring'),jdecode(''),'/1852/11701.html','true',[],'',''],
		['PAGE','11722',jdecode('Construction+Monitoring'),jdecode(''),'/1852/11722.html','true',[],'',''],
		['PAGE','11743',jdecode('Pile+Driving+Monitoring'),jdecode(''),'/1852/11743.html','true',[],'',''],
		['PAGE','11764',jdecode('Dynamic+Compaction'),jdecode(''),'/1852/11764.html','true',[],'',''],
		['PAGE','1915',jdecode('Tunnel+Monitoring'),jdecode(''),'/1852/1915.html','true',[],'',''],
		['PAGE','11785',jdecode('Underwater+Monitoring'),jdecode(''),'/1852/11785.html','true',[],'',''],
		['PAGE','1936',jdecode('Sound+Monitoring'),jdecode(''),'/1852/1936.html','false',[],'',''],
		['PAGE','1894',jdecode('Vibration+Monitoring'),jdecode(''),'/1852/1894.html','false',[],'','']
	],'',''],
	['PAGE','10585',jdecode('Instrumentation'),jdecode(''),'/10585/index.html','true',[ 
		['PAGE','1978',jdecode('Vibration+Monitors'),jdecode(''),'/10585/1978.html','true',[],'',''],
		['PAGE','1957',jdecode('Geotechnical+Instrumentation'),jdecode(''),'/10585/1957.html','true',[],'','']
	],'',''],
	['PAGE','8301',jdecode('Remote+Monitoring'),jdecode(''),'/8301.html','true',[],'',''],
	['PAGE','8322',jdecode('Instalink%E2%84%A2+Web+Hosting'),jdecode(''),'/8322.html','true',[],'',''],
	['PAGE','7001',jdecode('Buy+Online'),jdecode(''),'/7001.html','false',[],'',''],
	['PAGE','8343',jdecode('About+us'),jdecode(''),'/8343/index.html','false',[ 
		['PAGE','8364',jdecode('Our+team'),jdecode(''),'/8343/8364.html','true',[],'',''],
		['PAGE','8385',jdecode('How+to+find+us'),jdecode(''),'/8343/8385.html','true',[],'','']
	],'',''],
	['PAGE','1999',jdecode('Contact+Us'),jdecode(''),'/1999.html','true',[],'',''],
	['PAGE','8406',jdecode('Seminars'),jdecode(''),'/8406.html','false',[],'',''],
	['PAGE','8427',jdecode('Certifications'),jdecode(''),'/8427.html','false',[],'',''],
	['PAGE','9701',jdecode('Log+In'),jdecode(''),'/9701.html','false',[],'',''],
	['PAGE','9722',jdecode('Rewards+Program'),jdecode(''),'/9722.html','false',[],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Undulate';
theSitetree.paletteFamily='67BAFF';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33116';
theSitetree.graphicsetId='14072';
theSitetree.contentColor='001346';
theSitetree.contentBGColor='67BAFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Undulate',
				paletteFamily: 	'67BAFF',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33116',
				graphicsetId: 	'14072',
				contentColor: 	'001346',
				contentBGColor: '67BAFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20100622-100958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1852',
internalId:  '',
customField: '20091119-122452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1873',
internalId:  '',
customField: '20091119-120835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1894',
internalId:  '',
customField: '20091117-113306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1915',
internalId:  '',
customField: '20091119-133622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1936',
internalId:  '',
customField: '20091114-182318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1957',
internalId:  '',
customField: '20091116-181458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1978',
internalId:  '',
customField: '20091116-183257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1999',
internalId:  '',
customField: '20100622-100231'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1801',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-16366443']={
webappId:    '1501',
documentId:  '1801',
internalId:  '16366443',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20091116-194112'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '8385',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8343',
internalId:  '',
customField: '20091116-211044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8385',
internalId:  '',
customField: '20091116-211044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20091116-213735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8322',
internalId:  '',
customField: '20091116-215201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8364',
internalId:  '',
customField: '20091116-211044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8406',
internalId:  '',
customField: '20091116-211046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8427',
internalId:  '',
customField: '20091116-211046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20091119-120716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10585',
internalId:  '',
customField: '20091117-152549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10522',
internalId:  '',
customField: '20091119-121043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10543',
internalId:  '',
customField: '20091119-121130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10564',
internalId:  '',
customField: '20091119-121211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9701',
internalId:  '',
customField: '20091116-222820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9722',
internalId:  '',
customField: '20091116-222820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11701',
internalId:  '',
customField: '20091119-133320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11722',
internalId:  '',
customField: '20091119-134543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11743',
internalId:  '',
customField: '20091119-130957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11764',
internalId:  '',
customField: '20091119-133428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11785',
internalId:  '',
customField: '20091119-135702'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30I7C1J9';
var companyName   = 'Integrated+Geotechnical+Solutions%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();
};

