/* [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','7601',jdecode('Home'),jdecode(''),'/7601.html','true',[],'',''],
	['PAGE','13601',jdecode('Journal-+updated+5%2F25%2F11'),jdecode(''),'/13601.html','true',[],'',''],
	['PAGE','7673',jdecode('Bio'),jdecode(''),'/7673.html','true',[],'',''],
	['PAGE','7694',jdecode('Links'),jdecode(''),'/7694.html','true',[],'',''],
	['PAGE','7715',jdecode('More+info'),jdecode(''),'/7715.html','true',[],'',''],
	['PAGE','7736',jdecode('Contact'),jdecode(''),'/7736.html','true',[],'',''],
	['PAGE','7757',jdecode('Book+Excerpts-+Updated+5%2F25%2F11'),jdecode(''),'/7757.html','true',[],'',''],
	['PAGE','7778',jdecode('Inflammatory+Breast+Cancer+Info'),jdecode(''),'/7778.html','true',[],'',''],
	['PAGE','7652',jdecode('Archives-+%26%23x27%3B08'),jdecode(''),'/7652.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Multimedia';
theSitetree.paletteFamily='AD3703';
theSitetree.keyvisualId='11371';
theSitetree.keyvisualName='kv_11371.jpg';
theSitetree.fontsetId='32005';
theSitetree.graphicsetId='13834';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='AD3703';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Multimedia',
				paletteFamily: 	'AD3703',
				keyvisualId: 	'11371',
				keyvisualName: 	'kv_11371.jpg',
				fontsetId: 		'32005',
				graphicsetId: 	'13834',
				contentColor: 	'FFFFFF',
				contentBGColor: 'AD3703',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20110525-180050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7652',
internalId:  '',
customField: '20090518-210112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7778',
internalId:  '',
customField: '20090518-210034'
};
webappMappings['1501']=webappMappings['1501-8860253']={
webappId:    '1501',
documentId:  '7601',
internalId:  '8860253',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '7601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7673',
internalId:  '',
customField: '20090518-204948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7694',
internalId:  '',
customField: '20090614-042353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7715',
internalId:  '',
customField: '20090614-043001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7736',
internalId:  '',
customField: '20090518-210003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7757',
internalId:  '',
customField: '20090518-204408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20110525-180739'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN2UE9';
var companyName   = 'Linda+Dark+Horse...+my+friends+call+me+Red';
var htmlTitle	  = 'Linda+Dark+Horse';
var metaKeywords  = 'Lakota%2C+Sioux%2C+bisexual%2C+personal+evolution%2C+sexual+advice%2C+sexuality%2C+police%2C+narcotics%2C+drug+war%2C+president%2C+third+party%2C+author%2C+line+of+duty%2C+Sturgis%2C+South+Dakota%2C+Pine+Ridge%2C+redhead%2C+left+handed%2C+shooting%2C+gun%2C+lindadarkhorse%2C+Leon+Dark+Horse%2C+Lawrence+Dark+Horse%2C+Marilyn+Dark+Horse%2C+Marilyn+Elkheart%2C+Audrey+Cassopolis%2C+Richard+Emerson%2C+Eddy+Reed%2C+Edward+Reed%2C+undercover%2C+4%2F10%2F88%2C+ovarian+cancer%2C+AIDS%2C+overcoming+grief';
var metaContents  = 'The+Evolution+of+Linda+by+Linda+Dark+Horse+and+Neil+Collins+is+a+sensitive+and+engaging+journey+into+the+life+of+a+young+Lakota+woman+as+she+explores+and+discovers+herself.+%0D%0A+%0D%0AFrom+her+longing+to+belong+as+a+teenager%2C+through+her+conflicts+about+her+budding+sexuality%2C+through+heartbreaking+losses+and+overwhelming+joy%2C+we+join+Linda+in+her+internal+dynamic+and+the+interaction+with+the+significant+others+along+to+way.+The+authors+have+brilliantly+interwoven+her+repressed+memories+into+her+struggle+to+deal+with+the+tragedies+that+life+presents+in+the+present.+She+calls+upon+her+deep+and+abiding+historical+culture+to+guide+her+through+the+labyrinth+of+her+current+conflict+between+her+spiritual+faith+and+her+intense+impulse+to+act+out+her+frustrations.+%0D%0A+%0D%0AHer+memories%2C+her+history%2C+her+relentless+love+of+her+early+roots+are+interwoven+into+the+adventure+that+becomes+her+story.+More+than+this%2C+the+universality+of+her+thoughts%2C+feelings%2C+interactions+with+loved+ones+speaks+to+us+all.+A+good+read.%0D%0A%0D%0ADr.+Miriam+Berkman%2C+PsyD';
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();
};

