/* [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','6001',jdecode('Home'),jdecode(''),'/6001.html','true',[],''],
	['PAGE','6052',jdecode('Emergency+service'),jdecode(''),'/6052.html','true',[],''],
	['PAGE','6073',jdecode('About+us'),jdecode(''),'/6073/index.html','true',[ 
		['PAGE','6094',jdecode('Hours'),jdecode(''),'/6073/6094.html','true',[],''],
		['PAGE','6115',jdecode('How+to+find+us'),jdecode(''),'/6073/6115.html','true',[],''],
		['PAGE','6136',jdecode('Our+team'),jdecode(''),'/6073/6136.html','true',[],''],
		['PAGE','6157',jdecode('Repair+Shop'),jdecode(''),'/6073/6157.html','true',[],'']
	],''],
	['PAGE','6178',jdecode('Services'),jdecode(''),'/6178/index.html','true',[ 
		['PAGE','6199',jdecode('Commercial'),jdecode(''),'/6178/6199.html','true',[],''],
		['PAGE','6220',jdecode('Retail'),jdecode(''),'/6178/6220.html','true',[],'']
	],''],
	['PAGE','6241',jdecode('Products'),jdecode(''),'/6241/index.html','true',[ 
		['PAGE','6262',jdecode('Tires'),jdecode(''),'/6241/6262.html','true',[],''],
		['PAGE','6283',jdecode('Wheels'),jdecode(''),'/6241/6283.html','true',[],''],
		['PAGE','6325',jdecode('Accessories'),jdecode(''),'/6241/6325.html','true',[],'']
	],''],
	['PAGE','6367',jdecode('Specials'),jdecode(''),'/6367.html','true',[],''],
	['PAGE','6388',jdecode('Brand+Info'),jdecode(''),'/6388.html','true',[],''],
	['PAGE','6409',jdecode('Contact'),jdecode(''),'/6409.html','true',[],'']];
var siteelementCount=17;
theSitetree.topTemplateName='Collage';
theSitetree.paletteFamily='F9C116';
theSitetree.keyvisualId='2469';
theSitetree.keyvisualName='verkehr.jpg';
theSitetree.fontsetId='403';
theSitetree.graphicsetId='459';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Collage',
				paletteFamily: 	'F9C116',
				keyvisualId: 	'2469',
				keyvisualName: 	'verkehr.jpg',
				fontsetId: 		'403',
				graphicsetId: 	'459',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FFFFFF',
				b_color: 		'F9C116',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6001',
internalId:  '',
customField: '20090212-112704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6052',
internalId:  '',
customField: '20090212-115711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6073',
internalId:  '',
customField: '20090212-124502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6094',
internalId:  '',
customField: '20090212-125201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6115',
internalId:  '',
customField: '20090212-131120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6136',
internalId:  '',
customField: '20090212-102004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6157',
internalId:  '',
customField: '20090212-102004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6178',
internalId:  '',
customField: '20090212-102004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6409',
internalId:  '',
customField: '20090212-102004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6199',
internalId:  '',
customField: '20090212-102004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6220',
internalId:  '',
customField: '20090212-102004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6241',
internalId:  '',
customField: '20090212-102004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6262',
internalId:  '',
customField: '20090212-102004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6283',
internalId:  '',
customField: '20090212-102004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6325',
internalId:  '',
customField: '20090212-102004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6367',
internalId:  '',
customField: '20090212-102004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6388',
internalId:  '',
customField: '20090212-102004'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INL1VF';
var companyName   = 'NO+TIME+FLAT+TIRE+SERVICE';
var htmlTitle	  = 'no+time+flat+tire+service+grand+rapids+michigan';
var metaKeywords  = 'tire%2C+tires%2C+wheel%2C+wheels%2C+service%2C+repair%2C+road%2C+car%2C+truck%2C+semi%2C+suv%2C+cuv%2C+atv%2C4x4%2Chankook%2Cgoodyear%2Cmichelin%2Cbridgestone%2Ckelly%2C+firestone%2C+dunlop%2C+sumitomo%2C+cooper%2Csigma%2Croadmaster%2Cgoodrich%2Cb+f+goodrich%2Ccontinental%2C+general%2Cbandag%2Coliver%2Caccuride%2Calcoa%2Cretread%2Cretreading%2Cvulcanizing%2Crepairing%2Cvalve%2Cvalves%2Cguage%2C';
var metaContents  = 'On+site+or+in+shop+tire+and+wheel+service%2C+Grand+Rapids%2C+Jenison%2C+West%2C++Michigan';
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();
};
