/* [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','501',jdecode('Home'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','552',jdecode('Products'),jdecode(''), jdecode('%2F552%2Findex.html'), 'true',[ 
		['PAGE','13301',jdecode('Stainless+Fabrication'),jdecode(''), jdecode('%2F552%2F13301.html'), 'true',[],'',''],
		['PAGE','573',jdecode('Meat+Processing'),jdecode(''), jdecode('%2F552%2F573.html'), 'true',[],'',''],
		['PAGE','594',jdecode('Rapid+Prototyping'),jdecode(''), jdecode('%2F552%2F594.html'), 'true',[],'',''],
		['PAGE','49601',jdecode('Robotics'),jdecode(''), jdecode('%2F552%2F49601.html'), 'true',[],'','']
	],'',''],
	['PAGE','26901',jdecode('WRC+Parts+List'),jdecode(''), jdecode('%2F26901.html'), 'true',[],'',''],
	['PAGE','657',jdecode('About+us'),jdecode(''), jdecode('%2F657%2Findex.html'), 'true',[ 
		['PAGE','678',jdecode('The+team'),jdecode(''), jdecode('%2F657%2F678.html'), 'true',[],'','']
	],'',''],
	['PAGE','699',jdecode('Contact'),jdecode(''), jdecode('%2F699%2Findex.html'), 'true',[ 
		['PAGE','741',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F699%2F741.html'), 'true',[],'','']
	],'',''],
	['PAGE','762',jdecode('Tips+and+Operation'),jdecode(''), jdecode('%2F762%2Findex.html'), 'true',[ 
		['PAGE','59301',jdecode('Nozzle+Layout'),jdecode(''), jdecode('%2F762%2F59301.html'), 'true',[],'','']
	],'',''],
	['PAGE','22101',jdecode('Product+Pictures'),jdecode(''), jdecode('%2F22101%2Findex.html'), 'true',[ 
		['PAGE','21801',jdecode('v2+Cab+Const'),jdecode(''), jdecode('%2F22101%2F21801.html'), 'true',[],'',''],
		['PAGE','23601',jdecode('Pre+Wash'),jdecode(''), jdecode('%2F22101%2F23601.html'), 'true',[],'',''],
		['PAGE','23001',jdecode('Head+Washer'),jdecode(''), jdecode('%2F22101%2F23001.html'), 'true',[],'',''],
		['PAGE','23801',jdecode('Sterilizer+and+Hooks'),jdecode(''), jdecode('%2F22101%2F23801.html'), 'true',[],'',''],
		['PAGE','23701',jdecode('Wash+Sink+and+Fountain'),jdecode(''), jdecode('%2F22101%2F23701.html'), 'true',[],'',''],
		['PAGE','59001',jdecode('Robotics'),jdecode(''), jdecode('%2F22101%2F59001.html'), 'true',[],'',''],
		['PAGE','42301',jdecode('Rapid+Prototypes'),jdecode(''), jdecode('%2F22101%2F42301.html'), 'true',[],'','']
	],'',''],
	['PAGE','783',jdecode('Jobs'),jdecode(''), jdecode('%2F783.html'), 'true',[],'',''],
	['PAGE','13343',jdecode('Interesting+links'),jdecode(''), jdecode('%2F13343.html'), 'true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Metal';
theSitetree.paletteFamily='8D8C67';
theSitetree.keyvisualId='770';
theSitetree.keyvisualName='schweisser.jpg';
theSitetree.fontsetId='142';
theSitetree.graphicsetId='153';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Metal',
				paletteFamily: 	'8D8C67',
				keyvisualId: 	'770',
				keyvisualName: 	'schweisser.jpg',
				fontsetId: 		'142',
				graphicsetId: 	'153',
				contentColor: 	'DDDDDD',
				contentBGColor: '000000',
				a_color: 		'8D8C67',
				b_color: 		'E4E2A7',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-c1e9179c257e32fa5bf9301e3ecfd495']={
webappId:    '7060',
documentId:  '23001',
internalId:  'c1e9179c257e32fa5bf9301e3ecfd495',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-6b2c97405dce54f2d2e20c1831cd8286']={
webappId:    '7060',
documentId:  '21801',
internalId:  '6b2c97405dce54f2d2e20c1831cd8286',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-30160be1b5f88c80d8edfb22a660bfea']={
webappId:    '7060',
documentId:  '23601',
internalId:  '30160be1b5f88c80d8edfb22a660bfea',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-6e57e3c0e0cb06a870596e65bbbc4ef5']={
webappId:    '7060',
documentId:  '23701',
internalId:  '6e57e3c0e0cb06a870596e65bbbc4ef5',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-2ea8f010930abce0ae414363b739cc59']={
webappId:    '7060',
documentId:  '23801',
internalId:  '2ea8f010930abce0ae414363b739cc59',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-1b8ade5a10f0656d7ccd3339b9cf9d0c']={
webappId:    '7060',
documentId:  '26901',
internalId:  '1b8ade5a10f0656d7ccd3339b9cf9d0c',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42301',
internalId:  '',
customField: '20100103-204613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20111104-125754'
};
webappMappings['7060']=webappMappings['7060-570e2a24809eb05494064786000dd918']={
webappId:    '7060',
documentId:  '59301',
internalId:  '570e2a24809eb05494064786000dd918',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13343',
internalId:  '',
customField: '20100103-202639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20100103-205543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13301',
internalId:  '',
customField: '20091229-072340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20091229-111313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20091229-073308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59001',
internalId:  '',
customField: '20100103-204516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26901',
internalId:  '',
customField: '20100103-201708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20100103-201910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20080811-064407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '699',
internalId:  '',
customField: '20100103-202023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49601',
internalId:  '',
customField: '20100103-183049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '741',
internalId:  '',
customField: '20080811-064706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '762',
internalId:  '',
customField: '20100103-202341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22101',
internalId:  '',
customField: '20100103-202534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20100103-203834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23001',
internalId:  '',
customField: '20100103-204047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23601',
internalId:  '',
customField: '20100103-203936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59301',
internalId:  '',
customField: '20100103-150400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23701',
internalId:  '',
customField: '20100103-204426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20100103-204329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '783',
internalId:  '',
customField: '20091229-074720'
};
webappMappings['7060']=webappMappings['7060-8390a34ecd8ffd34510530149bdb0fd3']={
webappId:    '7060',
documentId:  '42301',
internalId:  '8390a34ecd8ffd34510530149bdb0fd3',
customField: 'language:en;country:US;'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INF770';
var companyName   = 'W.+R.+Cary+Engineering%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();
};

