/* [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','22',jdecode('Home'),jdecode(''),'/22.html','true',[],'',''],
	['PAGE','2427',jdecode('Products'),jdecode(''),'/2427.html','true',[],'',''],
	['PAGE','2436',jdecode('Services+%26+Prices'),jdecode(''),'/2436.html','true',[],'',''],
	['PAGE','2445',jdecode('Special+Events+'),jdecode(''),'/2445.html','true',[],'',''],
	['PAGE','26712',jdecode('Guestbook'),jdecode(''),'/26712.html','true',[],'',''],
	['PAGE','2472',jdecode('Links'),jdecode(''),'/2472.html','true',[],'',''],
	['PAGE','6716',jdecode('FAQ'),jdecode(''),'/6716.html','true',[],'',''],
	['PAGE','7013',jdecode('House+Rules'),jdecode(''),'/7013.html','true',[],'',''],
	['PAGE','2481',jdecode('Contact+Info+-+Hours+'),jdecode(''),'/2481.html','true',[],'',''],
	['PAGE','3007',jdecode('Photo+Gallery'),jdecode(''),'/3007.html','true',[],'','']];
var siteelementCount=10;
theSitetree.topTemplateName='Porthole';
theSitetree.paletteFamily='064B91';
theSitetree.keyvisualId='6717';
theSitetree.keyvisualName='kv_6717.jpg';
theSitetree.fontsetId='11201';
theSitetree.graphicsetId='12013';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E9F3FF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Porthole',
				paletteFamily: 	'064B91',
				keyvisualId: 	'6717',
				keyvisualName: 	'kv_6717.jpg',
				fontsetId: 		'11201',
				graphicsetId: 	'12013',
				contentColor: 	'000000',
				contentBGColor: 'E9F3FF',
				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['7060']=webappMappings['7060-1346ed51f823dbedeced1d2c0481a612']={
webappId:    '7060',
documentId:  '3007',
internalId:  '1346ed51f823dbedeced1d2c0481a612',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '22',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2436',
internalId:  '',
customField: '20091018-105845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2445',
internalId:  '',
customField: '20091114-083635'
};
webappMappings['1501']=webappMappings['1501-28606']={
webappId:    '1501',
documentId:  '22',
internalId:  '28606',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2472',
internalId:  '',
customField: '20100502-153526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2481',
internalId:  '',
customField: '20100420-082657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22',
internalId:  '',
customField: '20100622-072121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2427',
internalId:  '',
customField: '20090414-063912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6716',
internalId:  '',
customField: '20080524-104939'
};
webappMappings['1002']=webappMappings['1002-26712ahw050inxsei']={
webappId:    '1002',
documentId:  '26712',
internalId:  '26712ahw050inxsei',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7013',
internalId:  '',
customField: '20080509-191432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3007',
internalId:  '',
customField: '20070127-223434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26712',
internalId:  '',
customField: '20091018-110234'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INXSEI';
var companyName   = '++++++++++++++++++Barks-n-Bubbles+Boutique%2C+LLC';
var htmlTitle	  = 'Barks-n-Bubbles+Boutique%2C+Self+Serve+Dog+Wash+%26+Full+Serve+Grooming';
var metaKeywords  = 'Grooming%2C+Dog+Wash%2C+Pet+Wash%2C+Dog%2C+Wash%2C+Self+Serve%2C+Serve%2C+Gourmet%2C+Treats%2C+Self-Serve+Dog+Wash%2C+Bubbles%2C+Clip+Nails%2C+Dirty+Dog%2C+Barks%2C+Long+Island%2C+Clean%2C+fleas%2C+ticks%2C+dog+supplies%2C+collar%2C+leads%2C+training%2C+dog+food%2C+tubs%2C+centereach%2C+holistic%2C+dog+friendly%2C+Toys%2C+rawhides%2C+bones%2C+bone%2C+groom%2C+dog+park%2C+dog+run%2C+dog+care%2C+canine%2C+kibble%2C+vets+choice%2C+canine+wash%2C+AAFCO%2C+AKC%2C+dog+trainer%2C+%2F';
var metaContents  = 'Grooming%2C+Dog+Wash%2C+Pet+Wash%2C+Dog%2C+Wash%2C+Self+Serve%2C+Serve%2C+Gourmet%2C+Treats%2C+Self-Serve+Dog+Wash%2C+Bubbles%2C+Clip+Nails%2C+Dirty+Dog%2C+Barks%2C+Long+Island%2C+Clean%2C+fleas%2C+ticks%2C+dog+supplies%2C+collar%2C+leads%2C+training%2C+dog+food%2C+tubs%2C+centereach%2C+holistic%2C+dog+friendly%2C+Toys%2C+rawhides%2C+bones%2C+bone%2C+groom%2C+dog+park%2C+dog+run%2C+dog+care%2C+canine%2C+kibble%2C+vets+choice%2C+canine+wash%2C+AAFCO%2C+AKC%2C+dog+trainer%2C+%2F';
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();
};
