/* [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','3201',jdecode('Home'),jdecode(''),'/3201.html','true',[],'',''],
	['PAGE','3252',jdecode('Meet+Stephanie'),jdecode(''),'/3252.html','true',[],'',''],
	['PAGE','13101',jdecode('Heart+of+our+Ministry'),jdecode(''),'/13101.html','true',[],'',''],
	['PAGE','3273',jdecode('Our+Conferences'),jdecode(''),'/3273/index.html','true',[ 
		['PAGE','30101',jdecode('Unforgettable+Afternoons'),jdecode(''),'/3273/30101.html','true',[],'',''],
		['PAGE','30122',jdecode('Girlfriend+Weekends'),jdecode(''),'/3273/30122.html','true',[],'',''],
		['PAGE','30143',jdecode('Women+of+Essence'),jdecode(''),'/3273/30143.html','true',[],'',''],
		['PAGE','30164',jdecode('International+Ministry'),jdecode(''),'/3273/30164.html','true',[],'','']
	],'',''],
	['PAGE','4301',jdecode('Testimonials'),jdecode(''),'/4301.html','true',[],'',''],
	['PAGE','4322',jdecode('Contact'),jdecode(''),'/4322.html','true',[],'','']];
var siteelementCount=10;
theSitetree.topTemplateName='Phase';
theSitetree.paletteFamily='F45A41';
theSitetree.keyvisualId='12149';
theSitetree.keyvisualName='kv_12149.jpg';
theSitetree.fontsetId='33326';
theSitetree.graphicsetId='14196';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='888888';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Phase',
				paletteFamily: 	'F45A41',
				keyvisualId: 	'12149',
				keyvisualName: 	'kv_12149.jpg',
				fontsetId: 		'33326',
				graphicsetId: 	'14196',
				contentColor: 	'FFFFFF',
				contentBGColor: '888888',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3201',
internalId:  '',
customField: '20091029-142400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3252',
internalId:  '',
customField: '20091029-142429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3273',
internalId:  '',
customField: '20091029-135617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4301',
internalId:  '',
customField: '20091029-140101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4322',
internalId:  '',
customField: '20091029-140304'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13101',
internalId:  '',
customField: '20091029-142525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30101',
internalId:  '',
customField: '20100429-061249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30122',
internalId:  '',
customField: '20100429-061335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30143',
internalId:  '',
customField: '20091029-143213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30164',
internalId:  '',
customField: '20091029-141807'
};
webappMappings['7008']=webappMappings['7008-2542']={
webappId:    '7008',
documentId:  '4322',
internalId:  '2542',
customField: 'language:en;country:US;'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN330INF4ZW';
var companyName   = 'Stephanie+Henderson+Ministries';
var htmlTitle	  = 'Deep+Waters+Ministries';
var metaKeywords  = 'Deep+Waters+Ministries%2C+Stephanie+Guerra+Henderson%2C+Stephanie+Spooner%2C+Stephanie+Guerra%2C+Stephanie+Henderson%2C+Women%2C+womens+ministry%2C+womens+conference+speaker%2C+Christian+speaker%2C+Christian+author%2C+church%2C+religion%2C+Colorado%2C+Bible%2C+Bible+Study%2C+teaching%2C+leading%2C+Christian+Woman%2C+Christian+Women%2C+Life+Coach%2C+Life%2C+Marriage%2C+Children%2C+Family%2C+Help%2C+psychology%2C+support%2C+support+group%2C+biblical%2C+refreshing%2C+water%2C+sea%2C+church%2C+luncheons%2C+shoes%2C+stilettos%2C+excellent%2C+leadership%2C++eating+disorder%2C+grief%2C+death%2C+sexual+abuse%2C+single+women%2C+young+mom%2C+mothers%2C+fashion%2C+ecorating%2C';
var metaContents  = 'Deep+Waters+Ministries%2C+Stephanie+Guerra+Henderson%2C+Stephanie+Spooner%2C+Stephanie+Guerra%2C+Stephanie+Henderson%2C+Women%2C+womens+ministry%2C+womens+conference+speaker%2C+Christian+speaker%2C+Christian+author%2C+church%2C+religion%2C+Colorado%2C+Bible%2C+Bible+Study%2C+teaching%2C+leading%2C+Christian+Woman%2C+Christian+Women%2C+Life+Coach%2C+Life%2C+Marriage%2C+Children%2C+Family%2C+Help%2C+psychology%2C+support%2C+support+group%2C+biblical%2C+refreshing%2C+water%2C+sea%2C+church%2C+luncheons%2C+shoes%2C+stilettos%2C+excellent%2C+leadership%2C+eating+disorder%2C+grief%2C+death%2C+sexual+abuse%2C+single+women%2C+young+mom%2C+mothers%2C+fashion%2C+ecorating%2C';
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();
};
