/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],'',''],
	['PAGE','2501',jdecode('Accessories'),jdecode(''),'/2501/index.html','true',[ 
		['PAGE','2522',jdecode('Car+Racks'),jdecode(''),'/2501/2522.html','true',[],'',''],
		['PAGE','2543',jdecode('Helmets+%26+Apparel'),jdecode(''),'/2501/2543.html','true',[],'',''],
		['PAGE','2564',jdecode('Locks+%26+Lighting'),jdecode(''),'/2501/2564.html','true',[],'',''],
		['PAGE','2585',jdecode('Lube+%26+Tools'),jdecode(''),'/2501/2585.html','true',[],'',''],
		['PAGE','2606',jdecode('Trainers'),jdecode(''),'/2501/2606.html','true',[],'',''],
		['PAGE','2627',jdecode('Saddles'),jdecode(''),'/2501/2627.html','true',[],'',''],
		['PAGE','2648',jdecode('BMX'),jdecode(''),'/2501/2648.html','true',[],'',''],
		['PAGE','2669',jdecode('Child+Carrying'),jdecode(''),'/2501/2669.html','true',[],'',''],
		['PAGE','2690',jdecode('Storage'),jdecode(''),'/2501/2690.html','true',[],'','']
	],'',''],
	['PAGE','2711',jdecode('Bicycles'),jdecode(''),'/2711/index.html','true',[ 
		['PAGE','2732',jdecode('Juvenille'),jdecode(''),'/2711/2732.html','true',[],'',''],
		['PAGE','2753',jdecode('BMX'),jdecode(''),'/2711/2753.html','true',[],'',''],
		['PAGE','2774',jdecode('Cruiser'),jdecode(''),'/2711/2774.html','true',[],'',''],
		['PAGE','2795',jdecode('Comfort'),jdecode(''),'/2711/2795.html','true',[],'',''],
		['PAGE','2816',jdecode('Mountain'),jdecode(''),'/2711/2816.html','true',[],'',''],
		['PAGE','2837',jdecode('Road'),jdecode(''),'/2711/2837.html','true',[],'',''],
		['PAGE','2858',jdecode('Indoor'),jdecode(''),'/2711/2858.html','true',[],'',''],
		['PAGE','2879',jdecode('Tandem'),jdecode(''),'/2711/2879.html','true',[],'','']
	],'',''],
	['PAGE','43001',jdecode('Bike+Fitting'),jdecode(''),'/43001.html','true',[],'',''],
	['PAGE','2900',jdecode('Bicycle+Specials'),jdecode(''),'/2900.html','true',[],'',''],
	['PAGE','2921',jdecode('Service'),jdecode(''),'/2921.html','true',[],'',''],
	['PAGE','2942',jdecode('Skateshop'),jdecode(''),'/2942.html','true',[],'',''],
	['PAGE','3005',jdecode('Hours'),jdecode(''),'/3005.html','true',[],'',''],
	['PAGE','3026',jdecode('Directions'),jdecode(''),'/3026.html','true',[],'',''],
	['PAGE','3047',jdecode('Site+Links'),jdecode(''),'/3047.html','true',[],'',''],
	['PAGE','3068',jdecode('Coupons'),jdecode(''),'/3068.html','true',[],'',''],
	['PAGE','3089',jdecode('Weather'),jdecode(''),'/3089.html','true',[],'',''],
	['PAGE','3110',jdecode('Contact+Us'),jdecode(''),'/3110/index.html','true',[ 
		['PAGE','14801',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/3110/14801.html','false',[],'','']
	],'',''],
	['PAGE','21201',jdecode('Take+our+Poll'),jdecode(''),'/21201.html','true',[],'',''],
	['PAGE','46101',jdecode('Map'),jdecode(''),'/46101.html','true',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Dispose';
theSitetree.paletteFamily='E9562E';
theSitetree.keyvisualId='9707';
theSitetree.keyvisualName='kv_9707.gif';
theSitetree.fontsetId='10670';
theSitetree.graphicsetId='11183';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='CCCACA';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Dispose',
				paletteFamily: 	'E9562E',
				keyvisualId: 	'9707',
				keyvisualName: 	'kv_9707.gif',
				fontsetId: 		'10670',
				graphicsetId: 	'11183',
				contentColor: 	'000000',
				contentBGColor: 'CCCACA',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-6359374']={
webappId:    '1501',
documentId:  '301',
internalId:  '6359374',
customField: '1501'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '46101',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['7005']=webappMappings['7005-10']={
webappId:    '7005',
documentId:  '21201',
internalId:  '10',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100813-144708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3005',
internalId:  '',
customField: '20100619-072148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3068',
internalId:  '',
customField: '20100813-144937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2900',
internalId:  '',
customField: '20100813-144858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2921',
internalId:  '',
customField: '20091020-135932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2942',
internalId:  '',
customField: '20100222-142757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2711',
internalId:  '',
customField: '20081002-103724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2501',
internalId:  '',
customField: '20100222-144736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2522',
internalId:  '',
customField: '20081009-103207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2543',
internalId:  '',
customField: '20081009-104024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2564',
internalId:  '',
customField: '20100222-144853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2585',
internalId:  '',
customField: '20080807-125525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2606',
internalId:  '',
customField: '20080207-142607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2627',
internalId:  '',
customField: '20061130-144616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2648',
internalId:  '',
customField: '20061130-143718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2669',
internalId:  '',
customField: '20081009-114149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2690',
internalId:  '',
customField: '20080929-143444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2732',
internalId:  '',
customField: '20100222-142243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2753',
internalId:  '',
customField: '20100222-142601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2774',
internalId:  '',
customField: '20081009-095545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2795',
internalId:  '',
customField: '20081009-095906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2816',
internalId:  '',
customField: '20081009-100542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2837',
internalId:  '',
customField: '20081009-100740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2858',
internalId:  '',
customField: '20100222-140952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2879',
internalId:  '',
customField: '20081002-105020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43001',
internalId:  '',
customField: '20091116-131740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3026',
internalId:  '',
customField: '20060608-162959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3047',
internalId:  '',
customField: '20100709-131109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3089',
internalId:  '',
customField: '20061011-121433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3110',
internalId:  '',
customField: '20061011-121513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14801',
internalId:  '',
customField: '20060612-110717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21201',
internalId:  '',
customField: '20081009-134606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46101',
internalId:  '',
customField: '20080807-125237'
};
webappMappings['7008']=webappMappings['7008-974']={
webappId:    '7008',
documentId:  '3110',
internalId:  '974',
customField: 'language:en;country:US;'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN020INE479';
var companyName   = 'Marty%27s+Cycle+Center';
var htmlTitle	  = 'Martys+Cycle';
var metaKeywords  = 'Bike%2C+Bikes%2C+Bicycles%2C+Bicycle%2C+Martys%2CMartys%2C+Avon%2C+Avon+Lake%2C+Ohio%2C+Lorain%2C+Cleveland%2C+Raleigh%2C+Giant%2C+Electra%2C+Diamondback%2C+Dealer%2C+Parts%2C+Accessories%2C+Eastern%2C+Tricycles%2C+Tricycle%2C+Trike%2C+Trikes%2C+Tandem%2C+Tandems%2C+Recumbent%2C+Recumbent%2C+Baby+Seats%2C+Car+Racks%2C+Helmets%2C+BMX%2C+Mountain%2C+Road%2C+Hybrid%2C+Hybrids%2C+Comfort%2C+Sport+Comfort%2C+Skate%2C+Skate+Board%2C+Skate+Boards%2C+Suspension%2C+Service%2C+Wheels%2C+Seats%2C+Saddles%2C+Redline+';
var metaContents  = 'Bike%2C+Bikes%2C+Bicycles%2C+Bicycle%2C+Martys%2C+Martys%2C+Avon%2C+Avon+Lake%2C+Ohio%2C+Lorain%2C+Cleveland%2C+Raleigh%2C+Giant%2C+Electra%2C+Diamondback%2C+Dealer%2C+Parts%2C+Accessories%2C+Eastern%2C+Tricycles%2C+Tricycle%2C+Trike%2C+Trikes%2C+Tandem%2C+Tandems%2C+Recumbent%2C+Recumbent%2C+Baby+Seats%2C+Car+Racks%2C+Helmets%2C+BMX%2C+Mountain%2C+Road%2C+Hybrid%2C+Hybrids%2C+Comfort%2C+Sport+Comfort%2C+Skate%2C+Skate+Board%2C+Skate+Boards%2C+Suspension%2C+Service%2C+Wheels%2C+Seats%2C+Saddles%2C+Redline+';
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();
};
