/* [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','401',jdecode('ChiroClasses+-+Home'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','20601',jdecode('Iowa+License+Renewal'),jdecode(''), jdecode('%2F20601%2Findex.html'), 'true',[ 
		['PAGE','38501',jdecode('IA+Lic+Renew+Faculty'),jdecode(''), jdecode('%2F20601%2F38501.html'), 'true',[],'','']
	],'',''],
	['PAGE','59001',jdecode('Neurology+Diplomate'),jdecode(''), jdecode('%2F59001.html'), 'true',[],'',''],
	['PAGE','56301',jdecode('Neurology+Certificates'),jdecode(''), jdecode('%2F56301.html'), 'true',[],'',''],
	['PAGE','20901',jdecode('Neurology+Locations'),jdecode(''), jdecode('%2F20901%2Findex.html'), 'true',[ 
		['PAGE','69689',jdecode('NEUROLOGY+ONLINE'),jdecode(''), jdecode('%2F20901%2F69689.html'), 'true',[],'',''],
		['PAGE','28901',jdecode('Davenport%2C+Iowa'),jdecode(''), jdecode('%2F20901%2F28901.html'), 'true',[],'',''],
		['PAGE','27122',jdecode('Neuro+Faculty'),jdecode(''), jdecode('%2F20901%2F27122.html'), 'true',[],'','']
	],'',''],
	['PAGE','68143',jdecode('Chiro+Assistant+Classes'),jdecode(''), jdecode('%2F68143.html'), 'true',[],'',''],
	['PAGE','62201',jdecode('Register+For+Classes'),jdecode(''), jdecode('%2F62201.html'), 'true',[],'',''],
	['PAGE','34801',jdecode('Independent+Study'),jdecode(''), jdecode('%2F34801.html'), 'true',[],'',''],
	['PAGE','33901',jdecode('Contact+Us'),jdecode(''), jdecode('%2F33901.html'), 'true',[],'',''],
	['PAGE','34606',jdecode('Guestbook'),jdecode(''), jdecode('%2F34606%2Findex.html'), 'true',[ 
		['PAGE','34601',jdecode('Read+Guestbook'),jdecode(''), jdecode('%2F34606%2F34601.html'), 'true',[],'','']
	],'',''],
	['PAGE','70031',jdecode('IACN+Membership'),jdecode(''), jdecode('%2F70031.html'), 'false',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Aeskulap';
theSitetree.paletteFamily='C00405';
theSitetree.keyvisualId='2497';
theSitetree.keyvisualName='naturheiler.jpg';
theSitetree.fontsetId='434';
theSitetree.graphicsetId='487';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7V'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Aeskulap',
				paletteFamily: 	'C00405',
				keyvisualId: 	'2497',
				keyvisualName: 	'naturheiler.jpg',
				fontsetId: 		'434',
				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:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-34606AHW050INETEM']={
webappId:    '1002',
documentId:  '34606',
internalId:  '34606AHW050INETEM',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20110417-122018'
};
webappMappings['1501']=webappMappings['1501-1157413']={
webappId:    '1501',
documentId:  '401',
internalId:  '1157413',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70031',
internalId:  '',
customField: '20120119-143516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20601',
internalId:  '',
customField: '20120119-144150'
};
webappMappings['7008']=webappMappings['7008-9118']={
webappId:    '7008',
documentId:  '34801',
internalId:  '9118',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-9119']={
webappId:    '7008',
documentId:  '33901',
internalId:  '9119',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38501',
internalId:  '',
customField: '20110417-121330'
};
webappMappings['7005']=webappMappings['7005-801']={
webappId:    '7005',
documentId:  '70031',
internalId:  '801',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59001',
internalId:  '',
customField: '20120119-144459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56301',
internalId:  '',
customField: '20110122-131716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20901',
internalId:  '',
customField: '20120119-144540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28901',
internalId:  '',
customField: '20110122-162759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27122',
internalId:  '',
customField: '20110122-134153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62201',
internalId:  '',
customField: '20120119-144720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34801',
internalId:  '',
customField: '20090625-130028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69689',
internalId:  '',
customField: '20110122-162921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33901',
internalId:  '',
customField: '20110122-134358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34606',
internalId:  '',
customField: '20070901-102400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34601',
internalId:  '',
customField: '20070901-102400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68143',
internalId:  '',
customField: '20090804-154819'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INETEM';
var companyName   = 'Chiropractic+Continuing+Education';
var htmlTitle	  = 'CHIROCLASSES.COM+-+Chiropractic+Continuing+Education';
var metaKeywords  = 'Chiropractic%2C+Neurology%2C+Continuing+Education%2C+Classes';
var metaContents  = 'Classes+for+continuing+education+for+chiropractors+in+the+area+of+neurology';
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();
};

