/* [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','11301',jdecode('Considering+Suicide%3F'),jdecode(''),'/11301/index.html','true',[ 
		['PAGE','14601',jdecode('Attempt+Survivor%26%23x27%3Bs+Note'),jdecode(''),'/11301/14601.html','true',[],'','']
	],'',''],
	['PAGE','10001',jdecode('HOME'),jdecode(''),'/10001.html','true',[],'',''],
	['PAGE','69301',jdecode('50+Men+Who+Cook'),jdecode(''),'/69301.html','false',[],'',''],
	['PAGE','72701',jdecode('Cooks+Details'),jdecode(''),'/72701.html','false',[],'',''],
	['PAGE','10052',jdecode('SPS+Hotline+%26+Services'),jdecode(''),'/10052/index.html','true',[ 
		['PAGE','48101',jdecode('Meet+the+Staff'),jdecode(''),'/10052/48101.html','true',[],'',''],
		['PAGE','10094',jdecode('SPS+Began'),jdecode(''),'/10052/10094.html','true',[],'',''],
		['PAGE','10073',jdecode('Suicide+Facts'),jdecode(''),'/10052/10073.html','true',[],'',''],
		['PAGE','15401',jdecode('Accolades'),jdecode(''),'/10052/15401.html','true',[],'',''],
		['PAGE','20301',jdecode('Links'),jdecode(''),'/10052/20301.html','true',[],'',''],
		['PAGE','80101',jdecode('Newsletter'),jdecode(''),'/10052/80101.html','true',[],'',''],
		['PAGE','63822',jdecode('SPS+Library'),jdecode(''),'/10052/63822.html','false',[],'',''],
		['PAGE','63801',jdecode('SPS+Store'),jdecode(''),'/10052/63801.html','true',[],'',''],
		['PAGE','67801',jdecode('SPS+in+the+Media'),jdecode(''),'/10052/67801.html','true',[],'',''],
		['PAGE','61801',jdecode('Brochures'),jdecode(''),'/10052/61801.html','true',[],'','']
	],'',''],
	['PAGE','80901',jdecode('Yellow+Ribbon+Walk+2010'),jdecode(''),'/80901.html','true',[],'',''],
	['PAGE','10157',jdecode('Events'),jdecode(''),'/10157/index.html','true',[ 
		['PAGE','10199',jdecode('SPS+Photo+Album'),jdecode(''),'/10157/10199.html','true',[],'',''],
		['PAGE','62801',jdecode('Harvest+Brunch+2009'),jdecode(''),'/10157/62801.html','true',[],'',''],
		['PAGE','58901',jdecode('SPSapalooza'),jdecode(''),'/10157/58901.html','true',[],'',''],
		['PAGE','57901',jdecode('Yellow+Ribbon+9%2F12%2F09'),jdecode(''),'/10157/57901.html','true',[],'',''],
		['PAGE','52301',jdecode('Miles4Matt+Photos'),jdecode(''),'/10157/52301.html','true',[],'',''],
		['PAGE','52322',jdecode('Christ+Church+Photos'),jdecode(''),'/10157/52322.html','true',[],'',''],
		['PAGE','55201',jdecode('4th+of+July+2009'),jdecode(''),'/10157/55201.html','true',[],'',''],
		['PAGE','39701',jdecode('50+Men+Event+Photos'),jdecode(''),'/10157/39701.html','false',[],'',''],
		['PAGE','79201',jdecode('50+Men+Who+Cook+2010'),jdecode(''),'/10157/79201.html','true',[],'','']
	],'',''],
	['PAGE','94001',jdecode('SPS+Training+Sessions'),jdecode(''),'/94001/index.html','true',[ 
		['PAGE','44001',jdecode('ASIST+Training'),jdecode(''),'/94001/44001.html','true',[],'',''],
		['PAGE','93922',jdecode('Youth+Leader+Training+'),jdecode(''),'/94001/93922.html','true',[],'',''],
		['PAGE','39901',jdecode('The+Chefs'),jdecode(''),'/94001/39901.html','false',[],'','']
	],'',''],
	['PAGE','10220',jdecode('Support+Groups'),jdecode(''),'/10220/index.html','true',[ 
		['PAGE','10241',jdecode('History+of+SOS'),jdecode(''),'/10220/10241.html','true',[],'',''],
		['PAGE','32401',jdecode('SOS+Quilts'),jdecode(''),'/10220/32401.html','true',[],'',''],
		['PAGE','32422',jdecode('SOS+Jewelry'),jdecode(''),'/10220/32422.html','true',[],'',''],
		['PAGE','32443',jdecode('Donate+to+SOS'),jdecode(''),'/10220/32443.html','true',[],'','']
	],'',''],
	['PAGE','34501',jdecode('Funders'),jdecode(''),'/34501.html','true',[],'',''],
	['PAGE','10283',jdecode('Volunteer'),jdecode(''),'/10283/index.html','true',[ 
		['PAGE','36101',jdecode('Volunteer+forms'),jdecode(''),'/10283/36101.html','true',[],'','']
	],'',''],
	['PAGE','10304',jdecode('Contact+Us'),jdecode(''),'/10304/index.html','true',[ 
		['PAGE','15701',jdecode('Guest+Book'),jdecode(''),'/10304/15701.html','true',[],'','']
	],'',''],
	['PAGE','15201',jdecode('Donate'),jdecode(''),'/15201/index.html','true',[ 
		['PAGE','35201',jdecode('Endowment+fund'),jdecode(''),'/15201/35201.html','true',[],'',''],
		['PAGE','34201',jdecode('Donation+Wish+List'),jdecode(''),'/15201/34201.html','true',[],'',''],
		['PAGE','34222',jdecode('Kitty+fund'),jdecode(''),'/15201/34222.html','true',[],'',''],
		['PAGE','23501',jdecode('Past+Guestbook+Entries'),jdecode(''),'/15201/23501.html','false',[],'','']
	],'',''],
	['PAGE','25301',jdecode('Disclaimer'),jdecode(''),'/25301.html','false',[],'','']];
var siteelementCount=47;
theSitetree.topTemplateName='Aroundtheworld';
theSitetree.paletteFamily='77B484';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10790';
theSitetree.graphicsetId='11220';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='77B484';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Aroundtheworld',
				paletteFamily: 	'77B484',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10790',
				graphicsetId: 	'11220',
				contentColor: 	'FFFFFF',
				contentBGColor: '77B484',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'365D3D',
				e_color: 		'365D3D',
				f_color: 		'365D3D',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-d8d100bb81c1fd13c785dd2b783d506c']={
webappId:    '7060',
documentId:  '10199',
internalId:  'd8d100bb81c1fd13c785dd2b783d506c',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-2332']={
webappId:    '7008',
documentId:  '10304',
internalId:  '2332',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20100609-144241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10052',
internalId:  '',
customField: '20090625-123953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10073',
internalId:  '',
customField: '20090312-132700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10094',
internalId:  '',
customField: '20100329-133212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14601',
internalId:  '',
customField: '20090313-153909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11301',
internalId:  '',
customField: '20091201-133120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10157',
internalId:  '',
customField: '20100609-165847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10304',
internalId:  '',
customField: '20090619-192754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10199',
internalId:  '',
customField: '20090625-102048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10220',
internalId:  '',
customField: '20100212-184404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10283',
internalId:  '',
customField: '20100405-153946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10241',
internalId:  '',
customField: '20090318-163744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32401',
internalId:  '',
customField: '20090319-095721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15201',
internalId:  '',
customField: '20090619-192056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15401',
internalId:  '',
customField: '20091130-113233'
};
webappMappings['1002']=webappMappings['1002-15701ahw050inv277']={
webappId:    '1002',
documentId:  '15701',
internalId:  '15701ahw050inv277',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63822',
internalId:  '',
customField: '20091123-160339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20090311-163928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23501',
internalId:  '',
customField: '20090311-115004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20301',
internalId:  '',
customField: '20090318-163528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25301',
internalId:  '',
customField: '20090311-180610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32422',
internalId:  '',
customField: '20090319-095955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32443',
internalId:  '',
customField: '20090318-093850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34201',
internalId:  '',
customField: '20090318-164409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34222',
internalId:  '',
customField: '20090319-100010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34501',
internalId:  '',
customField: '20090519-165802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35201',
internalId:  '',
customField: '20090318-113806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36101',
internalId:  '',
customField: '20090318-120533'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '10001',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-48f56ce44c449df09a41674b2e36223b']={
webappId:    '7060',
documentId:  '39701',
internalId:  '48f56ce44c449df09a41674b2e36223b',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39701',
internalId:  '',
customField: '20100228-170923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39901',
internalId:  '',
customField: '20090323-134547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44001',
internalId:  '',
customField: '20100809-111124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48101',
internalId:  '',
customField: '20091221-131334'
};
webappMappings['7060']=webappMappings['7060-f7573f01932c6f6c0fae9a89915388ab']={
webappId:    '7060',
documentId:  '52301',
internalId:  'f7573f01932c6f6c0fae9a89915388ab',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-bd0d0490d9a62f3cd76a9146f8f0efb1']={
webappId:    '7060',
documentId:  '52322',
internalId:  'bd0d0490d9a62f3cd76a9146f8f0efb1',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52301',
internalId:  '',
customField: '20100609-170210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52322',
internalId:  '',
customField: '20090625-103838'
};
webappMappings['7060']=webappMappings['7060-cbf8b8814a982922c27248afa98cd672']={
webappId:    '7060',
documentId:  '55201',
internalId:  'cbf8b8814a982922c27248afa98cd672',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55201',
internalId:  '',
customField: '20090705-095315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57901',
internalId:  '',
customField: '20090921-191707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58901',
internalId:  '',
customField: '20090927-173233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61801',
internalId:  '',
customField: '20100216-142139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62801',
internalId:  '',
customField: '20091122-192001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67801',
internalId:  '',
customField: '20091221-143733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63801',
internalId:  '',
customField: '20100218-191841'
};
webappMappings['1501']=webappMappings['1501-4037744']={
webappId:    '1501',
documentId:  '10001',
internalId:  '4037744',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69301',
internalId:  '',
customField: '20100226-165704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72701',
internalId:  '',
customField: '20100120-145443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79201',
internalId:  '',
customField: '20100228-171329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80101',
internalId:  '',
customField: '20100428-112633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80901',
internalId:  '',
customField: '20100826-113226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94001',
internalId:  '',
customField: '20100809-112555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93922',
internalId:  '',
customField: '20100809-112609'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INV277';
var companyName   = 'Suicide+Prevention+Services+%22Here+for+Life%21%22';
var htmlTitle	  = 'Suicide+Prevention+Services.+630-482-9696.+Batavia%2C+IL.+';
var metaKeywords  = 'sps%2C+suicide%2C+Illinois+suicide%2C+chicago+suicide%2C+depression%2C+suicide+help%2C+depression+line%2C+depression+hotline%2C+suicide+fox+valley%2C+suicide+kane+county%2C';
var metaContents  = 'Suicide+Prevention+Services+of+Batavia%2C+IL.+Call%3A+630-482-9696';
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();
};
