/* [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','5015',jdecode('Contact'),jdecode(''),'/5015.html','true',[],'',''],
	['PAGE','4901',jdecode('Home'),jdecode(''),'/4901/index.html','true',[ 
		['PAGE','4952',jdecode('About+Us'),jdecode(''),'/4901/4952.html','true',[],'',''],
		['PAGE','4973',jdecode('Mission+Statement'),jdecode(''),'/4901/4973.html','true',[],'','']
	],'',''],
	['PAGE','4994',jdecode('Product+Lines'),jdecode(''),'/4994/index.html','true',[ 
		['PAGE','5401',jdecode('American+Industrial'),jdecode(''),'/4994/5401.html','true',[],'',''],
		['PAGE','5422',jdecode('AW-Lake+Co.'),jdecode(''),'/4994/5422.html','true',[],'',''],
		['PAGE','5443',jdecode('Barco'),jdecode(''),'/4994/5443.html','true',[],'',''],
		['PAGE','5464',jdecode('BI-TORQ'),jdecode(''),'/4994/5464.html','true',[],'',''],
		['PAGE','5506',jdecode('Delta+Controls'),jdecode(''),'/4994/5506.html','true',[],'',''],
		['PAGE','5527',jdecode('Diversified+Plastics'),jdecode(''),'/4994/5527.html','true',[],'',''],
		['PAGE','5548',jdecode('FAZTEK'),jdecode(''),'/4994/5548.html','true',[],'',''],
		['PAGE','5569',jdecode('Filtration+Mfrg.+-+Environet'),jdecode(''),'/4994/5569.html','true',[],'',''],
		['PAGE','5590',jdecode('International+Gas+Springs'),jdecode(''),'/4994/5590.html','true',[],'',''],
		['PAGE','5611',jdecode('Process+Control+Systems'),jdecode(''),'/4994/5611.html','true',[],'',''],
		['PAGE','5632',jdecode('Saint+Machinery'),jdecode(''),'/4994/5632.html','true',[],'',''],
		['PAGE','5653',jdecode('Yates+Industries'),jdecode(''),'/4994/5653.html','true',[],'',''],
		['PAGE','5674',jdecode('Yuken+Hydraulic'),jdecode(''),'/4994/5674.html','true',[],'','']
	],'',''],
	['PAGE','11401',jdecode('Imprint'),jdecode(''),'/11401.html','false',[],'',''],
	['PAGE','11422',jdecode('Who+am+I%3F'),jdecode(''),'/11422.html','false',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Office';
theSitetree.paletteFamily='727D9C';
theSitetree.keyvisualId='11165';
theSitetree.keyvisualName='kv_11165.jpg';
theSitetree.fontsetId='32062';
theSitetree.graphicsetId='13879';
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: 			'Office',
				paletteFamily: 	'727D9C',
				keyvisualId: 	'11165',
				keyvisualName: 	'kv_11165.jpg',
				fontsetId: 		'32062',
				graphicsetId: 	'13879',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20100829-220735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4952',
internalId:  '',
customField: '20100824-171950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4973',
internalId:  '',
customField: '20100824-172207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4994',
internalId:  '',
customField: '20100822-090534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5015',
internalId:  '',
customField: '20091104-153412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5464',
internalId:  '',
customField: '20100829-224320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5548',
internalId:  '',
customField: '20100829-232950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20100829-223449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5422',
internalId:  '',
customField: '20100829-223640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5443',
internalId:  '',
customField: '20100829-224035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5506',
internalId:  '',
customField: '20100829-224438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5527',
internalId:  '',
customField: '20100829-233213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5569',
internalId:  '',
customField: '20100829-225757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5590',
internalId:  '',
customField: '20100829-230303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5611',
internalId:  '',
customField: '20100829-230753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5632',
internalId:  '',
customField: '20100829-231125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5653',
internalId:  '',
customField: '20100830-184318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5674',
internalId:  '',
customField: '20100830-183921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20100819-163558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11422',
internalId:  '',
customField: '20100819-163558'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INVGOV';
var companyName   = 'Power+Lines%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();
};

