/* [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','2101',jdecode('Home'),jdecode(''),'/2101.html','true',[],''],
	['PAGE','2152',jdecode('Latest+news'),jdecode(''),'/2152/index.html','true',[ 
		['PAGE','18980',jdecode('Meeting+Schedule'),jdecode(''),'/2152/18980.html','true',[],''],
		['PAGE','23080',jdecode('Photo+Gallery'),jdecode(''),'/2152/23080.html','true',[],'']
	],''],
	['PAGE','19001',jdecode('Western+Regional+Conference'),jdecode(''),'/19001/index.html','false',[ 
		['PAGE','28080',jdecode('Conference+Schedule'),jdecode(''),'/19001/28080.html','true',[],''],
		['PAGE','35380',jdecode('Application'),jdecode(''),'/19001/35380.html','false',[],''],
		['PAGE','30880',jdecode('On-Line+Application'),jdecode(''),'/19001/30880.html','true',[],''],
		['PAGE','27380',jdecode('Explore+our+beautiful+state'),jdecode(''),'/19001/27380.html','true',[],''],
		['PAGE','24580',jdecode('Conference+Forum'),jdecode(''),'/19001/24580.html','true',[],'']
	],''],
	['PAGE','38991',jdecode('Guest+Book'),jdecode(''),'/38991.html','true',[],''],
	['PAGE','2173',jdecode('Contact'),jdecode(''),'/2173/index.html','true',[ 
		['PAGE','24280',jdecode('Where+we+are'),jdecode(''),'/2173/24280.html','true',[],'']
	],''],
	['PAGE','2194',jdecode('Conferences'),jdecode(''),'/2194.html','true',[],''],
	['PAGE','2215',jdecode('Blog'),jdecode(''),'/2215.html','true',[],''],
	['PAGE','23380',jdecode('Stores'),jdecode(''),'/23380.html','true',[],''],
	['PAGE','39191',jdecode('Driving+Directions'),jdecode(''),'/39191.html','true',[],'']];
var siteelementCount=17;
theSitetree.topTemplateName='Blades';
theSitetree.paletteFamily='466AD2';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='31704';
theSitetree.graphicsetId='13467';
theSitetree.contentColor='203d93';
theSitetree.contentBGColor='608DFE';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Blades',
				paletteFamily: 	'466AD2',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'31704',
				graphicsetId: 	'13467',
				contentColor: 	'203d93',
				contentBGColor: '608DFE',
				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['7050']=webappMappings['7050-130']={
webappId:    '7050',
documentId:  '2215',
internalId:  '130',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20091223-170053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2215',
internalId:  '',
customField: '20090308-203409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2152',
internalId:  '',
customField: '20090720-162201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2173',
internalId:  '',
customField: '20090416-110107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2194',
internalId:  '',
customField: '20100507-194205'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2101',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-13873966']={
webappId:    '1501',
documentId:  '2101',
internalId:  '13873966',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18980',
internalId:  '',
customField: '20090308-204512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39191',
internalId:  '',
customField: '20090514-191624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19001',
internalId:  '',
customField: '20090402-161727'
};
webappMappings['1002']=webappMappings['1002-38991abr330inla01']={
webappId:    '1002',
documentId:  '38991',
internalId:  '38991abr330inla01',
customField: 'icq=false'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '39191',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['7060']=webappMappings['7060-4817754b560c35d5ef3a8bba7e0bfbc1']={
webappId:    '7060',
documentId:  '23080',
internalId:  '4817754b560c35d5ef3a8bba7e0bfbc1',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23080',
internalId:  '',
customField: '20090308-212529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23380',
internalId:  '',
customField: '20091223-163157'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '24280',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24280',
internalId:  '',
customField: '20090308-222303'
};
webappMappings['1003']=webappMappings['1003-abr330inla0111fe9175645']={
webappId:    '1003',
documentId:  '24580',
internalId:  'abr330inla0111fe9175645',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24580',
internalId:  '',
customField: '20090407-092534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27380',
internalId:  '',
customField: '20090416-104912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28080',
internalId:  '',
customField: '20090619-194053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30880',
internalId:  '',
customField: '20090619-194422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35380',
internalId:  '',
customField: '20090414-124100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38991',
internalId:  '',
customField: '20090514-192058'
};
var canonHostname = 'wsc1.brinkster.com';
var accountId     = 'ABR330INLA01';
var companyName   = 'North+Sound+District+Council%2C+Society+of+St+Vincent+de+Paul%2C+Wa.';
var htmlTitle	  = 'North+Sound+Society+of+St+Vincent+de+Paul';
var metaKeywords  = '';
var metaContents  = 'Vincent+de+PaulSnohomish+County';
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();
};
