/* [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','5108',jdecode('home'),jdecode(''),'/5108.html','true',[],'',''],
	['PAGE','1543',jdecode('Steve+B.+Levine'),jdecode(''),'/1543.html','true',[],'',''],
	['PAGE','6745',jdecode('Farrier+Info'),jdecode(''),'/6745.html','true',[],'',''],
	['PAGE','6845',jdecode('Web+Links'),jdecode(''),'/6845.html','true',[],'',''],
	['PAGE','13145',jdecode('Vital+signs'),jdecode(''),'/13145.html','true',[],'',''],
	['PAGE','36745',jdecode('Equine+Metabolic+Syndrome'),jdecode(''),'/36745.html','true',[],'',''],
	['PAGE','7045',jdecode('Lameness+Exam%2FIssues'),jdecode(''),'/7045.html','true',[],'',''],
	['PAGE','12708',jdecode('Emergency+Info'),jdecode(''),'/12708.html','true',[],'',''],
	['PAGE','7345',jdecode('Vet+Referral+Hospitals'),jdecode(''),'/7345.html','true',[],'',''],
	['PAGE','7445',jdecode('Safety+Issues'),jdecode(''),'/7445.html','true',[],'',''],
	['PAGE','12729',jdecode('Choke+advice'),jdecode(''),'/12729.html','true',[],'',''],
	['PAGE','42145',jdecode('Pic-+IM+inj+site'),jdecode(''),'/42145.html','true',[],'',''],
	['PAGE','8645',jdecode('Medications'),jdecode(''),'/8645.html','true',[],'',''],
	['PAGE','32945',jdecode('Equine+Dentistry'),jdecode(''),'/32945.html','true',[],'',''],
	['PAGE','12645',jdecode('Bloodwork+info'),jdecode(''),'/12645.html','true',[],'',''],
	['PAGE','78445',jdecode('Hoof+views'),jdecode(''),'/78445.html','true',[],'',''],
	['PAGE','12666',jdecode('Vaccines'),jdecode(''),'/12666.html','true',[],'',''],
	['PAGE','78045',jdecode('Rescue'),jdecode(''),'/78045.html','true',[],'',''],
	['PAGE','8745',jdecode('Misc.+Products'),jdecode(''),'/8745.html','true',[],'',''],
	['PAGE','7545',jdecode('Pictures'),jdecode(''),'/7545.html','true',[],'',''],
	['PAGE','18045',jdecode('Videos'),jdecode(''),'/18045.html','true',[],'',''],
	['PAGE','12687',jdecode('Leg+Wrap+advice'),jdecode(''),'/12687.html','true',[],'',''],
	['PAGE','8845',jdecode('Purchase+exams'),jdecode(''),'/8845.html','true',[],'',''],
	['PAGE','45945',jdecode('Classifieds'),jdecode(''),'/45945.html','true',[],'',''],
	['PAGE','8866',jdecode('News+from+our+journals'),jdecode(''),'/8866.html','true',[],'',''],
	['PAGE','7145',jdecode('Quiz'),jdecode(''),'/7145.html','true',[],'',''],
	['PAGE','7245',jdecode('Quiz+answers'),jdecode(''),'/7245.html','true',[],'',''],
	['PAGE','33745',jdecode('Colic'),jdecode(''),'/33745.html','true',[],'',''],
	['PAGE','76145',jdecode('Anatomy+charts'),jdecode(''),'/76145.html','true',[],'',''],
	['PAGE','58345',jdecode('Laminitis'),jdecode(''),'/58345.html','true',[],'',''],
	['PAGE','55145',jdecode('Dermatology'),jdecode(''),'/55145.html','true',[],'',''],
	['PAGE','12750',jdecode('Deworming'),jdecode(''),'/12750.html','true',[],'',''],
	['PAGE','55245',jdecode('Neurology'),jdecode(''),'/55245.html','true',[],'',''],
	['PAGE','33766',jdecode('Reproduction'),jdecode(''),'/33766.html','true',[],'',''],
	['PAGE','6945',jdecode('Equine+evolution'),jdecode(''),'/6945.html','true',[],'',''],
	['PAGE','55266',jdecode('Living+scenery'),jdecode(''),'/55266.html','true',[],'',''],
	['PAGE','55287',jdecode('Client+pics'),jdecode(''),'/55287.html','true',[],'',''],
	['PAGE','1585',jdecode('My+Blog'),jdecode(''),'/1585.html','true',[],'','']];
var siteelementCount=38;
theSitetree.topTemplateName='Plant';
theSitetree.paletteFamily='1A4F84';
theSitetree.keyvisualId='9452';
theSitetree.keyvisualName='kv_9452.jpg';
theSitetree.fontsetId='17400';
theSitetree.graphicsetId='12818';
theSitetree.contentColor='0E345B';
theSitetree.contentBGColor='CBD9E8';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Plant',
				paletteFamily: 	'1A4F84',
				keyvisualId: 	'9452',
				keyvisualName: 	'kv_9452.jpg',
				fontsetId: 		'17400',
				graphicsetId: 	'12818',
				contentColor: 	'0E345B',
				contentBGColor: 'CBD9E8',
				a_color: 		'608DBA',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55266',
internalId:  '',
customField: '20110122-153533'
};
webappMappings['7050']=webappMappings['7050-3172']={
webappId:    '7050',
documentId:  '1585',
internalId:  '3172',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55145',
internalId:  '',
customField: '20110111-105334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33766',
internalId:  '',
customField: '20110123-084451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36745',
internalId:  '',
customField: '20101206-114052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1543',
internalId:  '',
customField: '20110210-182351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1585',
internalId:  '',
customField: '20101022-163642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55287',
internalId:  '',
customField: '20110104-200950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33745',
internalId:  '',
customField: '20110104-162736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5108',
internalId:  '',
customField: '20110808-092104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12687',
internalId:  '',
customField: '20101126-103459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12666',
internalId:  '',
customField: '20101203-111200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12645',
internalId:  '',
customField: '20101128-103737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58345',
internalId:  '',
customField: '20110114-161257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6745',
internalId:  '',
customField: '20110402-182048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6845',
internalId:  '',
customField: '20101208-193516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6945',
internalId:  '',
customField: '20101130-184649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7045',
internalId:  '',
customField: '20110127-075438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7145',
internalId:  '',
customField: '20110115-211607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7245',
internalId:  '',
customField: '20110115-211723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7345',
internalId:  '',
customField: '20110107-183322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7445',
internalId:  '',
customField: '20110104-143938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7545',
internalId:  '',
customField: '20110101-084855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8645',
internalId:  '',
customField: '20110403-134141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8745',
internalId:  '',
customField: '20110101-084822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8845',
internalId:  '',
customField: '20110307-111538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8866',
internalId:  '',
customField: '20110403-133754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12708',
internalId:  '',
customField: '20110104-210924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12729',
internalId:  '',
customField: '20110104-194432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12750',
internalId:  '',
customField: '20110110-183357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32945',
internalId:  '',
customField: '20110109-203846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55245',
internalId:  '',
customField: '20110312-113142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42145',
internalId:  '',
customField: '20110101-084051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45945',
internalId:  '',
customField: '20110508-163941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13145',
internalId:  '',
customField: '20110104-204048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18045',
internalId:  '',
customField: '20110101-084956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76145',
internalId:  '',
customField: '20110123-081603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78045',
internalId:  '',
customField: '20110123-070234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78445',
internalId:  '',
customField: '20110123-081319'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INZFFX';
var companyName   = 'Northern+Equine+Is+Online%21';
var htmlTitle	  = 'Northern+Equine+Is+Online%21';
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();
};

