/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','21010',jdecode('Favorite+Links'),jdecode(''),'/21010.html','true',[],''],
	['PAGE','5401',jdecode('Childbirth+Classes'),jdecode(''),'/5401.html','true',[],''],
	['PAGE','12801',jdecode('Classes'),jdecode(''),'/12801.html','true',[],''],
	['PAGE','5422',jdecode('Doula+Services'),jdecode(''),'/5422.html','true',[],''],
	['PAGE','10301',jdecode('Births'),jdecode(''),'/10301.html','true',[],''],
	['PAGE','13901',jdecode('Swaddling'),jdecode(''),'/13901.html','true',[],''],
	['PAGE','7922',jdecode('+Birth+Balls'),jdecode(''),'/7922.html','true',[],''],
	['PAGE','7901',jdecode('Belly+Casting'),jdecode(''),'/7901.html','true',[],''],
	['PAGE','17301',jdecode('Clent+Statements'),jdecode(''),'/17301.html','true',[],''],
	['PAGE','6606',jdecode('Guestbook'),jdecode(''),'/6606/index.html','true',[ 
		['PAGE','6601',jdecode('Read+Guestbook'),jdecode(''),'/6606/6601.html','false',[],'']
	],''],
	['PAGE','615',jdecode('Contact'),jdecode(''),'/615.html','true',[],''],
	['PAGE','21057',jdecode('Favorite+Links'),jdecode(''),'/21057.html','true',[],'']];
var siteelementCount=14;
theSitetree.topTemplateName='Antigua';
theSitetree.paletteFamily='61926E';
theSitetree.keyvisualId='6904';
theSitetree.keyvisualName='kv_6904.jpg';
theSitetree.fontsetId='11215';
theSitetree.graphicsetId='12037';
theSitetree.contentColor='304B5C';
theSitetree.contentBGColor='80AF8C';
var theTemplate={
				name: 			'Antigua',
				paletteFamily: 	'61926E',
				keyvisualId: 	'6904',
				keyvisualName: 	'kv_6904.jpg',
				fontsetId: 		'11215',
				graphicsetId: 	'12037',
				contentColor: 	'304B5C',
				contentBGColor: '80AF8C',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-6606AHW050INEVJR']={
webappId:    '1002',
documentId:  '6606',
internalId:  '6606AHW050INEVJR',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-1247591']={
webappId:    '1501',
documentId:  '501',
internalId:  '1247591',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-200788ffd8be690b24f0e214c9f5c325']={
webappId:    '7060',
documentId:  '12801',
internalId:  '200788ffd8be690b24f0e214c9f5c325',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-3bbb807d82b5a7c71271e7dbe55f756f']={
webappId:    '7060',
documentId:  '10301',
internalId:  '3bbb807d82b5a7c71271e7dbe55f756f',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-feaafaa75835ed4b8ec935667ab27b9b']={
webappId:    '7060',
documentId:  '12801',
internalId:  'feaafaa75835ed4b8ec935667ab27b9b',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20080910-093534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21010',
internalId:  '',
customField: '20090415-213727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20080209-194926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12801',
internalId:  '',
customField: '20080210-030735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5422',
internalId:  '',
customField: '20080211-123428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10301',
internalId:  '',
customField: '20080216-000209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13901',
internalId:  '',
customField: '20080425-162719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7922',
internalId:  '',
customField: '20080611-174626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20080209-195353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20080910-093051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6606',
internalId:  '',
customField: '20080208-184017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20080208-184017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20080208-183506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21057',
internalId:  '',
customField: '20090605-201643'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INEVJR';
var companyName   = 'There+For+You%21+Doula+%26+Childbirth+Classes';
var htmlTitle	  = '';
var metaKeywords  = 'baby%2C+birth%2C+doula%2C+hospital%2C+classes%2C+educator%2C+childbirth%2C+labor%2C+labor+doula%2C+girl%2C+boy%2C+infant%2C+antelope+valley%2C+lancaster%2C+palmdale%2C+california%2C+home+birth%2C+natural+birth%2C+lamaze%2C+best+doula+services%2Cchildbirth+education%2C+doula+services%2Chome+births%2C+there+for+you+doula++childbirth+classes%2C+best+doula%2Cswaddle%2Cbirth+balls%2C';
var metaContents  = '';
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();
};
