/* [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','20481',jdecode('Home'),jdecode(''),'/20481.html','true',[],'',''],
	['PAGE','23801',jdecode('WEBSTORE'),jdecode(''),'/23801.html','true',[],'',''],
	['PAGE','48623',jdecode('Dates%2FTimes%2FLocations'),jdecode(''),'/48623.html','true',[],'',''],
	['PAGE','983',jdecode('Products+and+Price+List'),jdecode(''),'/983.html','true',[],'',''],
	['PAGE','21501',jdecode('Southern+California'),jdecode(''),'/21501.html','true',[],'',''],
	['PAGE','22601',jdecode('CONTACT+THE+STATION%21'),jdecode(''),'/22601.html','true',[],'',''],
	['PAGE','18894',jdecode('Guestbook'),jdecode(''),'/18894/index.html','true',[ 
		['PAGE','18893',jdecode('Read+Guestbook'),jdecode(''),'/18894/18893.html','false',[],'','']
	],'',''],
	['PAGE','19032',jdecode('VACCINES+FOR+DOGS'),jdecode(''),'/19032.html','true',[],'',''],
	['PAGE','20224',jdecode('VACCINES+FOR+CATS'),jdecode(''),'/20224.html','true',[],'',''],
	['PAGE','19557',jdecode('Employment+Opportunities'),jdecode(''),'/19557.html','true',[],'',''],
	['PAGE','24601',jdecode('UPCOMING+EVENTS'),jdecode(''),'/24601.html','true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Education';
theSitetree.paletteFamily='766B4B';
theSitetree.keyvisualId='7321';
theSitetree.keyvisualName='kv_7321.jpg';
theSitetree.fontsetId='16462';
theSitetree.graphicsetId='12158';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='867C5F';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Education',
				paletteFamily: 	'766B4B',
				keyvisualId: 	'7321',
				keyvisualName: 	'kv_7321.jpg',
				fontsetId: 		'16462',
				graphicsetId: 	'12158',
				contentColor: 	'FFFFFF',
				contentBGColor: '867C5F',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24601',
internalId:  '',
customField: '20090903-174048'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '20481',
internalId:  '1501',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '20481',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20100411-193542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20481',
internalId:  '',
customField: '20100629-000518'
};
webappMappings['1002']=webappMappings['1002-18894ahw050inefnw']={
webappId:    '1002',
documentId:  '18894',
internalId:  '18894ahw050inefnw',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '983',
internalId:  '',
customField: '20100318-124014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48623',
internalId:  '',
customField: '20100803-001747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19557',
internalId:  '',
customField: '20091023-113114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22601',
internalId:  '',
customField: '20090807-205326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21501',
internalId:  '',
customField: '20100730-015243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18894',
internalId:  '',
customField: '20090728-010555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18893',
internalId:  '',
customField: '20080802-013810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19032',
internalId:  '',
customField: '20090706-113604'
};
webappMappings['7008']=webappMappings['7008-4378']={
webappId:    '7008',
documentId:  '22601',
internalId:  '4378',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20224',
internalId:  '',
customField: '20090706-113851'
};
webappMappings['1501']=webappMappings['1501-1325507']={
webappId:    '1501',
documentId:  '20481',
internalId:  '1325507',
customField: '1501'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INEFNW';
var companyName   = 'Vaccination+Station';
var htmlTitle	  = 'VACCINATION+STATION..+AFFORDABLE+PET+VACCINATIONS';
var metaKeywords  = 'Pet+Vaccination%2C+Dog+shots%2C+cat+shots%2C+k9%2C+feline%2C+canine%2C+vaccinations%2C+vaccination%2C+vaccinations%2C+';
var metaContents  = 'Pet+Vaccination%2C+Dog+shots%2C+cat+shots%2C+k9%2C+feline%2C+canine%2C+vaccinations%2C+vaccination%2C+vaccinations%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();
};
