/* [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','1101',jdecode('Home'),jdecode(''),'/1101.html','true',[],''],
	['PAGE','1152',jdecode('About+us'),jdecode(''),'/1152.html','true',[],''],
	['PAGE','32501',jdecode('For+Sale+Gallery'),jdecode(''),'/32501.html','true',[],''],
	['PAGE','1194',jdecode('Products'),jdecode(''),'/1194/index.html','true',[ 
		['PAGE','1236',jdecode('Parts+Alt.+Headers'),jdecode(''),'/1194/1236.html','true',[],''],
		['PAGE','1215',jdecode('Bodies+and+Turn+Key'),jdecode(''),'/1194/1215.html','true',[],'']
	],''],
	['PAGE','17801',jdecode('Projects+Underway'),jdecode(''),'/17801/index.html','true',[ 
		['PAGE','34701',jdecode('T+Truck'),jdecode(''),'/17801/34701.html','true',[],''],
		['PAGE','35101',jdecode('V8+Speedster'),jdecode(''),'/17801/35101.html','true',[],''],
		['PAGE','17822',jdecode('Gallery'),jdecode(''),'/17801/17822.html','true',[],'']
	],''],
	['PAGE','1320',jdecode('Tips+%26+Tricks'),jdecode(''),'/1320.html','true',[],''],
	['PAGE','9101',jdecode('Model+T%26%23x27%3Bs'),jdecode(''),'/9101.html','true',[],''],
	['PAGE','38001',jdecode('Wildcat'),jdecode(''),'/38001.html','true',[],''],
	['PAGE','38601',jdecode('Doug+Bruton%26%23x27%3Bs+39+Deluxe'),jdecode(''),'/38601.html','true',[],'']];
var siteelementCount=14;
theSitetree.topTemplateName='Stone';
theSitetree.paletteFamily='383691';
theSitetree.keyvisualId='4432';
theSitetree.keyvisualName='kv_4432.jpg';
theSitetree.fontsetId='10805';
theSitetree.graphicsetId='11239';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='9C9B9B';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Stone',
				paletteFamily: 	'383691',
				keyvisualId: 	'4432',
				keyvisualName: 	'kv_4432.jpg',
				fontsetId: 		'10805',
				graphicsetId: 	'11239',
				contentColor: 	'000000',
				contentBGColor: '9C9B9B',
				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:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-1d1d8af725c50e6e8ea5ec83f0979f64']={
webappId:    '7060',
documentId:  '9101',
internalId:  '1d1d8af725c50e6e8ea5ec83f0979f64',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1101',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-158787f0f6fe72a290fd64b12b5a99b8']={
webappId:    '7060',
documentId:  '34701',
internalId:  '158787f0f6fe72a290fd64b12b5a99b8',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-865d50e7a33cf7e32004f08bfd9ee401']={
webappId:    '7060',
documentId:  '35101',
internalId:  '865d50e7a33cf7e32004f08bfd9ee401',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1101',
internalId:  '',
customField: '20090908-112611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1152',
internalId:  '',
customField: '20071203-121147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32501',
internalId:  '',
customField: '20080725-171630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1194',
internalId:  '',
customField: '20080505-113538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1236',
internalId:  '',
customField: '20071102-072042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1215',
internalId:  '',
customField: '20071203-130056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17801',
internalId:  '',
customField: '20080728-154525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34701',
internalId:  '',
customField: '20080728-160255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35101',
internalId:  '',
customField: '20080728-155520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17822',
internalId:  '',
customField: '20080418-084840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1320',
internalId:  '',
customField: '20071102-071046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20070122-122355'
};
webappMappings['7060']=webappMappings['7060-da49fdd8be54cca8b2e14c6b21db3203']={
webappId:    '7060',
documentId:  '38001',
internalId:  'da49fdd8be54cca8b2e14c6b21db3203',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38001',
internalId:  '',
customField: '20090907-154100'
};
webappMappings['7060']=webappMappings['7060-7e514c2fc9a79160dcecce4199a4dfbc']={
webappId:    '7060',
documentId:  '38601',
internalId:  '7e514c2fc9a79160dcecce4199a4dfbc',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38601',
internalId:  '',
customField: '20090924-075518'
};
var canonHostname = 'wsc1.brinkster.com';
var accountId     = 'ABRI10INXFLQ';
var companyName   = 'Speedster+Inc.';
var htmlTitle	  = 'Speedster+inc.';
var metaKeywords  = 'model+a+ford+model+t+ford+32+ford+33+ford+speedster+racer';
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();
};
