/* [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','5001',jdecode('Home'),jdecode(''),'/5001.html','true',[],'',''],
	['PAGE','18201',jdecode('Company+History'),jdecode(''),'/18201.html','true',[],'',''],
	['PAGE','7101',jdecode('Services'),jdecode(''),'/7101/index.html','true',[ 
		['PAGE','7601',jdecode('Prosthetics'),jdecode(''),'/7101/7601.html','true',[],'',''],
		['PAGE','7622',jdecode('Orthotics'),jdecode(''),'/7101/7622.html','true',[],'',''],
		['PAGE','7643',jdecode('Pedorthotics'),jdecode(''),'/7101/7643.html','true',[],'',''],
		['PAGE','7685',jdecode('SCOKJ'),jdecode(''),'/7101/7685.html','true',[],'',''],
		['PAGE','23101',jdecode('Fabrication'),jdecode(''),'/7101/23101.html','true',[],'','']
	],'',''],
	['PAGE','7122',jdecode('Locations'),jdecode(''),'/7122.html','true',[],'',''],
	['PAGE','14301',jdecode('Make+an+Appointment'),jdecode(''),'/14301.html','true',[],'',''],
	['PAGE','6943',jdecode('Staff'),jdecode(''),'/6943/index.html','true',[ 
		['PAGE','12501',jdecode('Staff+Qualifications'),jdecode(''),'/6943/12501.html','true',[],'','']
	],'',''],
	['PAGE','7143',jdecode('News+and+Events'),jdecode(''),'/7143/index.html','true',[ 
		['PAGE','22301',jdecode('Fishin%26%23x27%3B+at+The+Harbor'),jdecode(''),'/7143/22301.html','true',[],'','']
	],'',''],
	['PAGE','12101',jdecode('New+Technology'),jdecode(''),'/12101.html','true',[],'',''],
	['PAGE','15501',jdecode('Forum%26%23x27%3Bs'),jdecode(''),'/15501/index.html','true',[ 
		['PAGE','15643',jdecode('Amputee+Forum'),jdecode(''),'/15501/15643.html','true',[],'',''],
		['PAGE','15622',jdecode('Clubfoot+Forum'),jdecode(''),'/15501/15622.html','true',[],'',''],
		['PAGE','15685',jdecode('Diabetic+Foot+Forum'),jdecode(''),'/15501/15685.html','true',[],'',''],
		['PAGE','19901',jdecode('MS+Forum'),jdecode(''),'/15501/19901.html','true',[],'',''],
		['PAGE','15601',jdecode('Scolosis+Forum'),jdecode(''),'/15501/15601.html','true',[],'',''],
		['PAGE','15664',jdecode('Stance+Control+Forum'),jdecode(''),'/15501/15664.html','true',[],'','']
	],'',''],
	['PAGE','12122',jdecode('Jobs'),jdecode(''),'/12122.html','true',[],'',''],
	['PAGE','12522',jdecode('Links'),jdecode(''),'/12522.html','true',[],'',''],
	['PAGE','6964',jdecode('Contact'),jdecode(''),'/6964.html','true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Logg';
theSitetree.paletteFamily='3D4B78';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='421';
theSitetree.graphicsetId='467';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='3D4B78';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Logg',
				paletteFamily: 	'3D4B78',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'421',
				graphicsetId: 	'467',
				contentColor: 	'DDDDDD',
				contentBGColor: '3D4B78',
				a_color: 		'3D4B78',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20100218-225205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20100104-123600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6964',
internalId:  '',
customField: '20100212-160620'
};
webappMappings['1003']=webappMappings['1003-avf340i7cw3j1260570c49b']={
webappId:    '1003',
documentId:  '15622',
internalId:  'avf340i7cw3j1260570c49b',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12122',
internalId:  '',
customField: '20100106-143745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7122',
internalId:  '',
customField: '20100218-173218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7143',
internalId:  '',
customField: '20100212-211253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6943',
internalId:  '',
customField: '20100218-171600'
};
webappMappings['1003']=webappMappings['1003-avf340i7cw3j1260570c39a']={
webappId:    '1003',
documentId:  '15601',
internalId:  'avf340i7cw3j1260570c39a',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12522',
internalId:  '',
customField: '20100212-155313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12101',
internalId:  '',
customField: '20100212-155223'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5001',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-14860517']={
webappId:    '1501',
documentId:  '5001',
internalId:  '14860517',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20100212-225747'
};
webappMappings['7008']=webappMappings['7008-14051']={
webappId:    '7008',
documentId:  '14301',
internalId:  '14051',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-14052']={
webappId:    '7008',
documentId:  '14301',
internalId:  '14052',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20100104-165150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7622',
internalId:  '',
customField: '20100104-165318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7643',
internalId:  '',
customField: '20100104-154114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7685',
internalId:  '',
customField: '20100105-120550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20100111-113839'
};
webappMappings['1003']=webappMappings['1003-avf340i7cw3j1260570c50f']={
webappId:    '1003',
documentId:  '15643',
internalId:  'avf340i7cw3j1260570c50f',
customField: 'en:US'
};
webappMappings['1003']=webappMappings['1003-avf340i7cw3j1260570c71a']={
webappId:    '1003',
documentId:  '15664',
internalId:  'avf340i7cw3j1260570c71a',
customField: 'en:US'
};
webappMappings['1003']=webappMappings['1003-avf340i7cw3j1260570c92b']={
webappId:    '1003',
documentId:  '15685',
internalId:  'avf340i7cw3j1260570c92b',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20100106-160609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15622',
internalId:  '',
customField: '20100106-160659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15643',
internalId:  '',
customField: '20100106-160745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15664',
internalId:  '',
customField: '20100106-160827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15685',
internalId:  '',
customField: '20100106-160907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20100407-152732'
};
webappMappings['1003']=webappMappings['1003-avf340i7cw3j1261e3f0d43']={
webappId:    '1003',
documentId:  '19901',
internalId:  'avf340i7cw3j1261e3f0d43',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19901',
internalId:  '',
customField: '20100111-115444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12501',
internalId:  '',
customField: '20100212-145754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22301',
internalId:  '',
customField: '20100427-172042'
};
webappMappings['7008']=webappMappings['7008-14920']={
webappId:    '7008',
documentId:  '22301',
internalId:  '14920',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23101',
internalId:  '',
customField: '20100212-155558'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7CW3J';
var companyName   = 'Horton%27s+Orthotic+%26+Prosthetic+Lab';
var htmlTitle	  = 'Horton%27s+Orthotic+and+Prosthetic+Lab';
var metaKeywords  = 'orthotics%2C+prosthetics%2C+pedorthotics%2C+scolosis%2C+amputee%2C+stance+control%2C+club+foot%2C+diabetic%2C+ulcer%2C+TLSO%2C+AFO%2C+KAFO%2C+shoes%2C+back+brace%2C+knee+brace%2C+leg+brace%2C+polio%2C+MS%2C+spinal+cord+injury%2C72204';
var metaContents  = 'Full+service+orthotic+and+prosthetic+lab+with+locations+in+Little+Rock%2C+Ft.+Smith%2C+and+Searcy.+';
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();
};
