/* [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','9401',jdecode('I+Thought+I+Grew+Up'),jdecode(''),'/9401.html','true',[],''],
	['PAGE','12401',jdecode('Buy+the+Book'),jdecode(''),'/12401.html','true',[],''],
	['PAGE','9452',jdecode('About+the+Author'),jdecode(''),'/9452.html','true',[],''],
	['PAGE','9473',jdecode('Guestbook'),jdecode(''),'/9473.html','true',[],''],
	['PAGE','9494',jdecode('Contact+Michelle'),jdecode(''),'/9494.html','true',[],''],
	['PAGE','11001',jdecode('Events'),jdecode(''),'/11001.html','true',[],''],
	['PAGE','16701',jdecode('Book+Excerpts'),jdecode(''),'/16701.html','true',[],''],
	['PAGE','9515',jdecode('Michelle%26%23x27%3Bs+Blog'),jdecode(''),'/9515.html','false',[],''],
	['PAGE','18001',jdecode('Photos'),jdecode(''),'/18001.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Bubbles';
theSitetree.paletteFamily='FF7C00';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='13';
theSitetree.graphicsetId='10';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Bubbles',
				paletteFamily: 	'FF7C00',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'13',
				graphicsetId: 	'10',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FF7C00',
				b_color: 		'FF8900',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-9473avfl30inhae9']={
webappId:    '1002',
documentId:  '9473',
internalId:  '9473avfl30inhae9',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-6804']={
webappId:    '7008',
documentId:  '9494',
internalId:  '6804',
customField: 'language:en;country:US;'
};
webappMappings['7050']=webappMappings['7050-1688']={
webappId:    '7050',
documentId:  '9515',
internalId:  '1688',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9401',
internalId:  '',
customField: '20090729-181110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9473',
internalId:  '',
customField: '20090429-132218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9494',
internalId:  '',
customField: '20090522-212617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9515',
internalId:  '',
customField: '20090503-134808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9452',
internalId:  '',
customField: '20090930-213129'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '12401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11001',
internalId:  '',
customField: '20090716-151120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12401',
internalId:  '',
customField: '20090930-213409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16701',
internalId:  '',
customField: '20090517-160409'
};
webappMappings['7060']=webappMappings['7060-d88914152168c5daa5c7653928d7b48a']={
webappId:    '7060',
documentId:  '18001',
internalId:  'd88914152168c5daa5c7653928d7b48a',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20090523-114951'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHAE9';
var companyName   = 'Michelle+Churchill';
var htmlTitle	  = 'Michelle+Churchill+-+I+Thought+I+Grew+Up';
var metaKeywords  = 'Menopause%2C+Internet+Dating%2C+Women%2C+Menopause%2C+Menopausal%2C+Relationships%2C+Sex%2C+Mid-Life%2C+Hot+Flashes%2C+Single%2C+Coming+of+Age%2C+I+Thought+I+Grew+Up%2C+Broken+Heart%2C+Crying%2C+Hormones%2C+Information+on+Menopause%2C+Mrs.+Robinson+Fantasy';
var metaContents  = 'I+Thought+I+Grew+Up+is+a+story+of+coming+of+age+again.+As+Michelle+Churchill+approached+her+fiftieth+birthday%2C+she+found+herself+careening+into+menopause.+Penned+with+a+sense+of+humor%2C+I+Thought+I+Grew+Up+will+keep+you+laughing+through+the+tears.+While+discovering+that+sex+was+the+best+cure+for+hot+flashes%2C+Michelle+also+uncovers+secrets+she+had+hidden+from+herself.++Her+dating+life+has+taught+her+to+live+life+with+integrity+and+to+better+understand+what+love+really+is.';
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();
};
