/* [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','1901',jdecode('Home'),jdecode(''), jdecode('%2F1901.html'), 'true',[],'',''],
	['PAGE','4901',jdecode('About+us'),jdecode(''), jdecode('%2F4901%2Findex.html'), 'true',[ 
		['PAGE','4922',jdecode('Our+team'),jdecode(''), jdecode('%2F4901%2F4922.html'), 'true',[],'','']
	],'',''],
	['ITEM','22502',jdecode('2+News+Police+K9+'),jdecode(''), jdecode('http%3A%2F%2Fhttp%3A%2F%2Fwww.wkrn.com%2Fstory%2F14878799%2Fclarksville-police-dogs-receive-spa-treatment'), 'true',[],'','_blank'],
	['PAGE','22801',jdecode('Big+Brothers+Big+Sisters'),jdecode(''), jdecode('%2F22801.html'), 'true',[],'',''],
	['ITEM','22501',jdecode('Chairaitable+services'),jdecode(''), jdecode('http%3A%2F%2Fhttp%3A%2F%2Fwww.theleafchronicle.com%2Fapps%2Fpbcs.dll%2Farticle%3FAID%3D2011106040323'), 'true',[],'','_blank'],
	['PAGE','1973',jdecode('Care+tips'),jdecode(''), jdecode('%2F1973.html'), 'true',[],'',''],
	['PAGE','8201',jdecode('Cat+Services'),jdecode(''), jdecode('%2F8201.html'), 'true',[],'',''],
	['ITEM','22503',jdecode('Clarksvillenow'),jdecode(''), jdecode('http%3A%2F%2Fhttp%3A%2F%2Fwww.clarksvillenow.com%2FK9-s-Receive-Pampering-and-Grooming%2F10077221'), 'true',[],'','_blank'],
	['PAGE','20501',jdecode('Client+Reviews'),jdecode(''), jdecode('%2F20501.html'), 'true',[],'',''],
	['PAGE','4943',jdecode('Contact'),jdecode(''), jdecode('%2F4943.html'), 'true',[],'',''],
	['PAGE','7001',jdecode('Daycare+'),jdecode(''), jdecode('%2F7001.html'), 'true',[],'',''],
	['ITEM','20643',jdecode('Facebook+LINK'),jdecode(''), jdecode('http%3A%2F%2Fwww.facebook.com%2F%23%21%2Fpages%2FAlicias-K9-Kuts-Kennels%2F287339611550'), 'true',[],'','_blank'],
	['PAGE','6301',jdecode('Grooming+Services'),jdecode(''), jdecode('%2F6301.html'), 'true',[],'',''],
	['PAGE','20601',jdecode('GuestBook+Plese+sign+in%3A'),jdecode(''), jdecode('%2F20601.html'), 'true',[],'',''],
	['PAGE','4964',jdecode('Jobs'),jdecode(''), jdecode('%2F4964.html'), 'true',[],'',''],
	['ITEM','22505',jdecode('Leaf+Chronicle'),jdecode(''), jdecode('http%3A%2F%2Fhttp%3A%2F%2Fpqasb.pqarchiver.com%2Ftheleafchronicle%2Faccess%2F2371787741.html%3FFMT%3DABS%26date%3DJun%2B10%252C%2B2011'), 'true',[],'','_blank'],
	['PAGE','20622',jdecode('Weather+%40+Alicia%26%23x27%3Bs+'),jdecode(''), jdecode('%2F20622.html'), 'true',[],'',''],
	['PAGE','12801',jdecode('Monthly+Specials'),jdecode(''), jdecode('%2F12801.html'), 'true',[],'',''],
	['PAGE','5722',jdecode('Overnight+Lodging%2FBoarding'),jdecode(''), jdecode('%2F5722.html'), 'true',[],'',''],
	['PAGE','5701',jdecode('Pet+Grooming'),jdecode(''), jdecode('%2F5701.html'), 'true',[],'',''],
	['PAGE','7901',jdecode('Pet+Requirements'),jdecode(''), jdecode('%2F7901.html'), 'true',[],'',''],
	['ITEM','22504',jdecode('Pet+of+The+Day'),jdecode(''), jdecode('http%3A%2F%2Fhttp%3A%2F%2Fwww.clarksvillenow.com%2Fpages%2F9895635.php'), 'true',[],'','_blank'],
	['PAGE','5743',jdecode('Pet+Taxi'),jdecode(''), jdecode('%2F5743.html'), 'true',[],'',''],
	['PAGE','7201',jdecode('Programs'),jdecode(''), jdecode('%2F7201.html'), 'true',[],'',''],
	['PAGE','6601',jdecode('SPA+services+alacart'),jdecode(''), jdecode('%2F6601.html'), 'true',[],'',''],
	['ITEM','23601',jdecode('Video'),jdecode(''), jdecode('http%3A%2F%2Fhttp%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DWc9_HogStuk%26feature%3Dyoutube_gdata_player'), 'true',[],'','_blank']];
var siteelementCount=27;
theSitetree.topTemplateName='Tendril';
theSitetree.paletteFamily='D9F4D5';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33093';
theSitetree.graphicsetId='14058';
theSitetree.contentColor='3B8030';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLYTC2ZA'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Tendril',
				paletteFamily: 	'D9F4D5',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33093',
				graphicsetId: 	'14058',
				contentColor: 	'3B8030',
				contentBGColor: 'FFFFFF',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20110616-081042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20110519-225905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4922',
internalId:  '',
customField: '20110211-164353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1973',
internalId:  '',
customField: '20091012-115716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4943',
internalId:  '',
customField: '20091012-165942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22801',
internalId:  '',
customField: '20110615-080000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4964',
internalId:  '',
customField: '20091012-133447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20110119-145857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20110615-081123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20110519-231127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20110519-232225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7201',
internalId:  '',
customField: '20091012-170232'
};
webappMappings['1002']=webappMappings['1002-20601avfl30inht1t']={
webappId:    '1002',
documentId:  '20601',
internalId:  '20601avfl30inht1t',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5743',
internalId:  '',
customField: '20110519-232304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5722',
internalId:  '',
customField: '20110615-081048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20110519-230059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20110520-002804'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1901',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-14817683']={
webappId:    '1501',
documentId:  '1901',
internalId:  '14817683',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12801',
internalId:  '',
customField: '20110615-080254'
};
webappMappings['7080']=webappMappings['7080-1237']={
webappId:    '7080',
documentId:  '20622',
internalId:  '1237',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20501',
internalId:  '',
customField: '20110519-232408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20601',
internalId:  '',
customField: '20110520-000158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20622',
internalId:  '',
customField: '20110520-000159'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHT1T';
var companyName   = 'Alicia%27s+K9+Kuts+%26+Kennels';
var htmlTitle	  = '';
var metaKeywords  = 'dog%2C+cat%2C+grooming%2C+bath%2C+Holistic%2C+kennel%2C+boarding%2C+pet+sitting%2C+';
var metaContents  = 'dog%2C+cat%2C+grooming%2C+bath%2C+Holistic%2C+kennel%2C+boarding%2C+pet+sitting%2C+';
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();
};

