/* [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','1601',jdecode('HOME'),jdecode(''),'/1601.html','true',[],'',''],
	['PAGE','67901',jdecode('TEAM+LOG-IN'),jdecode(''),'/67901.html','true',[],'',''],
	['PAGE','72401',jdecode('NEW+KITTENS+PUPPIES'),jdecode(''),'/72401.html','true',[],'',''],
	['PAGE','94312',jdecode('NEW+PATIENT+2010'),jdecode(''),'/94312.html','true',[],'',''],
	['PAGE','25101',jdecode('MISSION'),jdecode(''),'/25101.html','true',[],'',''],
	['PAGE','25222',jdecode('ADOPTIONS'),jdecode(''),'/25222.html','true',[],'',''],
	['PAGE','85301',jdecode('BOARDING'),jdecode(''),'/85301.html','true',[],'',''],
	['PAGE','22801',jdecode('GROOMING'),jdecode(''),'/22801.html','true',[],'',''],
	['PAGE','22885',jdecode('JOBS'),jdecode(''),'/22885.html','true',[],'',''],
	['PAGE','25243',jdecode('KID%26%23x27%3BS+PAGE'),jdecode(''),'/25243/index.html','true',[ 
		['PAGE','25264',jdecode('KID%26%23x27%3BS+PAGE-2'),jdecode(''),'/25243/25264.html','true',[],'','']
	],'',''],
	['PAGE','23785',jdecode('PICTURES'),jdecode(''),'/23785/index.html','true',[ 
		['PAGE','59501',jdecode('GROUNDBREAKING'),jdecode(''),'/23785/59501.html','true',[],'',''],
		['PAGE','29985',jdecode('OPEN+HOUSE+1-09'),jdecode(''),'/23785/29985.html','true',[],'',''],
		['PAGE','30006',jdecode('SPRING+FLING+09'),jdecode(''),'/23785/30006.html','true',[],'',''],
		['PAGE','56601',jdecode('SPRING+FLING+09-2'),jdecode(''),'/23785/56601.html','true',[],'',''],
		['PAGE','57601',jdecode('SPRING+FLING+09-3'),jdecode(''),'/23785/57601.html','true',[],'',''],
		['PAGE','59901',jdecode('HALLOWEEN+07'),jdecode(''),'/23785/59901.html','true',[],'',''],
		['PAGE','49101',jdecode('HALLOWEEN+08'),jdecode(''),'/23785/49101.html','true',[],'',''],
		['PAGE','80101',jdecode('HALLOWEEN+09'),jdecode(''),'/23785/80101.html','true',[],'',''],
		['PAGE','60301',jdecode('FAMIY+DAYS+07'),jdecode(''),'/23785/60301.html','true',[],'',''],
		['PAGE','58901',jdecode('FAMILY+DAYS+08'),jdecode(''),'/23785/58901.html','true',[],'',''],
		['PAGE','80301',jdecode('FAMILY+DAYS+09'),jdecode(''),'/23785/80301.html','true',[],'',''],
		['PAGE','60801',jdecode('XMAS+07'),jdecode(''),'/23785/60801.html','true',[],'',''],
		['PAGE','91712',jdecode('TRAINING+12-09'),jdecode(''),'/23785/91712.html','true',[],'',''],
		['PAGE','91612',jdecode('XMAS+2-12-09'),jdecode(''),'/23785/91612.html','true',[],'','']
	],'',''],
	['PAGE','22843',jdecode('MEMORIALS'),jdecode(''),'/22843.html','true',[],'',''],
	['PAGE','22906',jdecode('NEWS'),jdecode(''),'/22906.html','true',[],'',''],
	['PAGE','22822',jdecode('STAFF'),jdecode(''),'/22822/index.html','true',[ 
		['PAGE','23701',jdecode('ADMINISTRATION'),jdecode(''),'/22822/23701.html','true',[],'',''],
		['PAGE','23722',jdecode('TECHNICAL+STAFF'),jdecode(''),'/22822/23722.html','true',[],'',''],
		['PAGE','23743',jdecode('DOCTORS'),jdecode(''),'/22822/23743.html','true',[],'',''],
		['PAGE','23764',jdecode('RECEPTION'),jdecode(''),'/22822/23764.html','true',[],'','']
	],'',''],
	['PAGE','6901',jdecode('REFERRALS'),jdecode(''),'/6901/index.html','true',[ 
		['PAGE','55501',jdecode('Referral+card'),jdecode(''),'/6901/55501.html','true',[],'','']
	],'',''],
	['PAGE','6922',jdecode('SERVICE'),jdecode(''),'/6922.html','true',[],'','']];
var siteelementCount=36;
theSitetree.topTemplateName='Inspiration';
theSitetree.paletteFamily='A99797';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='100';
theSitetree.graphicsetId='124';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='A99797';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Inspiration',
				paletteFamily: 	'A99797',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'100',
				graphicsetId: 	'124',
				contentColor: 	'FFFFFF',
				contentBGColor: 'A99797',
				a_color: 		'A99797',
				b_color: 		'C5BAB6',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1601',
internalId:  '',
customField: '20100308-181753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20090717-001747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6922',
internalId:  '',
customField: '20090716-234343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22801',
internalId:  '',
customField: '20100128-144235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22822',
internalId:  '',
customField: '20091112-225551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23764',
internalId:  '',
customField: '20091224-102114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23722',
internalId:  '',
customField: '20091116-152328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23743',
internalId:  '',
customField: '20090716-233854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23701',
internalId:  '',
customField: '20091115-210825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25243',
internalId:  '',
customField: '20090810-172617'
};
webappMappings['7060']=webappMappings['7060-bcb3c873e3d8824cd05a0e12e38d9656']={
webappId:    '7060',
documentId:  '23785',
internalId:  'bcb3c873e3d8824cd05a0e12e38d9656',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23785',
internalId:  '',
customField: '20100119-153912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25101',
internalId:  '',
customField: '20100129-002938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25222',
internalId:  '',
customField: '20090716-232531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22885',
internalId:  '',
customField: '20090716-232747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25264',
internalId:  '',
customField: '20090717-005423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57601',
internalId:  '',
customField: '20090810-152812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56601',
internalId:  '',
customField: '20090810-153127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22843',
internalId:  '',
customField: '20090915-184434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22906',
internalId:  '',
customField: '20100302-224033'
};
webappMappings['7060']=webappMappings['7060-5287fa52b70dbd8febc3873cd87552a6']={
webappId:    '7060',
documentId:  '56601',
internalId:  '5287fa52b70dbd8febc3873cd87552a6',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49101',
internalId:  '',
customField: '20091013-000714'
};
webappMappings['1002']=webappMappings['1002-22843avfl30inhqub']={
webappId:    '1002',
documentId:  '22843',
internalId:  '22843avfl30inhqub',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29985',
internalId:  '',
customField: '20090810-150219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30006',
internalId:  '',
customField: '20090810-153436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55501',
internalId:  '',
customField: '20090716-234223'
};
webappMappings['7060']=webappMappings['7060-6bd754adbe47f49524c4d64458e4a8f0']={
webappId:    '7060',
documentId:  '49101',
internalId:  '6bd754adbe47f49524c4d64458e4a8f0',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58901',
internalId:  '',
customField: '20090712-163658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59501',
internalId:  '',
customField: '20090712-181420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59901',
internalId:  '',
customField: '20090712-175241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60301',
internalId:  '',
customField: '20090712-185103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60801',
internalId:  '',
customField: '20090713-164303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67901',
internalId:  '',
customField: '20090902-144640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72401',
internalId:  '',
customField: '20091020-162818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80101',
internalId:  '',
customField: '20091107-005006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80301',
internalId:  '',
customField: '20091106-234453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85301',
internalId:  '',
customField: '20091210-024724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91712',
internalId:  '',
customField: '20100108-154637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91612',
internalId:  '',
customField: '20100108-153225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94312',
internalId:  '',
customField: '20100129-000015'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHQUB';
var companyName   = 'Halifax+Veterinary+Center';
var htmlTitle	  = 'Halifax+Veterinary+Center+Port+Orange+Florida';
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();
};
