/* [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','1801',jdecode('Home'),jdecode(''), jdecode('%2F1801.html'), 'true',[],'',''],
	['PAGE','5612',jdecode('Programs'),jdecode(''), jdecode('%2F5612%2Findex.html'), 'true',[ 
		['PAGE','5975',jdecode('Healthy+Families'),jdecode(''), jdecode('%2F5612%2F5975.html'), 'true',[],'',''],
		['PAGE','5933',jdecode('First+Steps+'),jdecode(''), jdecode('%2F5612%2F5933.html'), 'true',[],'',''],
		['PAGE','5954',jdecode('Youth+Advisory+Council'),jdecode(''), jdecode('%2F5612%2F5954.html'), 'true',[],'',''],
		['PAGE','5996',jdecode('Latin+American+Resource+Center+-+LARC'),jdecode(''), jdecode('%2F5612%2F5996.html'), 'true',[],'',''],
		['PAGE','10412',jdecode('Grandparent+Connection'),jdecode(''), jdecode('%2F5612%2F10412.html'), 'true',[],'','']
	],'',''],
	['PAGE','1852',jdecode('News'),jdecode(''), jdecode('%2F1852.html'), 'true',[],'',''],
	['PAGE','1936',jdecode('Funding'),jdecode(''), jdecode('%2F1936.html'), 'true',[],'',''],
	['PAGE','6412',jdecode('Donate'),jdecode(''), jdecode('%2F6412.html'), 'true',[],'',''],
	['PAGE','1957',jdecode('Our+Story'),jdecode(''), jdecode('%2F1957.html'), 'true',[],'',''],
	['PAGE','1873',jdecode('Calendar+of+Events'),jdecode(''), jdecode('%2F1873%2Findex.html'), 'true',[ 
		['PAGE','2801',jdecode('Event+Registration'),jdecode(''), jdecode('%2F1873%2F2801.html'), 'true',[],'','']
	],'',''],
	['ITEM','12212',jdecode('Newsletter+Signup'),jdecode(''), jdecode('http%3A%2F%2Feepurl.com%2Fdlc3U'), 'true',[],'','_blank'],
	['PAGE','2062',jdecode('Staff'),jdecode(''), jdecode('%2F2062.html'), 'true',[],'',''],
	['PAGE','2083',jdecode('Board+of+Directors'),jdecode(''), jdecode('%2F2083.html'), 'true',[],'',''],
	['PAGE','2125',jdecode('Links'),jdecode(''), jdecode('%2F2125.html'), 'true',[],'',''],
	['PAGE','2146',jdecode('Contact'),jdecode(''), jdecode('%2F2146.html'), 'true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Jakarta';
theSitetree.paletteFamily='A9A975';
theSitetree.keyvisualId='7885';
theSitetree.keyvisualName='kv_7885.jpg';
theSitetree.fontsetId='16854';
theSitetree.graphicsetId='12294';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='CCCC99';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'true',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Jakarta',
				paletteFamily: 	'A9A975',
				keyvisualId: 	'7885',
				keyvisualName: 	'kv_7885.jpg',
				fontsetId: 		'16854',
				graphicsetId: 	'12294',
				contentColor: 	'000000',
				contentBGColor: 'CCCC99',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'A9A975',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20110315-133238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1936',
internalId:  '',
customField: '20110315-120813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10412',
internalId:  '',
customField: '20110315-134008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2146',
internalId:  '',
customField: '20110315-133210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2083',
internalId:  '',
customField: '20110315-122000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1852',
internalId:  '',
customField: '20110309-223026'
};
webappMappings['7008']=webappMappings['7008-23199']={
webappId:    '7008',
documentId:  '2801',
internalId:  '23199',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-23200']={
webappId:    '7008',
documentId:  '2146',
internalId:  '23200',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1873',
internalId:  '',
customField: '20110309-223026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5954',
internalId:  '',
customField: '20110322-130746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1957',
internalId:  '',
customField: '20110309-223026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20110309-224826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5612',
internalId:  '',
customField: '20110322-125218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2062',
internalId:  '',
customField: '20110315-130522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5933',
internalId:  '',
customField: '20110322-132413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2125',
internalId:  '',
customField: '20110309-223026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5975',
internalId:  '',
customField: '20110315-112603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5996',
internalId:  '',
customField: '20110322-131924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6412',
internalId:  '',
customField: '20110315-135101'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7KQRA';
var companyName   = 'Coastal+Coalition+for+Children+';
var htmlTitle	  = 'Coastal+Coalition+For+Children';
var metaKeywords  = 'cc4children.net%2C+cc4children.com%2C+ccforchildren.org%2C+501c3+non+profit+donation%2C+Glynn+County+501c3+corporation%2C+McIntosh+501c3+corporation%2C+coastal+coalition+for+children%2C+Healthy+Families%2C+expectant+parents%2C+First+Steps%2C+for+expectant+parents+and+parents+of+newborns%2C+Youth+Advisory+Council%2C+Consisting+of+youth+with+potential+to+be+leaders+but+not+currently+in+a+leadership+role%2C+Latin+American+Resource+Center+-+LARC%2C+Available+to+all+members+of+the+Latino+community%2C+Grandparent+Connection%2C+this+program+is+for+grandparents+who+are+raising+their+grandchildren%2C+Scott+Runkle%2C+2311+Heron+St%2C+912-262-1855%2C+scott%40cc4children.net%0D%0A';
var metaContents  = 'Partnering+for+a+promising+future%E2%80%9D+%E2%80%93+for+children+and+their+families.+People+working+together+to+build+a+healthy+future+for+our+children.+Our+Vision+is+to+provide+education%2C+support+and+prevention+programs+for+children+and+their+families+to+promote+health%2C+security+and+self-sufficiency.';
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();
};

