/* [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','301',jdecode('Introduction'),jdecode(''),'/301.html','true',[],''],
	['PAGE','457',jdecode('News+and+New+Projects'),jdecode(''),'/457.html','true',[],''],
	['PAGE','51401',jdecode('+Max+Stirner+Book'),jdecode(''),'/51401/index.html','true',[ 
		['PAGE','51422',jdecode('Book+Summary'),jdecode(''),'/51401/51422.html','true',[],''],
		['PAGE','51443',jdecode('Detailed+Outline'),jdecode(''),'/51401/51443.html','true',[],''],
		['PAGE','51464',jdecode('Ordering+Information'),jdecode(''),'/51401/51464.html','true',[],''],
		['PAGE','52501',jdecode('Commentary'),jdecode(''),'/51401/52501.html','true',[],'']
	],''],
	['PAGE','51485',jdecode('After+Multiculturalism'),jdecode(''),'/51485/index.html','true',[ 
		['PAGE','58601',jdecode('Book+Summary'),jdecode(''),'/51485/58601.html','true',[],''],
		['PAGE','51527',jdecode('Detailed+Outline'),jdecode(''),'/51485/51527.html','true',[],''],
		['PAGE','51548',jdecode('Ordering+Information'),jdecode(''),'/51485/51548.html','true',[],''],
		['PAGE','52522',jdecode('Commentary'),jdecode(''),'/51485/52522.html','true',[],'']
	],''],
	['PAGE','352',jdecode('The+Dialectics+of+Liberty'),jdecode(''),'/352.html','true',[],''],
	['PAGE','394',jdecode('Books+and+Chapters'),jdecode(''),'/394.html','true',[],''],
	['PAGE','415',jdecode('Journal+Articles'),jdecode(''),'/415.html','true',[],''],
	['PAGE','436',jdecode('Research+Monographs'),jdecode(''),'/436.html','true',[],''],
	['PAGE','33501',jdecode('Journal+and+Comment'),jdecode(''),'/33501.html','false',[],''],
	['PAGE','478',jdecode('Contacts+and+Links'),jdecode(''),'/478.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Stars';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10510';
theSitetree.graphicsetId='10916';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Stars',
				paletteFamily: 	'000000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10510',
				graphicsetId: 	'10916',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100726-135258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '457',
internalId:  '',
customField: '20100726-135420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33501',
internalId:  '',
customField: '20100723-101515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352',
internalId:  '',
customField: '20100726-111053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '394',
internalId:  '',
customField: '20100726-135735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '415',
internalId:  '',
customField: '20100726-135912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '436',
internalId:  '',
customField: '20090320-081226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51527',
internalId:  '',
customField: '20100726-151851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '478',
internalId:  '',
customField: '20100726-134514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51548',
internalId:  '',
customField: '20100726-143051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51485',
internalId:  '',
customField: '20100726-151812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51401',
internalId:  '',
customField: '20100723-110749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51422',
internalId:  '',
customField: '20100726-142606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51443',
internalId:  '',
customField: '20100726-142700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51464',
internalId:  '',
customField: '20100726-152017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52501',
internalId:  '',
customField: '20100726-151612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52522',
internalId:  '',
customField: '20100721-140854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58601',
internalId:  '',
customField: '20100726-151836'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN215V';
var companyName   = 'John+F.+Welsh+++Writer+and+Critic';
var htmlTitle	  = 'John+F.+Welsh';
var metaKeywords  = 'dialectics%2C+egoism%2C+libertarianism%2C+Stirner%2C+Rand%2C+Nietzsche%2C+Dora+Marsden%2C+';
var metaContents  = 'A+guide+to+the+writings+of+John+F.+Welsh+on+dialectics%2C+egoism%2C+individualism%2C+and+libertarianism.+';
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();
};
