/* [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','4601',jdecode('Home'),jdecode(''),'/4601.html','true',[],'',''],
	['PAGE','6122',jdecode('About+Us'),jdecode(''),'/6122.html','true',[],'',''],
	['PAGE','6101',jdecode('Products'),jdecode(''),'/6101/index.html','true',[ 
		['PAGE','9201',jdecode('Electrical+Components'),jdecode(''),'/6101/9201.html','true',[],'',''],
		['PAGE','10201',jdecode('Exhaust+Components'),jdecode(''),'/6101/10201.html','true',[],'',''],
		['PAGE','57701',jdecode('Fuel+Tanks+%26+Reservoirs'),jdecode(''),'/6101/57701.html','true',[],'',''],
		['PAGE','14401',jdecode('Hardware'),jdecode(''),'/6101/14401.html','true',[],'',''],
		['PAGE','14422',jdecode('Hydraulic+Components'),jdecode(''),'/6101/14422.html','true',[],'',''],
		['PAGE','29301',jdecode('Plastic%2C+Rubber+%26+Elastomeric+Products'),jdecode(''),'/6101/29301.html','true',[],'',''],
		['PAGE','14443',jdecode('Power+Transmission+Components'),jdecode(''),'/6101/14443.html','true',[],'',''],
		['PAGE','53801',jdecode('Radiators+%26+Heat+Exchangers'),jdecode(''),'/6101/53801.html','true',[],'',''],
		['PAGE','53822',jdecode('Seats.+Canopies+%26+Other+Accessories'),jdecode(''),'/6101/53822.html','true',[],'',''],
		['PAGE','34201',jdecode('Sprayer+Components'),jdecode(''),'/6101/34201.html','true',[],'',''],
		['PAGE','14464',jdecode('Tubing'),jdecode(''),'/6101/14464.html','true',[],'',''],
		['PAGE','7901',jdecode(''),jdecode(''),'/6101/7901.html','true',[],'',''],
		['PAGE','8801',jdecode(''),jdecode(''),'/6101/8801.html','true',[],'','']
	],'',''],
	['PAGE','6143',jdecode('Representation'),jdecode(''),'/6143.html','true',[],'',''],
	['PAGE','36401',jdecode('What%26%23x27%3Bs+New+'),jdecode(''),'/36401.html','true',[],'',''],
	['PAGE','5101',jdecode('Contact+Information'),jdecode(''),'/5101.html','true',[],'',''],
	['PAGE','54301',jdecode('Information+Request+Page'),jdecode(''),'/54301.html','true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Global';
theSitetree.paletteFamily='333399';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='85';
theSitetree.graphicsetId='105';
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: 			'Global',
				paletteFamily: 	'333399',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'85',
				graphicsetId: 	'105',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'242E8A',
				b_color: 		'FF9900',
				c_color: 		'000000',
				d_color: 		'EAEAEA',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4601',
internalId:  '',
customField: '20100504-135602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20100503-121422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20100504-125502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20100504-123720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6122',
internalId:  '',
customField: '20090323-105542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6143',
internalId:  '',
customField: '20090529-113804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20090219-114644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20090219-114846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10201',
internalId:  '',
customField: '20100503-144846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14401',
internalId:  '',
customField: '20100504-135806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14422',
internalId:  '',
customField: '20100504-135844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14443',
internalId:  '',
customField: '20100503-162206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14464',
internalId:  '',
customField: '20100503-160214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29301',
internalId:  '',
customField: '20100504-101850'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4601',
internalId:  '1006',
customField: '1006'
};
webappMappings['7080']=webappMappings['7080-157']={
webappId:    '7080',
documentId:  '4601',
internalId:  '157',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34201',
internalId:  '',
customField: '20100503-162353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36401',
internalId:  '',
customField: '20090508-134424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57701',
internalId:  '',
customField: '20100504-130353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53822',
internalId:  '',
customField: '20100504-125049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54301',
internalId:  '',
customField: '20100503-122041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53801',
internalId:  '',
customField: '20100504-123814'
};
webappMappings['7008']=webappMappings['7008-16816']={
webappId:    '7008',
documentId:  '54301',
internalId:  '16816',
customField: 'language:en;country:US;'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHC4K';
var companyName   = 'Paul+C.+Cramer+Company';
var htmlTitle	  = 'Paul+C.+Cramer+Company';
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();
};
