/* [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','5020',jdecode('Home'),jdecode(''), jdecode('%2F5020.html'), 'true',[],'',''],
	['PAGE','19420',jdecode('Hose%2C+Fittings+%26+Expansion+Joints'),jdecode(''), jdecode('%2F19420%2Findex.html'), 'true',[ 
		['PAGE','19441',jdecode('General+Hose'),jdecode(''), jdecode('%2F19420%2F19441.html'), 'true',[],'',''],
		['PAGE','19462',jdecode('Hose+Fittings'),jdecode(''), jdecode('%2F19420%2F19462.html'), 'true',[],'',''],
		['PAGE','19483',jdecode('Metal+Hose'),jdecode(''), jdecode('%2F19420%2F19483.html'), 'true',[],'',''],
		['PAGE','19504',jdecode('Expansion+Joints'),jdecode(''), jdecode('%2F19420%2F19504.html'), 'true',[],'','']
	],'',''],
	['PAGE','19525',jdecode('Hyraulic+Hose+%26+Fittings'),jdecode(''), jdecode('%2F19525%2Findex.html'), 'true',[ 
		['PAGE','19546',jdecode('Hose'),jdecode(''), jdecode('%2F19525%2F19546.html'), 'true',[],'',''],
		['PAGE','19567',jdecode('Fittings+%26+Quick+Couplers'),jdecode(''), jdecode('%2F19525%2F19567.html'), 'true',[],'',''],
		['PAGE','19588',jdecode('Adapters'),jdecode(''), jdecode('%2F19525%2F19588.html'), 'true',[],'','']
	],'',''],
	['PAGE','19630',jdecode('Belting+%26+Accessories'),jdecode(''), jdecode('%2F19630%2Findex.html'), 'true',[ 
		['PAGE','19651',jdecode('PVC'),jdecode(''), jdecode('%2F19630%2F19651.html'), 'true',[],'',''],
		['PAGE','19672',jdecode('Heavy+Rubber'),jdecode(''), jdecode('%2F19630%2F19672.html'), 'true',[],'',''],
		['PAGE','19693',jdecode('Lightweight'),jdecode(''), jdecode('%2F19630%2F19693.html'), 'true',[],'',''],
		['PAGE','19714',jdecode('Accessories'),jdecode(''), jdecode('%2F19630%2F19714.html'), 'true',[],'','']
	],'',''],
	['PAGE','19735',jdecode('Sealing+Products'),jdecode(''), jdecode('%2F19735%2Findex.html'), 'true',[ 
		['PAGE','19756',jdecode('Gaskets'),jdecode(''), jdecode('%2F19735%2F19756.html'), 'true',[],'',''],
		['PAGE','19777',jdecode('Rubber'),jdecode(''), jdecode('%2F19735%2F19777.html'), 'true',[],'',''],
		['PAGE','19798',jdecode('Gasketing+Sheet'),jdecode(''), jdecode('%2F19735%2F19798.html'), 'true',[],'',''],
		['PAGE','19819',jdecode('Pump+Packing'),jdecode(''), jdecode('%2F19735%2F19819.html'), 'true',[],'',''],
		['PAGE','19840',jdecode('Non-Asbestos+Textiles'),jdecode(''), jdecode('%2F19735%2F19840.html'), 'true',[],'',''],
		['PAGE','19861',jdecode('O%26%23x27%3BRings'),jdecode(''), jdecode('%2F19735%2F19861.html'), 'true',[],'',''],
		['PAGE','19882',jdecode('Extruded+Cord'),jdecode(''), jdecode('%2F19735%2F19882.html'), 'true',[],'','']
	],'',''],
	['PAGE','19987',jdecode('Matting'),jdecode(''), jdecode('%2F19987.html'), 'true',[],'',''],
	['PAGE','19903',jdecode('Plastics+%26+Safety+Items'),jdecode(''), jdecode('%2F19903%2Findex.html'), 'true',[ 
		['PAGE','19924',jdecode('Plastic+Sheet%2C+Rod+%26+Tubing'),jdecode(''), jdecode('%2F19903%2F19924.html'), 'true',[],'',''],
		['PAGE','20720',jdecode('Tubing'),jdecode(''), jdecode('%2F19903%2F20720.html'), 'true',[],'',''],
		['PAGE','19945',jdecode('Protective+Clothing'),jdecode(''), jdecode('%2F19903%2F19945.html'), 'true',[],'',''],
		['PAGE','19966',jdecode('Environmental'),jdecode(''), jdecode('%2F19903%2F19966.html'), 'true',[],'','']
	],'',''],
	['PAGE','5092',jdecode('About+us'),jdecode(''), jdecode('%2F5092%2Findex.html'), 'true',[ 
		['PAGE','5134',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F5092%2F5134.html'), 'true',[],'',''],
		['PAGE','21320',jdecode('Our+Weather'),jdecode(''), jdecode('%2F5092%2F21320.html'), 'true',[],'','']
	],'',''],
	['PAGE','20820',jdecode('Search'),jdecode(''), jdecode('%2F20820.html'), 'true',[],'',''],
	['PAGE','21120',jdecode('Information+Request'),jdecode(''), jdecode('%2F21120.html'), 'true',[],'',''],
	['PAGE','5071',jdecode('Contact'),jdecode(''), jdecode('%2F5071.html'), 'true',[],'','']];
var siteelementCount=35;
theSitetree.topTemplateName='Basic';
theSitetree.paletteFamily='36566E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10828';
theSitetree.graphicsetId='11283';
theSitetree.contentColor='36566E';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLYTC2ZA'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Basic',
				paletteFamily: 	'36566E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10828',
				graphicsetId: 	'11283',
				contentColor: 	'36566E',
				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:  '5020',
internalId:  '',
customField: '20100604-173241'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5020',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1127431']={
webappId:    '1501',
documentId:  '5020',
internalId:  '1127431',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5071',
internalId:  '',
customField: '20100511-165611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5092',
internalId:  '',
customField: '20100506-125305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20820',
internalId:  '',
customField: '20100407-134316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5134',
internalId:  '',
customField: '20100511-133601'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '20820',
internalId:  'search',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-16143']={
webappId:    '7008',
documentId:  '21120',
internalId:  '16143',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21120',
internalId:  '',
customField: '20100422-172817'
};
webappMappings['7080']=webappMappings['7080-765']={
webappId:    '7080',
documentId:  '21320',
internalId:  '765',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21320',
internalId:  '',
customField: '20100407-135554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19420',
internalId:  '',
customField: '20100511-170118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19441',
internalId:  '',
customField: '20100604-172122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19462',
internalId:  '',
customField: '20100511-170609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19483',
internalId:  '',
customField: '20100511-170638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19504',
internalId:  '',
customField: '20100511-170658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19525',
internalId:  '',
customField: '20100604-171717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19546',
internalId:  '',
customField: '20100511-170754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19567',
internalId:  '',
customField: '20100511-170900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19588',
internalId:  '',
customField: '20100511-171016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19630',
internalId:  '',
customField: '20100511-171235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19651',
internalId:  '',
customField: '20100511-171341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19672',
internalId:  '',
customField: '20100511-171406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19693',
internalId:  '',
customField: '20100511-171537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19714',
internalId:  '',
customField: '20100511-171704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19735',
internalId:  '',
customField: '20100511-172031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19756',
internalId:  '',
customField: '20100511-172126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19777',
internalId:  '',
customField: '20100511-172239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19798',
internalId:  '',
customField: '20100511-172350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19819',
internalId:  '',
customField: '20100511-172446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19840',
internalId:  '',
customField: '20100511-172514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19861',
internalId:  '',
customField: '20100511-172533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19882',
internalId:  '',
customField: '20100511-172601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19903',
internalId:  '',
customField: '20100511-172821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19924',
internalId:  '',
customField: '20100511-172908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20720',
internalId:  '',
customField: '20100511-173134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19945',
internalId:  '',
customField: '20100511-173214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19966',
internalId:  '',
customField: '20100511-173246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19987',
internalId:  '',
customField: '20100511-172729'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7CIV1';
var companyName   = 'M+S+Rubber+Company+++++++++++++++++++++++++++++Jackson+and+Vicksburg+++++++++++++++++++++++++++++++++++601-948-2575+or+601-638-1171';
var htmlTitle	  = 'M+S+RUBBER+COMPANY';
var metaKeywords  = 'Rubber+products%0D%0APlastic+products%0D%0AIndustrial+products%0D%0ABelting%0D%0AMatting%0D%0AHydraulics%0D%0AGeneral+Hose';
var metaContents  = 'Rubber+products%0D%0APlastic+products%0D%0AIndustrial+products%0D%0ABelting%0D%0AMatting%0D%0AHydraulics%0D%0AGeneral+Hose%0D%0AO%27rings%0D%0AMetal+Hoses%0D%0AExpansion+Jionts%0D%0AHose+Fittings%0D%0AQuick+Couplers%0D%0AAdapters%0D%0ASwivel+Joints%0D%0ASealing+Products%0D%0ASafety+Products%0D%0AExtruded+cord';
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();
};

