/* [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','2501',jdecode('Home'),jdecode(''),'/2501.html','true',[],''],
	['PAGE','2552',jdecode('Join'),jdecode(''),'/2552.html','true',[],''],
	['PAGE','11901',jdecode('What%26%23x27%3Bs+New'),jdecode(''),'/11901/index.html','true',[ 
		['PAGE','19701',jdecode('June+Day'),jdecode(''),'/11901/19701.html','true',[],''],
		['PAGE','19722',jdecode('Garden+Tour'),jdecode(''),'/11901/19722.html','true',[],'']
	],''],
	['PAGE','2594',jdecode('Calendar+of+Events'),jdecode(''),'/2594.html','true',[],''],
	['PAGE','2615',jdecode('The+Tattler+Newsletter'),jdecode(''),'/2615.html','true',[],''],
	['PAGE','2636',jdecode('About+the+NRPCA'),jdecode(''),'/2636/index.html','true',[ 
		['PAGE','4801',jdecode('Board+of+Directors'),jdecode(''),'/2636/4801.html','true',[],''],
		['PAGE','2657',jdecode('Community+House'),jdecode(''),'/2636/2657.html','true',[],''],
		['PAGE','6501',jdecode('Park+Regulations'),jdecode(''),'/2636/6501.html','true',[],''],
		['PAGE','10001',jdecode('Committees'),jdecode(''),'/2636/10001.html','true',[],''],
		['PAGE','2678',jdecode('Volunteer+Opportunities'),jdecode(''),'/2636/2678.html','true',[],'']
	],''],
	['PAGE','2699',jdecode('The+Neighborhood'),jdecode(''),'/2699/index.html','true',[ 
		['PAGE','6001',jdecode('Our+History'),jdecode(''),'/2699/6001.html','true',[],''],
		['PAGE','6801',jdecode('Share+Your+Memories'),jdecode(''),'/2699/6801.html','true',[],''],
		['PAGE','6522',jdecode('Local+Schools'),jdecode(''),'/2699/6522.html','true',[],''],
		['PAGE','6543',jdecode('Youth+Programs'),jdecode(''),'/2699/6543.html','true',[],''],
		['PAGE','6564',jdecode('Community+Activities'),jdecode(''),'/2699/6564.html','true',[],''],
		['PAGE','10022',jdecode('Grandmont+Rosedale+CDC'),jdecode(''),'/2699/10022.html','true',[],''],
		['PAGE','10701',jdecode('NW+Detroit+Farmer%26%23x27%3Bs+Mkt'),jdecode(''),'/2699/10701.html','true',[],'']
	],''],
	['PAGE','6606',jdecode('Community+Resources'),jdecode(''),'/6606/index.html','true',[ 
		['PAGE','8501',jdecode('Important+Phone+Numbers'),jdecode(''),'/6606/8501.html','true',[],''],
		['PAGE','8701',jdecode('Important+Links'),jdecode(''),'/6606/8701.html','true',[],''],
		['PAGE','8601',jdecode('Contractors'),jdecode(''),'/6606/8601.html','true',[],''],
		['PAGE','8722',jdecode('Local+Businesses'),jdecode(''),'/6606/8722.html','true',[],'']
	],''],
	['PAGE','6585',jdecode('News+%26+Publications'),jdecode(''),'/6585.html','true',[],''],
	['PAGE','6627',jdecode('Contact+Us'),jdecode(''),'/6627.html','true',[],'']];
var siteelementCount=28;
theSitetree.topTemplateName='Antique';
theSitetree.paletteFamily='E4DC4F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='11063';
theSitetree.graphicsetId='11836';
theSitetree.contentColor='D1C3A6';
theSitetree.contentBGColor='856A3B';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Antique',
				paletteFamily: 	'E4DC4F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'11063',
				graphicsetId: 	'11836',
				contentColor: 	'D1C3A6',
				contentBGColor: '856A3B',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'664F23',
				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:  '2501',
internalId:  '',
customField: '20100101-211848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2552',
internalId:  '',
customField: '20100603-224520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20100603-225749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2594',
internalId:  '',
customField: '20100512-000020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2615',
internalId:  '',
customField: '20100124-112534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2636',
internalId:  '',
customField: '20100101-033414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2699',
internalId:  '',
customField: '20100124-110428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2657',
internalId:  '',
customField: '20100101-040004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2678',
internalId:  '',
customField: '20100101-040347'
};
webappMappings['7008']=webappMappings['7008-24433']={
webappId:    '7008',
documentId:  '2678',
internalId:  '24433',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-12d31e10cd113032e1e6ced13f0c7bc3']={
webappId:    '7060',
documentId:  '2501',
internalId:  '12d31e10cd113032e1e6ced13f0c7bc3',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6001',
internalId:  '',
customField: '20100101-110124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6564',
internalId:  '',
customField: '20100101-141410'
};
webappMappings['1002']=webappMappings['1002-6801aendu0inve1b']={
webappId:    '1002',
documentId:  '6801',
internalId:  '6801aendu0inve1b',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6801',
internalId:  '',
customField: '20100101-113213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6522',
internalId:  '',
customField: '20100101-125916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6543',
internalId:  '',
customField: '20100101-191707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6585',
internalId:  '',
customField: '20100126-204439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6606',
internalId:  '',
customField: '20100101-170345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20100101-143907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20100101-145852'
};
webappMappings['7008']=webappMappings['7008-24445']={
webappId:    '7008',
documentId:  '8601',
internalId:  '24445',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8701',
internalId:  '',
customField: '20100101-181701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20100101-201102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20100101-191252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10022',
internalId:  '',
customField: '20100101-182250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10701',
internalId:  '',
customField: '20100101-163540'
};
webappMappings['7080']=webappMappings['7080-696']={
webappId:    '7080',
documentId:  '11901',
internalId:  '696',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11901',
internalId:  '',
customField: '20100603-225918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6627',
internalId:  '',
customField: '20100101-202730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19701',
internalId:  '',
customField: '20100601-003024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19722',
internalId:  '',
customField: '20100603-232153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8722',
internalId:  '',
customField: '20100101-143603'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INVE1B';
var companyName   = 'North+Rosedale+Park+Civic+Association';
var htmlTitle	  = 'North+Rosedale+Park';
var metaKeywords  = 'North+Rosedale+ParkNRPCANorth+Rosedale';
var metaContents  = 'Welcome+to+the+historic+community+of+North+Rosedale+Park.++Were+one+of+the+top+neighborhoods+in+southeast+Michigan%2C+known+for+elegant+homes+and+great+neighbors.';
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();
};
