/* [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','82',jdecode('Home'),jdecode(''),'/82.html','true',[],'',''],
	['PAGE','103',jdecode('About+us'),jdecode(''),'/103.html','true',[],'',''],
	['PAGE','2453',jdecode('Our+Van'),jdecode(''),'/2453.html','true',[],'',''],
	['PAGE','121',jdecode('Services'),jdecode(''),'/121/index.html','true',[ 
		['PAGE','1986',jdecode('Payment+Policy'),jdecode(''),'/121/1986.html','true',[],'','']
	],'',''],
	['PAGE','130',jdecode('Products'),jdecode(''),'/130/index.html','true',[ 
		['PAGE','139',jdecode('Spa+Lavish+Your+Pet'),jdecode(''),'/130/139.html','true',[],'',''],
		['PAGE','148',jdecode('HappyTails+Spa+'),jdecode(''),'/130/148.html','true',[],'',''],
		['PAGE','2111',jdecode('Burn%26%23x27%3Bs+Holistic+'),jdecode(''),'/130/2111.html','true',[],'','']
	],'',''],
	['PAGE','8601',jdecode('NuVet'),jdecode(''),'/8601.html','true',[],'',''],
	['PAGE','193',jdecode('Contact'),jdecode(''),'/193/index.html','true',[ 
		['PAGE','2229',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/193/2229.html','false',[],'','']
	],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='cutout';
theSitetree.paletteFamily='A1BCDD';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10611';
theSitetree.graphicsetId='10474';
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: 			'cutout',
				paletteFamily: 	'A1BCDD',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10611',
				graphicsetId: 	'10474',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '82',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82',
internalId:  '',
customField: '20100707-135109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103',
internalId:  '',
customField: '20100707-135132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2453',
internalId:  '',
customField: '20070413-215137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121',
internalId:  '',
customField: '20090125-180111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1986',
internalId:  '',
customField: '20070502-010717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130',
internalId:  '',
customField: '20100707-135222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2111',
internalId:  '',
customField: '20090125-170945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148',
internalId:  '',
customField: '20100707-135410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20100714-155314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139',
internalId:  '',
customField: '20070707-194843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '193',
internalId:  '',
customField: '20070707-232336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2229',
internalId:  '',
customField: '20070409-204707'
};
webappMappings['7008']=webappMappings['7008-8800']={
webappId:    '7008',
documentId:  '193',
internalId:  '8800',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050IN36FU';
var companyName   = 'Prestigious+Pup+Mobile+Spa+%26+Styling+Salon';
var htmlTitle	  = '';
var metaKeywords  = 'Prestigious%2C+Pup%2C+spa%2C+grooming%2C+styling%2C+pet%2C+mobile%2C+dog%2C+Burns%2C+Azmira%2C+Pet+n+Shape%2C+Happy+Tails%2C+bathing%2C+shampoo%2C+food%2C+treats%2C+travel%2C+gifts%2C+puppy%2C+health%2C+SPA+Lavish+your+pet%2C+retail%2C+holistic%2C+natural';
var metaContents  = 'Mobile+Dog+Grooming';
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();
};
