/* [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 theSitetree=[ 
	['PAGE','43',jdecode('Home'),jdecode(''),'/43.html','true',[],''],
	['PAGE','64',jdecode('About+us'),jdecode(''),'/64/index.html','true',[ 
		['PAGE','73',jdecode('History'),jdecode(''),'/64/73.html','true',[],'']
	],''],
	['PAGE','1677',jdecode('What%26%23x27%3Bs+New'),jdecode(''),'/1677.html','true',[],''],
	['PAGE','82',jdecode('Sweet+Boards%21'),jdecode(''),'/82/index.html','true',[ 
		['PAGE','91',jdecode('Longboards'),jdecode(''),'/82/91.html','true',[],''],
		['PAGE','100',jdecode('Slalom+Boards'),jdecode(''),'/82/100.html','true',[],''],
		['PAGE','3560',jdecode('666+wheelers'),jdecode(''),'/82/3560.html','true',[],'']
	],''],
	['PAGE','109',jdecode('Check+out+our+Woods'),jdecode(''),'/109.html','true',[],''],
	['PAGE','3745',jdecode('Flaming+Fatboys%21%21%21'),jdecode(''),'/3745.html','true',[],''],
	['PAGE','118',jdecode('Team+Fatboy'),jdecode(''),'/118.html','true',[],''],
	['PAGE','127',jdecode('Photos'),jdecode(''),'/127/index.html','true',[ 
		['PAGE','136',jdecode('Boards'),jdecode(''),'/127/136.html','true',[],''],
		['PAGE','145',jdecode('Riders'),jdecode(''),'/127/145.html','true',[],'']
	],''],
	['PAGE','1192',jdecode('Links'),jdecode(''),'/1192.html','true',[],''],
	['PAGE','1505',jdecode('Pricing+and+Contact'),jdecode(''),'/1505.html','true',[],''],
	['PAGE','2330',jdecode('Friends+Of+Fatboy'),jdecode(''),'/2330.html','true',[],''],
	['PAGE','3674',jdecode('Fatboy+at+the+Roller+Derby%21'),jdecode(''),'/3674.html','true',[],''],
	['PAGE','2499',jdecode('Specials%2FDeals%2FSales'),jdecode(''),'/2499/index.html','true',[ 
		['PAGE','2608',jdecode('Catch+o%26%23x27%3B+the+day%21'),jdecode(''),'/2499/2608.html','true',[],'']
	],''],
	['PAGE','2701',jdecode('Guestbook'),jdecode(''),'/2701/index.html','true',[ 
		['PAGE','2700',jdecode('Read+Guestbook'),jdecode(''),'/2701/2700.html','false',[],'']
	],''],
	['PAGE','2894',jdecode('Magazine+Ad+Archives'),jdecode(''),'/2894.html','true',[],''],
	['PAGE','4419',jdecode('Magazine+Articles'),jdecode(''),'/4419.html','true',[],'']];
var siteelementCount=24;
theSitetree.topTemplateName='elliptic';
theSitetree.paletteFamily='FFFFFF';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10627';
theSitetree.graphicsetId='10504';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'elliptic',
				paletteFamily: 	'FFFFFF',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10627',
				graphicsetId: 	'10504',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64',
internalId:  '',
customField: '20061207-211210'
};
webappMappings['1002']=webappMappings['1002-2701AHW050IN29CJ']={
webappId:    '1002',
documentId:  '2701',
internalId:  '2701AHW050IN29CJ',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '43',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43',
internalId:  '',
customField: '20070821-161648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73',
internalId:  '',
customField: '20070814-141759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1677',
internalId:  '',
customField: '20090812-115410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82',
internalId:  '',
customField: '20070523-155417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91',
internalId:  '',
customField: '20070615-150101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100',
internalId:  '',
customField: '20070419-133132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3560',
internalId:  '',
customField: '20070615-150812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109',
internalId:  '',
customField: '20071026-135640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3745',
internalId:  '',
customField: '20090812-120645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118',
internalId:  '',
customField: '20090430-095054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127',
internalId:  '',
customField: '20061206-131551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136',
internalId:  '',
customField: '20080820-102051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '145',
internalId:  '',
customField: '20080922-120126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1192',
internalId:  '',
customField: '20091130-093341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1505',
internalId:  '',
customField: '20070214-144102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2330',
internalId:  '',
customField: '20090312-085345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3674',
internalId:  '',
customField: '20080606-161229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2499',
internalId:  '',
customField: '20070226-185044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2608',
internalId:  '',
customField: '20080606-144637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2701',
internalId:  '',
customField: '20070206-190500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2700',
internalId:  '',
customField: '20070206-190500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2894',
internalId:  '',
customField: '20080820-100214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4419',
internalId:  '',
customField: '20080606-150157'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050IN29CJ';
var companyName   = 'Full+Bag+Dude%21';
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();
};

