/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],'',''],
	['PAGE','352',jdecode('About+Us'),jdecode(''),'/352/index.html','true',[ 
		['PAGE','32301',jdecode('History'),jdecode(''),'/352/32301.html','true',[],'',''],
		['PAGE','32322',jdecode('Mission'),jdecode(''),'/352/32322.html','true',[],'',''],
		['PAGE','32343',jdecode('Steering+Committee'),jdecode(''),'/352/32343.html','true',[],'',''],
		['PAGE','32364',jdecode('Director'),jdecode(''),'/352/32364.html','true',[],'','']
	],'',''],
	['PAGE','373',jdecode('Membership'),jdecode(''),'/373/index.html','true',[ 
		['PAGE','32385',jdecode('Our+Members'),jdecode(''),'/373/32385.html','true',[],'',''],
		['PAGE','32406',jdecode('Our+Services'),jdecode(''),'/373/32406.html','true',[],'',''],
		['PAGE','32427',jdecode('Join+Us'),jdecode(''),'/373/32427.html','true',[],'','']
	],'',''],
	['PAGE','394',jdecode('Programs'),jdecode(''),'/394/index.html','true',[ 
		['PAGE','32448',jdecode('Annual+Meeting'),jdecode(''),'/394/32448.html','true',[],'',''],
		['PAGE','32469',jdecode('Policy+Briefing'),jdecode(''),'/394/32469.html','true',[],'',''],
		['PAGE','32490',jdecode('Expert+Briefing'),jdecode(''),'/394/32490.html','true',[],'',''],
		['PAGE','32511',jdecode('Special+Events'),jdecode(''),'/394/32511.html','true',[],'','']
	],'',''],
	['PAGE','415',jdecode('Resources'),jdecode(''),'/415/index.html','true',[ 
		['PAGE','32532',jdecode('Calendar'),jdecode(''),'/415/32532.html','true',[],'',''],
		['PAGE','47401',jdecode('Photo+Gallery'),jdecode(''),'/415/47401.html','true',[],'',''],
		['PAGE','35901',jdecode('Publications'),jdecode(''),'/415/35901.html','true',[],'',''],
		['PAGE','35922',jdecode('Members+Picks'),jdecode(''),'/415/35922.html','true',[],'',''],
		['PAGE','35943',jdecode('Affinity+Groups'),jdecode(''),'/415/35943.html','true',[],'','']
	],'',''],
	['PAGE','32553',jdecode('Members+Only'),jdecode(''),'/32553/index.html','true',[ 
		['PAGE','42101',jdecode('Member+Docs'),jdecode(''),'/32553/42101.html','true',[],'',''],
		['PAGE','42122',jdecode('Peacemaker'),jdecode(''),'/32553/42122.html','true',[],'',''],
		['PAGE','42143',jdecode('Annual+Meeting'),jdecode(''),'/32553/42143.html','true',[],'',''],
		['PAGE','58401',jdecode('Madrid+Meeting+2008'),jdecode(''),'/32553/58401.html','true',[],'',''],
		['PAGE','72601',jdecode('Federal+Policy+Briefing'),jdecode(''),'/32553/72601.html','true',[],'','']
	],'',''],
	['PAGE','436',jdecode('Contact+Us'),jdecode(''),'/436.html','true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='5351C2';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10894';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Alpha',
				paletteFamily: 	'5351C2',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10894',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'5351C2',
				e_color: 		'5351C2',
				f_color: 		'5351C2',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-2282']={
webappId:    '7008',
documentId:  '32427',
internalId:  '2282',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100611-091915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352',
internalId:  '',
customField: '20100611-092251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32301',
internalId:  '',
customField: '20100611-092315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32322',
internalId:  '',
customField: '20100611-092345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32343',
internalId:  '',
customField: '20100611-091045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32364',
internalId:  '',
customField: '20100611-092450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '373',
internalId:  '',
customField: '20081231-131159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32385',
internalId:  '',
customField: '20100611-125937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32406',
internalId:  '',
customField: '20100611-093536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32427',
internalId:  '',
customField: '20100611-093632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '394',
internalId:  '',
customField: '20100611-102148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32448',
internalId:  '',
customField: '20100611-093754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32469',
internalId:  '',
customField: '20100611-094219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32490',
internalId:  '',
customField: '20100611-095249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32511',
internalId:  '',
customField: '20100628-093351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '415',
internalId:  '',
customField: '20081231-131653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32532',
internalId:  '',
customField: '20100611-095709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47401',
internalId:  '',
customField: '20100611-095733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35901',
internalId:  '',
customField: '20100611-095756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35922',
internalId:  '',
customField: '20100611-095829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35943',
internalId:  '',
customField: '20100611-100058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32553',
internalId:  '',
customField: '20100611-095630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42101',
internalId:  '',
customField: '20090512-120414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42122',
internalId:  '',
customField: '20100628-090830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42143',
internalId:  '',
customField: '20091109-164610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58401',
internalId:  '',
customField: '20090512-115749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '436',
internalId:  '',
customField: '20100611-095557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72601',
internalId:  '',
customField: '20090603-162352'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INZ7ZV';
var companyName   = 'Peace+and+Security+Funders+Group';
var htmlTitle	  = 'Peace+and+Security+Funders+Group';
var metaKeywords  = 'Peace%2C+Security%2C+Funders%2C+Affinity+Group%2C+Foundation%2C+Grants';
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();
};
