/* [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','6301',jdecode('Home'),jdecode(''),'/6301.html','true',[],'',''],
	['PAGE','62201',jdecode('Follow+Our+Plight'),jdecode(''),'/62201.html','true',[],'',''],
	['PAGE','6352',jdecode('About+Us+and+Location'),jdecode(''),'/6352.html','false',[],'',''],
	['PAGE','6501',jdecode('Adopting+a+Dog+or+Cat'),jdecode(''),'/6501/index.html','true',[ 
		['PAGE','6522',jdecode('Our+Dogs'),jdecode(''),'/6501/6522.html','true',[],'',''],
		['PAGE','6543',jdecode('Our+Cats'),jdecode(''),'/6501/6543.html','true',[],'',''],
		['PAGE','7901',jdecode('Senior+For+Life+Program'),jdecode(''),'/6501/7901.html','true',[],'','']
	],'',''],
	['PAGE','6585',jdecode('Upcoming+Events'),jdecode(''),'/6585/index.html','true',[ 
		['PAGE','15101',jdecode('Adoption+Events'),jdecode(''),'/6585/15101.html','true',[],'',''],
		['PAGE','15122',jdecode('FundRaising+Events'),jdecode(''),'/6585/15122.html','true',[],'','']
	],'',''],
	['PAGE','7985',jdecode('Pet+Wellness+Clinics'),jdecode(''),'/7985.html','true',[],'',''],
	['PAGE','12401',jdecode('Volunteer-we+need+you%21'),jdecode(''),'/12401.html','true',[],'',''],
	['PAGE','6627',jdecode('Wish+List'),jdecode(''),'/6627.html','true',[],'',''],
	['PAGE','8006',jdecode('Our+Building+Fund+'),jdecode(''),'/8006.html','true',[],'',''],
	['PAGE','7922',jdecode('Meet+our+Vets'),jdecode(''),'/7922.html','false',[],'',''],
	['PAGE','24101',jdecode('Heaven+Can+Wait+'),jdecode(''),'/24101.html','true',[],'',''],
	['PAGE','8601',jdecode('Seneca+Cat+Grant'),jdecode(''),'/8601.html','false',[],'',''],
	['PAGE','7943',jdecode('Our+Animal+Angels'),jdecode(''),'/7943.html','true',[],'',''],
	['PAGE','6606',jdecode('Newsletters+'),jdecode(''),'/6606.html','true',[],'',''],
	['PAGE','8027',jdecode('Great+Videos'),jdecode(''),'/8027.html','true',[],'',''],
	['PAGE','8048',jdecode('From+Our+PetParents'),jdecode(''),'/8048.html','true',[],'',''],
	['PAGE','20901',jdecode('Thanks+To+You%21'),jdecode(''),'/20901.html','true',[],'',''],
	['PAGE','12901',jdecode('Memorial+Garden'),jdecode(''),'/12901.html','true',[],'',''],
	['PAGE','8069',jdecode('Poems+%26+Stories'),jdecode(''),'/8069.html','true',[],'',''],
	['PAGE','8111',jdecode('Annual+Reports'),jdecode(''),'/8111.html','true',[],'',''],
	['PAGE','6564',jdecode('Forever+Home+Dogs+%26%23x27%3B10'),jdecode(''),'/6564.html','true',[],'',''],
	['PAGE','24122',jdecode('Forever+Home+Cats+%26%23x27%3B10'),jdecode(''),'/24122.html','true',[],'',''],
	['PAGE','46101',jdecode('Important+Links'),jdecode(''),'/46101.html','true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Grace';
theSitetree.paletteFamily='CA9AFF';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='32049';
theSitetree.graphicsetId='13872';
theSitetree.contentColor='484848';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Grace',
				paletteFamily: 	'CA9AFF',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'32049',
				graphicsetId: 	'13872',
				contentColor: 	'484848',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20100818-130718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6522',
internalId:  '',
customField: '20100808-174617'
};
webappMappings['7060']=webappMappings['7060-14bc19b9c7253ae92df5b675282908a4']={
webappId:    '7060',
documentId:  '6564',
internalId:  '14bc19b9c7253ae92df5b675282908a4',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-cdd209822091710101c51d24b6937295']={
webappId:    '7060',
documentId:  '24122',
internalId:  'cdd209822091710101c51d24b6937295',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20100510-123155'
};
webappMappings['7060']=webappMappings['7060-1e43d334b554cad58ab70ac32bcc2221']={
webappId:    '7060',
documentId:  '8048',
internalId:  '1e43d334b554cad58ab70ac32bcc2221',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6585',
internalId:  '',
customField: '20100705-232835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6352',
internalId:  '',
customField: '20100720-234513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8027',
internalId:  '',
customField: '20100107-175947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6627',
internalId:  '',
customField: '20100510-113351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20100112-225736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20100511-102003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6606',
internalId:  '',
customField: '20100404-020225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8048',
internalId:  '',
customField: '20100122-125939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7943',
internalId:  '',
customField: '20100203-092324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7922',
internalId:  '',
customField: '20100215-141455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12401',
internalId:  '',
customField: '20100114-224231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12901',
internalId:  '',
customField: '20100114-224754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7985',
internalId:  '',
customField: '20100818-132210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8006',
internalId:  '',
customField: '20100510-142030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8111',
internalId:  '',
customField: '20100531-115126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6543',
internalId:  '',
customField: '20100613-170035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6564',
internalId:  '',
customField: '20100808-174505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15122',
internalId:  '',
customField: '20100705-232934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20100705-232903'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20901',
internalId:  '',
customField: '20100112-233204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24101',
internalId:  '',
customField: '20100106-210653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24122',
internalId:  '',
customField: '20100808-174139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46101',
internalId:  '',
customField: '20100221-223633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8069',
internalId:  '',
customField: '20100221-224533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62201',
internalId:  '',
customField: '20100725-194831'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INV24K';
var companyName   = 'Just+Animals+Pet+Placement+%26+Shelter';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};
