/* [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','196',jdecode('Home'),jdecode(''),'/196.html','true',[],'',''],
	['PAGE','45501',jdecode('HOSPITAL+CLOSING+'),jdecode(''),'/45501.html','true',[],'',''],
	['PAGE','44201',jdecode('Holiday+Schedule'),jdecode(''),'/44201.html','true',[],'',''],
	['PAGE','1227',jdecode('About+us'),jdecode(''),'/1227/index.html','true',[ 
		['PAGE','1236',jdecode('Our+team'),jdecode(''),'/1227/1236.html','true',[],'','']
	],'',''],
	['PAGE','1882',jdecode('How+to+find+us'),jdecode(''),'/1882.html','true',[],'',''],
	['PAGE','3227',jdecode('Map+and+Directions'),jdecode(''),'/3227.html','true',[],'',''],
	['PAGE','1254',jdecode('Service'),jdecode(''),'/1254.html','true',[],'',''],
	['PAGE','37701',jdecode('New+Therapy+Offer'),jdecode(''),'/37701.html','true',[],'',''],
	['PAGE','13301',jdecode('Contacting+Us'),jdecode(''),'/13301.html','true',[],'',''],
	['PAGE','4732',jdecode('Web+Stores'),jdecode(''),'/4732.html','true',[],'',''],
	['PAGE','36101',jdecode('Pet+Portal'),jdecode(''),'/36101.html','true',[],'',''],
	['PAGE','56801',jdecode('Pet+Insurance'),jdecode(''),'/56801.html','true',[],'',''],
	['PAGE','1263',jdecode('Links'),jdecode(''),'/1263.html','true',[],'',''],
	['PAGE','57401',jdecode('News+from+the+Wild+Side'),jdecode(''),'/57401.html','true',[],'',''],
	['PAGE','4274',jdecode('Articles+of+Interest+'),jdecode(''),'/4274.html','true',[],'',''],
	['PAGE','4482',jdecode('Monthly+Updates'),jdecode(''),'/4482.html','true',[],'',''],
	['PAGE','5125',jdecode('New+Pet+Articles'),jdecode(''),'/5125.html','true',[],'',''],
	['PAGE','6046',jdecode('Diabetic+Corner'),jdecode(''),'/6046.html','true',[],'',''],
	['PAGE','1540',jdecode('Dog'),jdecode(''),'/1540.html','true',[],'',''],
	['PAGE','1549',jdecode('Cat'),jdecode(''),'/1549.html','true',[],'',''],
	['PAGE','1299',jdecode('Tips+%26+Tricks'),jdecode(''),'/1299.html','true',[],'',''],
	['PAGE','1281',jdecode('Dates+for+your+calendar'),jdecode(''),'/1281.html','true',[],'',''],
	['PAGE','1272',jdecode('Special+events'),jdecode(''),'/1272.html','true',[],'',''],
	['PAGE','2925',jdecode('Emergency+Clinic%26%23x27%3Bs'),jdecode(''),'/2925.html','true',[],'',''],
	['PAGE','2980',jdecode('Referral+Hospitals'),jdecode(''),'/2980.html','true',[],'',''],
	['PAGE','5466',jdecode('Preferred+Boarding+Facilities'),jdecode(''),'/5466.html','true',[],'',''],
	['PAGE','1825',jdecode('Hamilton+Vet+Hosp+Photo%26%23x27%3Bs'),jdecode(''),'/1825.html','true',[],'',''],
	['PAGE','30201',jdecode('Memorial+to+Family+Pets'),jdecode(''),'/30201/index.html','true',[ 
		['PAGE','1863',jdecode('Read+Guestbook'),jdecode(''),'/30201/1863.html','false',[],'','']
	],'',''],
	['PAGE','1864',jdecode('Guestbook'),jdecode(''),'/1864.html','true',[],'','']];
var siteelementCount=31;
theSitetree.topTemplateName='Aeskulap';
theSitetree.paletteFamily='C00405';
theSitetree.keyvisualId='2494';
theSitetree.keyvisualName='arzt.jpg';
theSitetree.fontsetId='436';
theSitetree.graphicsetId='487';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Aeskulap',
				paletteFamily: 	'C00405',
				keyvisualId: 	'2494',
				keyvisualName: 	'arzt.jpg',
				fontsetId: 		'436',
				graphicsetId: 	'487',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-1361726']={
webappId:    '1501',
documentId:  '196',
internalId:  '1361726',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '196',
internalId:  '',
customField: '20100428-212307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1227',
internalId:  '',
customField: '20071128-183345'
};
webappMappings['1002']=webappMappings['1002-1864AHW050IN31RG']={
webappId:    '1002',
documentId:  '1864',
internalId:  '1864AHW050IN31RG',
customField: 'icq=false'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '1882',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '3227',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '196',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-fe340899df2276b3e6dd6f3b47a096b6']={
webappId:    '7060',
documentId:  '1825',
internalId:  'fe340899df2276b3e6dd6f3b47a096b6',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1236',
internalId:  '',
customField: '20100825-080031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1882',
internalId:  '',
customField: '20091113-073537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3227',
internalId:  '',
customField: '20071102-120938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1254',
internalId:  '',
customField: '20091113-072357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13301',
internalId:  '',
customField: '20080910-070609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4732',
internalId:  '',
customField: '20091113-073458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1263',
internalId:  '',
customField: '20081217-215558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4274',
internalId:  '',
customField: '20100705-132617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4482',
internalId:  '',
customField: '20100825-080515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5125',
internalId:  '',
customField: '20100825-115421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6046',
internalId:  '',
customField: '20100826-153206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1540',
internalId:  '',
customField: '20091009-080850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1549',
internalId:  '',
customField: '20090807-080156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1299',
internalId:  '',
customField: '20100825-080712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1281',
internalId:  '',
customField: '20100825-082108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1272',
internalId:  '',
customField: '20100825-082249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2925',
internalId:  '',
customField: '20100825-082515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2980',
internalId:  '',
customField: '20090401-152556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5466',
internalId:  '',
customField: '20080227-183848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1825',
internalId:  '',
customField: '20071106-170753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1864',
internalId:  '',
customField: '20071018-220819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1863',
internalId:  '',
customField: '20071018-220819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30201',
internalId:  '',
customField: '20100520-083139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36101',
internalId:  '',
customField: '20091023-082039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37701',
internalId:  '',
customField: '20100826-160311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44201',
internalId:  '',
customField: '20100824-141734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45501',
internalId:  '',
customField: '20100831-122456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56801',
internalId:  '',
customField: '20100623-155008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57401',
internalId:  '',
customField: '20100705-132835'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050IN31RG';
var companyName   = 'Hamilton+Veterinary+Hospital';
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();
};
