/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','9416',jdecode('Locations'),jdecode(''),'/9416/index.html','true',[ 
		['PAGE','24301',jdecode('Contact+Us'),jdecode(''),'/9416/24301.html','true',[],'',''],
		['PAGE','9437',jdecode('Our+Goal'),jdecode(''),'/9416/9437.html','true',[],'',''],
		['PAGE','9458',jdecode('Our+Teams'),jdecode(''),'/9416/9458.html','true',[],'','']
	],'',''],
	['PAGE','9101',jdecode('Our+Services'),jdecode(''),'/9101/index.html','true',[ 
		['PAGE','14401',jdecode('Exterior+Wash'),jdecode(''),'/9101/14401.html','true',[],'',''],
		['PAGE','13101',jdecode('Full+Service+Wash'),jdecode(''),'/9101/13101.html','true',[],'',''],
		['PAGE','9122',jdecode('The+Works+Package'),jdecode(''),'/9101/9122.html','true',[],'',''],
		['PAGE','9143',jdecode('The+Supreme+Package'),jdecode(''),'/9101/9143.html','true',[],'',''],
		['PAGE','9164',jdecode('The+Ultimate+Package'),jdecode(''),'/9101/9164.html','true',[],'',''],
		['PAGE','9185',jdecode('Express+Hand+Wax+'),jdecode(''),'/9101/9185.html','true',[],'',''],
		['PAGE','9206',jdecode('Interior+Super+Clean+'),jdecode(''),'/9101/9206.html','true',[],'',''],
		['PAGE','9227',jdecode('Carpet+Shampoo+'),jdecode(''),'/9101/9227.html','true',[],'',''],
		['PAGE','9248',jdecode('Seat+Shampoo+'),jdecode(''),'/9101/9248.html','true',[],'',''],
		['PAGE','9269',jdecode('Bumper+to+Bumper'),jdecode(''),'/9101/9269.html','true',[],'',''],
		['PAGE','9290',jdecode('Extra+Goodies'),jdecode(''),'/9101/9290.html','true',[],'','']
	],'',''],
	['PAGE','9311',jdecode('Online+Products'),jdecode(''),'/9311/index.html','true',[ 
		['PAGE','9332',jdecode('Gift+Cards'),jdecode(''),'/9311/9332.html','true',[],'',''],
		['PAGE','9353',jdecode('Unlimited+Washes'),jdecode(''),'/9311/9353.html','true',[],'',''],
		['PAGE','39701',jdecode('Online+Coupons'),jdecode(''),'/9311/39701.html','true',[],'','']
	],'',''],
	['PAGE','16701',jdecode('Employment'),jdecode(''),'/16701/index.html','true',[ 
		['PAGE','16722',jdecode('Cashier+'),jdecode(''),'/16701/16722.html','true',[],'',''],
		['PAGE','16743',jdecode('Service+Advisor'),jdecode(''),'/16701/16743.html','true',[],'',''],
		['PAGE','16785',jdecode('Assistant+Managers'),jdecode(''),'/16701/16785.html','true',[],'',''],
		['PAGE','16806',jdecode('Manager'),jdecode(''),'/16701/16806.html','true',[],'','']
	],'',''],
	['PAGE','24322',jdecode('Fund+Raising'),jdecode(''),'/24322.html','true',[],'','']];
var siteelementCount=27;
theSitetree.topTemplateName='Filofax';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='508';
theSitetree.keyvisualName='autos.jpg';
theSitetree.fontsetId='62';
theSitetree.graphicsetId='62';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Filofax',
				paletteFamily: 	'003366',
				keyvisualId: 	'508',
				keyvisualName: 	'autos.jpg',
				fontsetId: 		'62',
				graphicsetId: 	'62',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'003366',
				b_color: 		'66CCFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-2682']={
webappId:    '7008',
documentId:  '9353',
internalId:  '2682',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-2683']={
webappId:    '7008',
documentId:  '9332',
internalId:  '2683',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100801-020124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9416',
internalId:  '',
customField: '20090725-181849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24301',
internalId:  '',
customField: '20100130-170507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9437',
internalId:  '',
customField: '20071010-222102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9458',
internalId:  '',
customField: '20100420-143923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20100706-191134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14401',
internalId:  '',
customField: '20081122-184134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13101',
internalId:  '',
customField: '20081122-184243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9122',
internalId:  '',
customField: '20081122-184304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9143',
internalId:  '',
customField: '20081122-184326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9164',
internalId:  '',
customField: '20081122-184346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9185',
internalId:  '',
customField: '20081122-184404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9206',
internalId:  '',
customField: '20081122-184422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9227',
internalId:  '',
customField: '20081122-184442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9248',
internalId:  '',
customField: '20081122-184507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9269',
internalId:  '',
customField: '20071024-150855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9290',
internalId:  '',
customField: '20081122-184718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9311',
internalId:  '',
customField: '20071217-130335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9332',
internalId:  '',
customField: '20090725-181028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9353',
internalId:  '',
customField: '20090209-101249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39701',
internalId:  '',
customField: '20100801-020057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16701',
internalId:  '',
customField: '20071217-171834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16722',
internalId:  '',
customField: '20071012-211720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16743',
internalId:  '',
customField: '20071012-214548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16785',
internalId:  '',
customField: '20071012-214824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16806',
internalId:  '',
customField: '20071012-215145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24322',
internalId:  '',
customField: '20100706-190449'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INX2KM';
var companyName   = 'Octopus+Car+Wash';
var htmlTitle	  = 'Octopus+Car+Wash';
var metaKeywords  = 'Octopus+Car+Wash+Arizona+Car+Washing+Valencia+22nd+street+Thornydale+clean+car+many+hands+to+serve+you';
var metaContents  = 'Tucson+Arizona+Octopus+Car+Washes+Full+service+car+wash+in+15+minutes+or+less%21';
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();
};
