/* [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','7301',jdecode('Home'),jdecode(''),'/7301.html','true',[],'',''],
	['PAGE','7352',jdecode('How+to+find+us'),jdecode(''),'/7352.html','true',[],'',''],
	['PAGE','7373',jdecode('Order'),jdecode(''),'/7373.html','true',[],'',''],
	['PAGE','7394',jdecode('Offers'),jdecode(''),'/7394.html','true',[],'',''],
	['PAGE','7415',jdecode('Emergency+call'),jdecode(''),'/7415.html','true',[],'',''],
	['PAGE','15101',jdecode('Repairs+'),jdecode(''),'/15101/index.html','true',[ 
		['PAGE','15122',jdecode('Electric+Motors'),jdecode(''),'/15101/15122.html','true',[],'',''],
		['PAGE','15143',jdecode('Pumps'),jdecode(''),'/15101/15143.html','true',[],'',''],
		['PAGE','15164',jdecode('Equipment'),jdecode(''),'/15101/15164.html','true',[],'','']
	],'',''],
	['PAGE','17201',jdecode('Electric+Motors+'),jdecode(''),'/17201/index.html','true',[ 
		['PAGE','17222',jdecode('DC+Motors'),jdecode(''),'/17201/17222.html','true',[],'',''],
		['PAGE','17243',jdecode('AC+Motors'),jdecode(''),'/17201/17243.html','true',[],'',''],
		['PAGE','17264',jdecode('Repairs'),jdecode(''),'/17201/17264.html','true',[],'','']
	],'',''],
	['PAGE','7436',jdecode('Contact'),jdecode(''),'/7436.html','true',[],'',''],
	['PAGE','7457',jdecode('About+us'),jdecode(''),'/7457.html','true',[],'',''],
	['PAGE','7478',jdecode('PRODUCTS+'),jdecode(''),'/7478/index.html','true',[ 
		['PAGE','12501',jdecode('Pumps'),jdecode(''),'/7478/12501.html','true',[],'',''],
		['PAGE','7520',jdecode('Electric+Motors'),jdecode(''),'/7478/7520.html','true',[],'',''],
		['PAGE','7541',jdecode('EQUIPMENT'),jdecode(''),'/7478/7541.html','true',[],'','']
	],'',''],
	['PAGE','12601',jdecode('Pumps'),jdecode(''),'/12601.html','true',[],'',''],
	['PAGE','7562',jdecode('Employment'),jdecode(''),'/7562.html','true',[],'',''],
	['PAGE','14101',jdecode('PARTS+FOR+EQUIPMENT'),jdecode(''),'/14101.html','true',[],'',''],
	['PAGE','7583',jdecode('Products'),jdecode(''),'/7583/index.html','true',[ 
		['PAGE','7604',jdecode('MATERIAL+HANDLING'),jdecode(''),'/7583/7604.html','true',[],'',''],
		['PAGE','7625',jdecode('AUTO+CARE'),jdecode(''),'/7583/7625.html','true',[],'',''],
		['PAGE','7646',jdecode('LINE+CARD'),jdecode(''),'/7583/7646.html','true',[],'','']
	],'',''],
	['PAGE','13001',jdecode('ESPANOL+'),jdecode(''),'/13001.html','true',[],'',''],
	['PAGE','7667',jdecode('Equipment+'),jdecode(''),'/7667.html','true',[],'',''],
	['PAGE','7688',jdecode('Delivery+service'),jdecode(''),'/7688.html','true',[],'',''],
	['PAGE','16401',jdecode('Parts+'),jdecode(''),'/16401/index.html','true',[ 
		['PAGE','16422',jdecode('Electric+Motors'),jdecode(''),'/16401/16422.html','true',[],'',''],
		['PAGE','16443',jdecode('Pumps'),jdecode(''),'/16401/16443.html','true',[],'',''],
		['PAGE','16464',jdecode('Equipment+Parts'),jdecode(''),'/16401/16464.html','true',[],'','']
	],'',''],
	['PAGE','17285',jdecode('Delivery+service'),jdecode(''),'/17285.html','true',[],'',''],
	['PAGE','17306',jdecode('Services'),jdecode(''),'/17306/index.html','true',[ 
		['PAGE','17327',jdecode('Custom+Services'),jdecode(''),'/17306/17327.html','true',[],'',''],
		['PAGE','17348',jdecode('Machine+Shop'),jdecode(''),'/17306/17348.html','true',[],'',''],
		['PAGE','17369',jdecode('Field+Service'),jdecode(''),'/17306/17369.html','true',[],'','']
	],'','']];
var siteelementCount=38;
theSitetree.topTemplateName='Bigcity_Space';
theSitetree.paletteFamily='591414';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='21075';
theSitetree.graphicsetId='13165';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='591414';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Bigcity_Space',
				paletteFamily: 	'591414',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'21075',
				graphicsetId: 	'13165',
				contentColor: 	'FFFFFF',
				contentBGColor: '591414',
				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:  '7301',
internalId:  '',
customField: '20100121-220700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7352',
internalId:  '',
customField: '20100121-211427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7373',
internalId:  '',
customField: '20100121-220953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7394',
internalId:  '',
customField: '20100121-221011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7415',
internalId:  '',
customField: '20090307-110454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7436',
internalId:  '',
customField: '20100121-224459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7457',
internalId:  '',
customField: '20100121-224401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7562',
internalId:  '',
customField: '20090306-174017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7478',
internalId:  '',
customField: '20100121-231903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15164',
internalId:  '',
customField: '20100121-225923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7520',
internalId:  '',
customField: '20100121-231954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7541',
internalId:  '',
customField: '20090306-174017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7583',
internalId:  '',
customField: '20100323-161424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7604',
internalId:  '',
customField: '20090306-174017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7625',
internalId:  '',
customField: '20090306-174017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7646',
internalId:  '',
customField: '20090306-174017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7667',
internalId:  '',
customField: '20090306-174017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7688',
internalId:  '',
customField: '20090306-174017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20100121-230103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20100121-225047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12501',
internalId:  '',
customField: '20100121-223248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13001',
internalId:  '',
customField: '20100121-212734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15143',
internalId:  '',
customField: '20100121-231047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14101',
internalId:  '',
customField: '20100121-221955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15122',
internalId:  '',
customField: '20100121-230614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16464',
internalId:  '',
customField: '20100121-232551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16443',
internalId:  '',
customField: '20100121-232551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16401',
internalId:  '',
customField: '20100121-232551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16422',
internalId:  '',
customField: '20100121-232551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17201',
internalId:  '',
customField: '20100130-221143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17222',
internalId:  '',
customField: '20100130-221143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17243',
internalId:  '',
customField: '20100130-221143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17264',
internalId:  '',
customField: '20100130-221143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17285',
internalId:  '',
customField: '20100130-221147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17306',
internalId:  '',
customField: '20100130-221147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17327',
internalId:  '',
customField: '20100130-221147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17348',
internalId:  '',
customField: '20100130-221147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17369',
internalId:  '',
customField: '20100130-221147'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHKPB';
var companyName   = 'Riteway+Pump+%26+Electric+Motor+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();
};
