/* [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','6001',jdecode('Home'),jdecode(''), jdecode('%2F6001.html'), 'true',[],'',''],
	['PAGE','76301',jdecode('Our+Custom+Built+Bikes'),jdecode(''), jdecode('%2F76301.html'), 'true',[],'',''],
	['PAGE','169001',jdecode('Custom+Built+Wheels'),jdecode(''), jdecode('%2F169001.html'), 'true',[],'',''],
	['PAGE','76501',jdecode('Do+It+Your+Self+Custom+Kits'),jdecode(''), jdecode('%2F76501.html'), 'true',[],'',''],
	['PAGE','90322',jdecode('Phoenix+Bikeworks+Frame'),jdecode(''), jdecode('%2F90322.html'), 'true',[],'',''],
	['PAGE','135401',jdecode('Full+Suspension+Gas+Power'),jdecode(''), jdecode('%2F135401.html'), 'true',[],'',''],
	['PAGE','76943',jdecode('GT1+%26+GT2+Bicycles'),jdecode(''), jdecode('%2F76943.html'), 'true',[],'',''],
	['PAGE','88501',jdecode('Electric+Bicycles+%26+Kits'),jdecode(''), jdecode('%2F88501.html'), 'true',[],'',''],
	['PAGE','165501',jdecode('Canadian+Connection'),jdecode(''), jdecode('%2F165501.html'), 'true',[],'',''],
	['PAGE','90301',jdecode('4-Stroke+Engine+Kits'),jdecode(''), jdecode('%2F90301.html'), 'true',[],'',''],
	['PAGE','94401',jdecode('4-Stroke+Accessories+%26+Parts'),jdecode(''), jdecode('%2F94401.html'), 'true',[],'',''],
	['PAGE','187101',jdecode('Hi+Performance+4+stroke+parts'),jdecode(''), jdecode('%2F187101.html'), 'true',[],'',''],
	['PAGE','122501',jdecode('4G+T+Belt+Drive+Parts'),jdecode(''), jdecode('%2F122501.html'), 'true',[],'',''],
	['PAGE','150001',jdecode('Sick+Bike+Parts+2%264-Stroke'),jdecode(''), jdecode('%2F150001.html'), 'true',[],'',''],
	['PAGE','94422',jdecode('2-Stroke+Accessories+%26+Parts'),jdecode(''), jdecode('%2F94422.html'), 'true',[],'',''],
	['PAGE','93801',jdecode('HD+Wheels+%26+Sprockets'),jdecode(''), jdecode('%2F93801.html'), 'true',[],'',''],
	['PAGE','76901',jdecode('Felt+Cruiser+Bicycles'),jdecode(''), jdecode('%2F76901.html'), 'true',[],'',''],
	['PAGE','76922',jdecode('Electra+Cruiser+Bicycles'),jdecode(''), jdecode('%2F76922.html'), 'true',[],'',''],
	['PAGE','112001',jdecode('Drum+Brakes'),jdecode(''), jdecode('%2F112001.html'), 'true',[],'',''],
	['PAGE','113001',jdecode('Bicycle+Accessories'),jdecode(''), jdecode('%2F113001.html'), 'true',[],'',''],
	['PAGE','122522',jdecode('Complete+Lighting+Kit'),jdecode(''), jdecode('%2F122522.html'), 'true',[],'',''],
	['PAGE','112022',jdecode('In+store+Sale+Items'),jdecode(''), jdecode('%2F112022.html'), 'true',[],'',''],
	['PAGE','86301',jdecode('Customer+Build+Photos'),jdecode(''), jdecode('%2F86301.html'), 'true',[],'',''],
	['PAGE','86222',jdecode('Customer+Reviews'),jdecode(''), jdecode('%2F86222.html'), 'true',[],'',''],
	['PAGE','76564',jdecode('BlowByU%26%23x27%3Bs+Youtube+Channel'),jdecode(''), jdecode('%2F76564.html'), 'true',[],'',''],
	['PAGE','193701',jdecode('How+to+Videos'),jdecode(''), jdecode('%2F193701.html'), 'true',[],'',''],
	['PAGE','76964',jdecode('BlowByU+Forum'),jdecode(''), jdecode('%2F76964.html'), 'true',[],'',''],
	['PAGE','6073',jdecode('Contact'),jdecode(''), jdecode('%2F6073.html'), 'true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='291';
theSitetree.graphicsetId='355';
theSitetree.contentColor='A3AFD5';
theSitetree.contentBGColor='333F65';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'netfirms',
  product: 'WSCSYSSSSLY0XYNE'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'291',
				graphicsetId: 	'355',
				contentColor: 	'A3AFD5',
				contentBGColor: '333F65',
				a_color: 		'333F65',
				b_color: 		'040507',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6001',
internalId:  '',
customField: '20111212-190309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135401',
internalId:  '',
customField: '20111212-184228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6073',
internalId:  '',
customField: '20110406-005000'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76922',
internalId:  '',
customField: '20111212-195426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76301',
internalId:  '',
customField: '20111212-183818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94422',
internalId:  '',
customField: '20111212-192834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94401',
internalId:  '',
customField: '20111212-192048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76901',
internalId:  '',
customField: '20111212-193821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76501',
internalId:  '',
customField: '20111212-184025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76964',
internalId:  '',
customField: '20100927-181105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76943',
internalId:  '',
customField: '20111212-191124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76564',
internalId:  '',
customField: '20110204-030250'
};
webappMappings['1003']=webappMappings['1003-anfi20in2cbv12b49a68b7b']={
webappId:    '1003',
documentId:  '76964',
internalId:  'anfi20in2cbv12b49a68b7b',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86301',
internalId:  '',
customField: '20110319-231057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86222',
internalId:  '',
customField: '20101208-020519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88501',
internalId:  '',
customField: '20111212-191628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90301',
internalId:  '',
customField: '20111212-191930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90322',
internalId:  '',
customField: '20111212-184148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93801',
internalId:  '',
customField: '20111212-193143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112001',
internalId:  '',
customField: '20111212-195453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112022',
internalId:  '',
customField: '20111212-195821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113001',
internalId:  '',
customField: '20111212-195615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122501',
internalId:  '',
customField: '20111212-192326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122522',
internalId:  '',
customField: '20111212-195642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150001',
internalId:  '',
customField: '20111212-192553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165501',
internalId:  '',
customField: '20111212-191826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '169001',
internalId:  '',
customField: '20111212-183922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '187101',
internalId:  '',
customField: '20111212-192141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '193701',
internalId:  '',
customField: '20110919-014702'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'ANFI20IN2CBV';
var companyName   = 'Blow+By+U+Motorized+Bicycles';
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();
};

