/* [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','2001',jdecode('Home'),jdecode(''),'/2001.html','true',[],'',''],
	['PAGE','2701',jdecode('About+us'),jdecode(''),'/2701/index.html','true',[ 
		['PAGE','2722',jdecode('Our+team'),jdecode(''),'/2701/2722.html','true',[],'','']
	],'',''],
	['PAGE','2743',jdecode('Service'),jdecode(''),'/2743/index.html','true',[ 
		['PAGE','12901',jdecode('Air+Conditioning'),jdecode(''),'/2743/12901.html','true',[],'',''],
		['PAGE','12922',jdecode('Chillers'),jdecode(''),'/2743/12922.html','true',[],'',''],
		['PAGE','12943',jdecode('Preventative+Maintenance'),jdecode(''),'/2743/12943.html','true',[],'',''],
		['PAGE','12964',jdecode('Ventilation+Systems'),jdecode(''),'/2743/12964.html','true',[],'',''],
		['PAGE','12985',jdecode('Humidification+-+Dehumidification'),jdecode(''),'/2743/12985.html','true',[],'',''],
		['PAGE','13006',jdecode('Boilers+Service'),jdecode(''),'/2743/13006.html','true',[],'',''],
		['PAGE','13027',jdecode('Heating+Systems'),jdecode(''),'/2743/13027.html','true',[],'','']
	],'',''],
	['PAGE','2764',jdecode('Construction'),jdecode(''),'/2764/index.html','true',[ 
		['PAGE','7901',jdecode('Chiller+Installs'),jdecode(''),'/2764/7901.html','true',[],'',''],
		['PAGE','7922',jdecode('Design+Build'),jdecode(''),'/2764/7922.html','true',[],'',''],
		['PAGE','7943',jdecode('HVAC+System+retrofit'),jdecode(''),'/2764/7943.html','true',[],'',''],
		['PAGE','7964',jdecode('Cooling+Tower+Installs'),jdecode(''),'/2764/7964.html','true',[],'',''],
		['PAGE','7985',jdecode('Medical+Gas+Systems'),jdecode(''),'/2764/7985.html','true',[],'',''],
		['PAGE','8006',jdecode('Piping'),jdecode(''),'/2764/8006.html','true',[],'',''],
		['PAGE','8027',jdecode('Boiler+Installations'),jdecode(''),'/2764/8027.html','true',[],'',''],
		['PAGE','8048',jdecode('Geothermal'),jdecode(''),'/2764/8048.html','true',[],'',''],
		['PAGE','8069',jdecode('Clean+Room'),jdecode(''),'/2764/8069.html','true',[],'','']
	],'',''],
	['PAGE','2785',jdecode('Contact'),jdecode(''),'/2785.html','true',[],'',''],
	['PAGE','11701',jdecode('Dynamic+News'),jdecode(''),'/11701.html','true',[],'',''],
	['PAGE','7501',jdecode('Comments'),jdecode(''),'/7501.html','true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Multimedia';
theSitetree.paletteFamily='98B4CA';
theSitetree.keyvisualId='11111';
theSitetree.keyvisualName='kv_11111.jpg';
theSitetree.fontsetId='32004';
theSitetree.graphicsetId='13832';
theSitetree.contentColor='3C5E78';
theSitetree.contentBGColor='98B4CA';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Multimedia',
				paletteFamily: 	'98B4CA',
				keyvisualId: 	'11111',
				keyvisualName: 	'kv_11111.jpg',
				fontsetId: 		'32004',
				graphicsetId: 	'13832',
				contentColor: 	'3C5E78',
				contentBGColor: '98B4CA',
				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:  '2001',
internalId:  '',
customField: '20100125-161941'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2001',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-15253770']={
webappId:    '1501',
documentId:  '2001',
internalId:  '15253770',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2701',
internalId:  '',
customField: '20100125-163050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2722',
internalId:  '',
customField: '20100122-153749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2743',
internalId:  '',
customField: '20100125-164655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2764',
internalId:  '',
customField: '20100210-140357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2785',
internalId:  '',
customField: '20100308-144050'
};
webappMappings['7008']=webappMappings['7008-14863']={
webappId:    '7008',
documentId:  '7501',
internalId:  '14863',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7501',
internalId:  '',
customField: '20100210-144209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20100305-163935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7922',
internalId:  '',
customField: '20100305-165229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7943',
internalId:  '',
customField: '20100305-170815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7964',
internalId:  '',
customField: '20100305-172043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7985',
internalId:  '',
customField: '20100308-115427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8006',
internalId:  '',
customField: '20100308-121430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8027',
internalId:  '',
customField: '20100308-122644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8048',
internalId:  '',
customField: '20100308-123745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8069',
internalId:  '',
customField: '20100308-124857'
};
webappMappings['7050']=webappMappings['7050-4222']={
webappId:    '7050',
documentId:  '11701',
internalId:  '4222',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11701',
internalId:  '',
customField: '20100308-133319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12901',
internalId:  '',
customField: '20100602-145008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12943',
internalId:  '',
customField: '20100602-145008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12922',
internalId:  '',
customField: '20100602-145008'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INH9EY';
var companyName   = '++++++++++++++DYNAMIC+HEATING+%26+PIPING+COMPANY';
var htmlTitle	  = '';
var metaKeywords  = 'Dynamic%2C+HVAC%2C+hvac%2C+Heat%2C+Heating%2C+Pipe%2C+Piping%2C+construction%2C+services%2C+clean+room%2C+';
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();
};

