/* [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','139834',jdecode('Home'),jdecode(''),'/139834.html','true',[],''],
	['PAGE','141634',jdecode('About+Us'),jdecode(''),'/141634.html','true',[],''],
	['PAGE','141134',jdecode('Bar+Parties*Girls*Events'),jdecode(''),'/141134.html','true',[],''],
	['PAGE','146134',jdecode('Blasting+%26+Painting'),jdecode(''),'/146134.html','true',[],''],
	['PAGE','142734',jdecode('List+Your+Parts+4+FREE'),jdecode(''),'/142734.html','false',[],''],
	['PAGE','143034',jdecode('Wanted'),jdecode(''),'/143034.html','true',[],''],
	['PAGE','143434',jdecode('Sound+Off'),jdecode(''),'/143434.html','true',[],''],
	['PAGE','142034',jdecode('General+Store'),jdecode(''),'/142034.html','true',[],''],
	['PAGE','141655',jdecode('Shop+Talk'),jdecode(''),'/141655.html','false',[],''],
	['PAGE','149234',jdecode('Game+Room'),jdecode(''),'/149234.html','true',[],''],
	['PAGE','159534',jdecode('Advertisers'),jdecode(''),'/159534.html','true',[],'']];
var siteelementCount=11;
theSitetree.topTemplateName='Stone';
theSitetree.paletteFamily='383691';
theSitetree.keyvisualId='4432';
theSitetree.keyvisualName='kv_4432.jpg';
theSitetree.fontsetId='10804';
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: 		'10804',
				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: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139834',
internalId:  '',
customField: '20100819-111008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149234',
internalId:  '',
customField: '20100818-155953'
};
webappMappings['7008']=webappMappings['7008-2170']={
webappId:    '7008',
documentId:  '143034',
internalId:  '2170',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '146134',
internalId:  '',
customField: '20100816-130046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '159534',
internalId:  '',
customField: '20100818-160914'
};
webappMappings['7060']=webappMappings['7060-772439caef67b657ef2f704dc58618d0']={
webappId:    '7060',
documentId:  '141134',
internalId:  '772439caef67b657ef2f704dc58618d0',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141634',
internalId:  '',
customField: '20100818-162229'
};
webappMappings['1003']=webappMappings['1003-abr330inz00l129cc5dea60']={
webappId:    '1003',
documentId:  '141655',
internalId:  'abr330inz00l129cc5dea60',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141655',
internalId:  '',
customField: '20100716-205350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142034',
internalId:  '',
customField: '20100819-112251'
};
webappMappings['7008']=webappMappings['7008-2165']={
webappId:    '7008',
documentId:  '142734',
internalId:  '2165',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142734',
internalId:  '',
customField: '20100721-162335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '143034',
internalId:  '',
customField: '20100818-162917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '143434',
internalId:  '',
customField: '20100819-111537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141134',
internalId:  '',
customField: '20100818-162303'
};
webappMappings['7060']=webappMappings['7060-7d2e74e5082057ce99e5f7ad5ec26538']={
webappId:    '7060',
documentId:  '146134',
internalId:  '7d2e74e5082057ce99e5f7ad5ec26538',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-b19247d158f62f260d48100de5ece9b1']={
webappId:    '7060',
documentId:  '141634',
internalId:  'b19247d158f62f260d48100de5ece9b1',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-2221']={
webappId:    '7008',
documentId:  '143434',
internalId:  '2221',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc1.brinkster.com';
var accountId     = 'ABR330INZ00L';
var companyName   = 'AMERICAN+THUNDER+CUSTOMS';
var htmlTitle	  = 'AMERICAN++++++++THUNDER++++++++CUSTOMS';
var metaKeywords  = '4X4%2C+CORVETTES%2C+HARLEY%2C+CLASSIC+CARS%2C+TOYS%2C+CHEVY%2CFORD%2CAMERICAN%2C+promotional+girls%2Cgirls%2Cmodels%2C+RAT+RODS%2C+PARTS%2C+T+SHIRTS.+UNDER+COATING%2C+HEAVY+EQUIPMENT%2C+CLOTHING%2C+SAND+BLASTING%2C+ABRASIVE+BLASTING%2C+TRAILERS%2C+BIKINIS%2C+PICK-UP+TRUCKS%2C+SCOOTERS%2C+MINI+BIKES%2C+PARTY%2C+SHOWS%2C+CAR+SHOWS%2C+BIKE+SHOWS%2C+LINGERIE%2C+MUSIC%2C+PAINITNG%2C+PAY+PAL%2C+POOR+BOY+PLAYTOYS%2C+POWER+WASHERS%2C+WELDING%2C+LAWN+MOWERS%2C+SHOP%2C+SPECIALITY+SHOP%2C+GARAGE%2C+GOOD+TIMES%2C+NUDITY%2C+SEXY%2C+SEMI-NUDE%2C+ADULT%2C+ADULT+ENTERTAINMENT%2C+ENTERTAINMENT%2C+BIG+JOHN%2C+HYTEK%2C+MISS+KATIE%2C+FACEBOOK%2C+CRAIGSLIST%2C+BIG+JOHN+ROBINSON%2C+MISSOURI%2C+MID-WEST%2C+MOTORSPORTS%2C+ST.+LOUIS%2C+TROY%2C+THUNDER%2C+AMERICAN%2C+SHOES%2C+BOOTS%2C+CDS%2C+GUNS%2C+KNIVES%2C+WHISKEY%2C+WINE%2C+POOL%2C+HAND+TOOLS%2C+TOOLS%2C+TOOL%2C+COMPUTERS';
var metaContents  = '4X4%2C+CORVETTES%2C+HARLEY%2C+CLASSIC+CARS%2C+TOYS%2C+CHEVY%2CFORD%2CAMERICAN%2C+promotional+girls%2Cgirls%2Cmodels%2C+RAT+RODS%2C+PARTS%2C+T+SHIRTS.+UNDER+COATING%2C+HEAVY+EQUIPMENT%2C+CLOTHING%2C+SAND+BLASTING%2C+ABRASIVE+BLASTING%2C+TRAILERS%2C+BIKINIS%2C+PICK-UP+TRUCKS%2C+SCOOTERS%2C+MINI+BIKES%2C+PARTY%2C+SHOWS%2C+CAR+SHOWS%2C+BIKE+SHOWS%2C+LINGERIE%2C+MUSIC%2C+PAINITNG%2C+PAY+PAL%2C+POOR+BOY+PLAYTOYS%2C+POWER+WASHERS%2C+WELDING%2C+LAWN+MOWERS%2C+SHOP%2C+SPECIALITY+SHOP%2C+GARAGE%2C+GOOD+TIMES%2C+NUDITY%2C+SEXY%2C+SEMI-NUDE%2C+ADULT%2C+ADULT+ENTERTAINMENT%2C+ENTERTAINMENT%2C+BIG+JOHN%2C+HYTEK%2C+MISS+KATIE%2C+FACEBOOK%2C+CRAIGSLIST%2C+BIG+JOHN+ROBINSON%2C+MISSOURI%2C+MID-WEST%2C+MOTORSPORTS%2C+ST.+LOUIS%2C+TROY%2C+THUNDER%2C+AMERICAN%2C+SHOES%2C+BOOTS%2C+CDS%2C+GUNS%2C+KNIVES%2C+WHISKEY%2C+WINE%2C+POOL%2C+HAND+TOOLS%2C+TOOLS%2C+TOOL%2C+COMPUTERS';
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();
};
