/* [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','1401',jdecode('Home'),jdecode(''),'/1401.html','true',[],'',''],
	['PAGE','1452',jdecode('About+CERT'),jdecode(''),'/1452.html','true',[],'',''],
	['PAGE','230434',jdecode('Parma+CERT+Bylaws'),jdecode(''),'/230434.html','true',[],'',''],
	['PAGE','1473',jdecode('The+Parma+Team'),jdecode(''),'/1473/index.html','true',[ 
		['PAGE','105012',jdecode('Parma+CERT+Annual+Reports'),jdecode(''),'/1473/105012.html','true',[],'',''],
		['PAGE','52101',jdecode('Parma+CERT+Graduating+Classes'),jdecode(''),'/1473/52101.html','true',[],'',''],
		['PAGE','29301',jdecode('Parma+CERT+Board'),jdecode(''),'/1473/29301.html','true',[],'',''],
		['PAGE','113612',jdecode('Org+Committee+Notes'),jdecode(''),'/1473/113612.html','true',[],'','']
	],'',''],
	['PAGE','132912',jdecode('Training+Information'),jdecode(''),'/132912.html','true',[],'',''],
	['PAGE','1620',jdecode('Schedule+of+Events'),jdecode(''),'/1620.html','true',[],'',''],
	['PAGE','103612',jdecode('Parma+CERT+Videos'),jdecode(''),'/103612.html','true',[],'',''],
	['PAGE','22401',jdecode('CERT+Forms'),jdecode(''),'/22401/index.html','true',[ 
		['PAGE','80101',jdecode('Parma+CERT+Application'),jdecode(''),'/22401/80101.html','true',[],'','']
	],'',''],
	['PAGE','34601',jdecode('Emergency+Information'),jdecode(''),'/34601/index.html','true',[ 
		['PAGE','63301',jdecode('Emergency+preparedness+tips'),jdecode(''),'/34601/63301.html','true',[],'','']
	],'',''],
	['PAGE','1494',jdecode('Parma+CERT+Updates'),jdecode(''),'/1494.html','true',[],'',''],
	['PAGE','85801',jdecode('Code+Red+Activation+Info'),jdecode(''),'/85801.html','true',[],'',''],
	['PAGE','63901',jdecode('Coordinator%26%23x27%3Bs+Column'),jdecode(''),'/63901.html','true',[],'',''],
	['PAGE','184634',jdecode('Local+Weather+Forecast'),jdecode(''),'/184634.html','true',[],'',''],
	['PAGE','1536',jdecode('Community+Links'),jdecode(''),'/1536.html','true',[],'',''],
	['PAGE','149234',jdecode('CERT+-+Fundraising+Opportunities'),jdecode(''),'/149234/index.html','true',[ 
		['PAGE','155434',jdecode('Parma+CERT+Sponsors'),jdecode(''),'/149234/155434.html','true',[],'',''],
		['PAGE','160934',jdecode('2009+Fundraiser+Donors'),jdecode(''),'/149234/160934.html','true',[],'','']
	],'',''],
	['PAGE','199834',jdecode('The+CERT+Photo+Journal'),jdecode(''),'/199834.html','true',[],'',''],
	['PAGE','184034',jdecode('New+CERT+Photo+Journal'),jdecode(''),'/184034.html','true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Global';
theSitetree.paletteFamily='006600';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='87';
theSitetree.graphicsetId='104';
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: 			'Global',
				paletteFamily: 	'006600',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'87',
				graphicsetId: 	'104',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'176B03',
				b_color: 		'669900',
				c_color: 		'000000',
				d_color: 		'E0EEE3',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1401',
internalId:  '',
customField: '20100125-225714'
};
webappMappings['7060']=webappMappings['7060-28b239a412a2aaac7d14565866a744a7']={
webappId:    '7060',
documentId:  '26501',
internalId:  '28b239a412a2aaac7d14565866a744a7',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1452',
internalId:  '',
customField: '20081022-080708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1473',
internalId:  '',
customField: '20100522-134326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105012',
internalId:  '',
customField: '20100707-182405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '230434',
internalId:  '',
customField: '20100310-205559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52101',
internalId:  '',
customField: '20090117-232920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29301',
internalId:  '',
customField: '20100720-151855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113612',
internalId:  '',
customField: '20090221-143408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20090226-141511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80101',
internalId:  '',
customField: '20090518-155030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149234',
internalId:  '',
customField: '20081003-132534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155434',
internalId:  '',
customField: '20081005-205755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '160934',
internalId:  '',
customField: '20091108-204558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63901',
internalId:  '',
customField: '20091116-214126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132912',
internalId:  '',
customField: '20100825-200539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103612',
internalId:  '',
customField: '20090313-055022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1494',
internalId:  '',
customField: '20100825-201804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1620',
internalId:  '',
customField: '20100825-200838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34601',
internalId:  '',
customField: '20080203-134538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85801',
internalId:  '',
customField: '20091110-161714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63301',
internalId:  '',
customField: '20090208-095217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1536',
internalId:  '',
customField: '20090201-120838'
};
webappMappings['7060']=webappMappings['7060-27c82e75192aca7da23ac0f12a32ba9a']={
webappId:    '7060',
documentId:  '184034',
internalId:  '27c82e75192aca7da23ac0f12a32ba9a',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '184634',
internalId:  '',
customField: '20090107-231418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '184034',
internalId:  '',
customField: '20091211-214610'
};
webappMappings['7080']=webappMappings['7080-37']={
webappId:    '7080',
documentId:  '184634',
internalId:  '37',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-704280bdcb1555b9eb595d3e4880044f']={
webappId:    '7060',
documentId:  '199834',
internalId:  '704280bdcb1555b9eb595d3e4880044f',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '199834',
internalId:  '',
customField: '20090224-091949'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INVG3K';
var companyName   = 'City+of+Parma+CERT';
var htmlTitle	  = 'Parma+CERT';
var metaKeywords  = '';
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();
};
