/* [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','43',jdecode('Home'),jdecode(''),'/43.html','true',[],''],
	['PAGE','64',jdecode('Aquatics'),jdecode(''),'/64/index.html','true',[ 
		['PAGE','25101',jdecode('Accessories'),jdecode(''),'/64/25101.html','true',[],''],
		['PAGE','19201',jdecode('Aquariums'),jdecode(''),'/64/19201.html','true',[],'']
	],''],
	['PAGE','82',jdecode('Birds'),jdecode(''),'/82/index.html','true',[ 
		['PAGE','22701',jdecode('Accessories'),jdecode(''),'/82/22701.html','true',[],''],
		['PAGE','22722',jdecode('Cages'),jdecode(''),'/82/22722.html','true',[],'']
	],''],
	['PAGE','91',jdecode('Cats+and+Dogs'),jdecode(''),'/91/index.html','true',[ 
		['PAGE','28001',jdecode('Accessories'),jdecode(''),'/91/28001.html','true',[],'']
	],''],
	['PAGE','59901',jdecode('Small+Animals'),jdecode(''),'/59901.html','true',[],''],
	['PAGE','52301',jdecode('More+Than+a+Pet+Store'),jdecode(''),'/52301.html','true',[],''],
	['PAGE','1130',jdecode('Aquarium+Service'),jdecode(''),'/1130.html','true',[],''],
	['PAGE','1157',jdecode('Jobs'),jdecode(''),'/1157.html','false',[],''],
	['PAGE','8001',jdecode('Pet+Sitting'),jdecode(''),'/8001.html','true',[],''],
	['PAGE','1166',jdecode('What%26%23x27%3Bs+New'),jdecode(''),'/1166.html','true',[],''],
	['PAGE','1139',jdecode('Specials'),jdecode(''),'/1139.html','true',[],''],
	['PAGE','1605',jdecode('Special+Events'),jdecode(''),'/1605.html','true',[],''],
	['PAGE','34401',jdecode('Photos'),jdecode(''),'/34401.html','true',[],''],
	['PAGE','10701',jdecode('Email+Form'),jdecode(''),'/10701/index.html','true',[ 
		['PAGE','1661',jdecode('Customers+%28follow+up+page%29'),jdecode(''),'/10701/1661.html','false',[],'']
	],''],
	['PAGE','1596',jdecode('Message+Board'),jdecode(''),'/1596.html','true',[],''],
	['PAGE','865',jdecode('About+us'),jdecode(''),'/865.html','true',[],''],
	['PAGE','1175',jdecode('Contact'),jdecode(''),'/1175.html','true',[],''],
	['PAGE','1728',jdecode('Hours+of+Operation'),jdecode(''),'/1728.html','true',[],''],
	['PAGE','1278',jdecode('Directions'),jdecode(''),'/1278.html','true',[],''],
	['PAGE','1290',jdecode('Route+your+trip'),jdecode(''),'/1290.html','true',[],'']];
var siteelementCount=26;
theSitetree.topTemplateName='Antigua';
theSitetree.paletteFamily='617F92';
theSitetree.keyvisualId='6905';
theSitetree.keyvisualName='kv_6905.jpg';
theSitetree.fontsetId='11217';
theSitetree.graphicsetId='12036';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='809DAF';
var theTemplate={
				name: 			'Antigua',
				paletteFamily: 	'617F92',
				keyvisualId: 	'6905',
				keyvisualName: 	'kv_6905.jpg',
				fontsetId: 		'11217',
				graphicsetId: 	'12036',
				contentColor: 	'FFFFFF',
				contentBGColor: '809DAF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '43',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '1278',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '1290',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20091016-163557'
};
webappMappings['1001']=webappMappings['1001-ahw050in3kqj9b935793ec42df13']={
webappId:    '1001',
documentId:  '1661',
internalId:  'ahw050in3kqj9b935793ec42df13',
customField: 'followUp'
};
webappMappings['1501']=webappMappings['1501-1440602']={
webappId:    '1501',
documentId:  '43',
internalId:  '1440602',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43',
internalId:  '',
customField: '20100222-231934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64',
internalId:  '',
customField: '20090903-131416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1605',
internalId:  '',
customField: '20100117-162341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82',
internalId:  '',
customField: '20100222-234613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91',
internalId:  '',
customField: '20091016-154524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8001',
internalId:  '',
customField: '20090512-131003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1175',
internalId:  '',
customField: '20090903-131504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1166',
internalId:  '',
customField: '20091230-233040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1130',
internalId:  '',
customField: '20090401-235848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '865',
internalId:  '',
customField: '20100222-234748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1139',
internalId:  '',
customField: '20091230-231759'
};
webappMappings['7008']=webappMappings['7008-1517']={
webappId:    '7008',
documentId:  '10701',
internalId:  '1517',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1661',
internalId:  '',
customField: '20071112-044055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1157',
internalId:  '',
customField: '20090903-125855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1596',
internalId:  '',
customField: '20090825-163359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1728',
internalId:  '',
customField: '20090122-233240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1278',
internalId:  '',
customField: '20071112-042655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1290',
internalId:  '',
customField: '20071106-001013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10701',
internalId:  '',
customField: '20090730-123059'
};
webappMappings['7008']=webappMappings['7008-1474']={
webappId:    '7008',
documentId:  '10701',
internalId:  '1474',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-1475']={
webappId:    '7008',
documentId:  '10701',
internalId:  '1475',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22701',
internalId:  '',
customField: '20090903-130123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22722',
internalId:  '',
customField: '20091105-103340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25101',
internalId:  '',
customField: '20090602-004650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28001',
internalId:  '',
customField: '20090825-164445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52301',
internalId:  '',
customField: '20100222-234932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34401',
internalId:  '',
customField: '20090812-205238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59901',
internalId:  '',
customField: '20091105-102102'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3KQJ';
var companyName   = 'Gallery+of+Pets';
var htmlTitle	  = 'Gallery+of+Pets';
var metaKeywords  = 'Gallery+of+Pets%2C+saltwater%2C+freshwater%2C+fish%2C+dog%2C+cat%2C+accessories%2C+dog+food%2C+cat+food%2C+all+natural+pet+food%2C+pet+food%2C+holistic%2C+natural%2C+bird%2C+exotic%2C+aquarium%2C+tropical+pets%2C+aquariums%2C+coral%2C+pets%2C+Evo+pet+food%2C+Wellness+pet+food%2C+AE+cage%2C+YML+cage%2C+Prevue+cage%2C+cockatiel%2C+budgie%2C+cockatoo%2C+chemicals%2C+filtration%2C+lighting%2C+plants%2C+books%2C+heaters%2C+food%2C+aeration%2C+austin%2C+austin+tx%2C+austin+texas%2C+round+rock%2C+pflugerville%2C+live+rock%2C+Westlake%2C+aquarium+maintenance%2C+maintenance%2C+custom+aquariums%2C+DAS+aquariums%2C+halo+pet+food%2C+california+natural+pet+food%2C+from+pet+food%2C+blue+buffalo+pet+food';
var metaContents  = 'Serving+the+Austin+area+for+over+30+years%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();
};
