/* [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 theSitetree=[ 
	['PAGE','96',jdecode('Home'),jdecode(''),'/96.html','true',[],''],
	['PAGE','117',jdecode('Dr.+Helton-Rhodes'),jdecode(''),'/117.html','true',[],''],
	['PAGE','126',jdecode('The+Staff'),jdecode(''),'/126.html','true',[],''],
	['PAGE','135',jdecode('What+is+a+Dermatologist%3F'),jdecode(''),'/135.html','true',[],''],
	['PAGE','9801',jdecode('Video+Otoscopy'),jdecode(''),'/9801.html','true',[],''],
	['PAGE','11601',jdecode('Laser+Surgery'),jdecode(''),'/11601.html','true',[],''],
	['PAGE','26101',jdecode('BAER+Testing'),jdecode(''),'/26101.html','true',[],''],
	['PAGE','144',jdecode('Communication'),jdecode(''),'/144.html','true',[],''],
	['PAGE','1318',jdecode('Preparation+for+Appointment'),jdecode(''),'/1318.html','true',[],''],
	['PAGE','2366',jdecode('Downloadable+Forms'),jdecode(''),'/2366.html','true',[],''],
	['PAGE','2949',jdecode('Medication+Orders'),jdecode(''),'/2949/index.html','true',[ 
		['PAGE','3478',jdecode('Medication+Orders+%28follow+up+page%29'),jdecode(''),'/2949/3478.html','false',[],'']
	],''],
	['PAGE','2342',jdecode('Directions'),jdecode(''),'/2342.html','true',[],''],
	['PAGE','189',jdecode('Interesting+links'),jdecode(''),'/189.html','true',[],''],
	['PAGE','2882',jdecode('Contact%2FAppt+Hours'),jdecode(''),'/2882.html','true',[],'']];
var siteelementCount=15;
theSitetree.topTemplateName='Delta';
theSitetree.paletteFamily='024405';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10615';
theSitetree.graphicsetId='10803';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='024405';
var theTemplate={
				name: 			'Delta',
				paletteFamily: 	'024405',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10615',
				graphicsetId: 	'10803',
				contentColor: 	'FFFFFF',
				contentBGColor: '024405',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'327435',
				b_color: 		'226425',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '2342',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1001']=webappMappings['1001-ahw050inxxkgf443f30880ab75eb']={
webappId:    '1001',
documentId:  '2949',
internalId:  'ahw050inxxkgf443f30880ab75eb',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inxxkgf443f30880ab75eb']={
webappId:    '1001',
documentId:  '3478',
internalId:  'ahw050inxxkgf443f30880ab75eb',
customField: 'followUp'
};
webappMappings['1501']=webappMappings['1501-45030']={
webappId:    '1501',
documentId:  '96',
internalId:  '45030',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '96',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96',
internalId:  '',
customField: '20091022-065604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117',
internalId:  '',
customField: '20070426-210820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126',
internalId:  '',
customField: '20090915-133951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135',
internalId:  '',
customField: '20070214-020051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9801',
internalId:  '',
customField: '20080813-131039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11601',
internalId:  '',
customField: '20080814-081823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '144',
internalId:  '',
customField: '20100223-074009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1318',
internalId:  '',
customField: '20100202-125140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2366',
internalId:  '',
customField: '20100218-135627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2949',
internalId:  '',
customField: '20091022-063505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3478',
internalId:  '',
customField: '20080528-164955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2342',
internalId:  '',
customField: '20100216-075550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '189',
internalId:  '',
customField: '20081117-112955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2882',
internalId:  '',
customField: '20100223-073345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26101',
internalId:  '',
customField: '20090603-093850'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INXXKG';
var companyName   = 'Riverdale+Veterinary+Dermatology+LLC';
var htmlTitle	  = 'Riverdale+Veterinary+Dermatology%2C+LLC';
var metaKeywords  = 'dermatology%2C+veterinary%2C+veterinarian%2C+riverdale%2C+new+jersey%2C+rhodes%2C+helton%2C+video+otoscopy%2C+allergy%2C+immunology%2C+ear+diseases%2C+ear%2C+keratinization+disorders%2C+hereditary+disorders.+ear+surgery%2C+ear+canal%2C+allergies%2C+autoimmune+disorders%2C+metabolic%2C+endocrine+diseases%2C+parasitic%2C+parasites%2C+fungal%2C+drug+eruptions%2C+neoplasia%2C+specialist%2C+ear+mass%2C+infectious+diseases%2C+mange%2C+demadex%2C+mange%2C+skin%2C+animals%2C+dogs%2C+cats%2C+paws%2C+feet%2C+nails%2C+biopsy%2C+intradermal+skin+testing%2C+board+certified%2C+acvd%2C+allergy+test%2C+testing%2C+myringotomy%2C+laser+surgery%2C+hearing+test%2C+nj%2C+allergy+test%2C+baer%2C+baer+testing%2C+hearing%2C+brainstem+auditory+evoked+response%2C';
var metaContents  = 'Riverdale+Veterinary+Dermatology%2C+LLC+is+a+dermatology+clinic+that+strives+to+provide+a+professional+atmosphere+of+medical+expertise+and+compassionate+patient+care.++The+triad+of+the+client%2C+patient%2C+and+your+regular+veterinarian+is+the+primary+focus+of+this+practice.++Efficient+and+unequaled+quality%2C+not+quantity%2C+is+our+continuing+goal.';
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();
};
