/* [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','7601',jdecode('Home+Page'),jdecode(''),'/7601/index.html','true',[ 
		['PAGE','44725',jdecode('About+us'),jdecode(''),'/7601/44725.html','true',[],'',''],
		['PAGE','64725',jdecode('Customer+Feedback'),jdecode(''),'/7601/64725.html','true',[],'',''],
		['PAGE','52825',jdecode('Sweat+Shop+Gossip'),jdecode(''),'/7601/52825.html','true',[],'','']
	],'',''],
	['PAGE','7694',jdecode('Tire+Cover+Art'),jdecode(''),'/7694.html','true',[],'',''],
	['PAGE','28422',jdecode('Interior+Designs'),jdecode(''),'/28422.html','true',[],'',''],
	['PAGE','28322',jdecode('Equestrians'),jdecode(''),'/28322.html','true',[],'',''],
	['PAGE','30228',jdecode('SALE+ITEMS'),jdecode(''),'/30228.html','true',[],'',''],
	['PAGE','28401',jdecode('Order+Now'),jdecode(''),'/28401.html','true',[],'',''],
	['PAGE','30349',jdecode('Sparky%26%23x27%3Bs+Vee-Dub'),jdecode(''),'/30349/index.html','true',[ 
		['PAGE','59025',jdecode('Contact+Sparky'),jdecode(''),'/30349/59025.html','true',[],'',''],
		['PAGE','59925',jdecode('For+Sale+By+Owners'),jdecode(''),'/30349/59925.html','true',[],'',''],
		['PAGE','64626',jdecode('Ask+Sparky'),jdecode(''),'/30349/64626.html','true',[],'','']
	],'',''],
	['PAGE','7673',jdecode('Contact+Us'),jdecode(''),'/7673.html','true',[],'',''],
	['PAGE','28301',jdecode('Cool+VW+Stuff'),jdecode(''),'/28301.html','true',[],'',''],
	['PAGE','43825',jdecode('Joy+Hat+Club+'),jdecode(''),'/43825.html','true',[],'',''],
	['PAGE','17901',jdecode('Fun+Links'),jdecode(''),'/17901.html','true',[],'',''],
	['PAGE','69825',jdecode('Joan+Lucas'),jdecode(''),'/69825.html','true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Cable';
theSitetree.paletteFamily='D30303';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10367';
theSitetree.graphicsetId='10527';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cable',
				paletteFamily: 	'D30303',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10367',
				graphicsetId: 	'10527',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7673',
internalId:  '',
customField: '20100902-193622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20100826-162513'
};
webappMappings['7008']=webappMappings['7008-15706']={
webappId:    '7008',
documentId:  '28401',
internalId:  '15706',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20100618-160746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7694',
internalId:  '',
customField: '20100825-193429'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '7601',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-14811611']={
webappId:    '1501',
documentId:  '7601',
internalId:  '14811611',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28301',
internalId:  '',
customField: '20100603-215436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28401',
internalId:  '',
customField: '20100902-195332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28422',
internalId:  '',
customField: '20100615-224559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28322',
internalId:  '',
customField: '20100421-213207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30228',
internalId:  '',
customField: '20100604-000421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30349',
internalId:  '',
customField: '20100902-194319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52825',
internalId:  '',
customField: '20100604-000654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43825',
internalId:  '',
customField: '20100527-180010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44725',
internalId:  '',
customField: '20100505-161157'
};
webappMappings['7008']=webappMappings['7008-15860']={
webappId:    '7008',
documentId:  '59025',
internalId:  '15860',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59025',
internalId:  '',
customField: '20100902-193913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59925',
internalId:  '',
customField: '20100819-212130'
};
webappMappings['1002']=webappMappings['1002-64725avfl30inhs80']={
webappId:    '1002',
documentId:  '64725',
internalId:  '64725avfl30inhs80',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-16185']={
webappId:    '7008',
documentId:  '7673',
internalId:  '16185',
customField: 'language:en;country:US;'
};
webappMappings['1003']=webappMappings['1003-avfl30inhs80127e00bee22']={
webappId:    '1003',
documentId:  '64626',
internalId:  'avfl30inhs80127e00bee22',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64725',
internalId:  '',
customField: '20100608-231835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64626',
internalId:  '',
customField: '20100608-232835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69825',
internalId:  '',
customField: '20100603-222303'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHS80';
var companyName   = 'Threads+To+Treads+%26+Sparky%27s+Vee-Dub+Repair';
var htmlTitle	  = 'www.Threads-To-Treads.com';
var metaKeywords  = 'Mobile+Auto+Repair%2C+Emergency+Roadside+Assistance%2C+Vehicle+Storage%2C+Volkswagen++Art++Custom+Upholstery++Custom+Tire+Covers++Sparky%27s+Vee-Dub+Repair+Horse+Trailer+ArtCars%2C+Spare+Tire+Covers++Upholstery++Vintage+Volkswagen+Repair+%26+Restoration%2C+Custom+Spare+Tire+Covers%2C+VW%2C+Air-Cooled%2C+Type+2%2C+Samba%2C+Type+3%2C+Type+4%2C+Westfalia%2C+Camper%2C+';
var metaContents  = 'Mobile+Auto+Repair%2C+Emergency+Roadside+Assistance%2C+Vehicle+Storage%2C+Spare+Tire+Covers++Upholstery++Vintage+Volkswagen+Repair+%26+Restoration%2C+Custom+Spare+Tire+Covers%2C+VW%2C+Air-Cooled%2C+Type+2%2C+Samba%2C+Type+3%2C+Type+4%2C+Westfalia%2C+Camper%2C+Volkswagen++Art++Custom+Upholstery++Custom+Tire+Covers++Sparky%27s+Vee-Dub+Repair+Horse+Trailer+ArtCars%2C+Sundial+Camper';
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();
};
