/* [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','14201',jdecode('Home'),jdecode(''), jdecode('%2F14201.html'), 'true',[],'',''],
	['PAGE','14252',jdecode('About+us'),jdecode(''), jdecode('%2F14252%2Findex.html'), 'true',[ 
		['PAGE','14273',jdecode('Professional+experience'),jdecode(''), jdecode('%2F14252%2F14273.html'), 'true',[],'',''],
		['PAGE','15901',jdecode('Academic+experience'),jdecode(''), jdecode('%2F14252%2F15901.html'), 'true',[],'','']
	],'',''],
	['PAGE','14294',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F14294.html'), 'true',[],'',''],
	['PAGE','14315',jdecode('Expert+services'),jdecode(''), jdecode('%2F14315.html'), 'true',[],'',''],
	['PAGE','14336',jdecode('Sample+cases'),jdecode(''), jdecode('%2F14336.html'), 'true',[],'',''],
	['PAGE','14357',jdecode('Contact'),jdecode(''), jdecode('%2F14357.html'), 'true',[],'',''],
	['PAGE','15922',jdecode('Articles'),jdecode(''), jdecode('%2F15922%2Findex.html'), 'true',[ 
		['PAGE','15401',jdecode('Mind+the+Gap'),jdecode(''), jdecode('%2F15922%2F15401.html'), 'true',[],'',''],
		['PAGE','15422',jdecode('Track+Walking'),jdecode(''), jdecode('%2F15922%2F15422.html'), 'true',[],'',''],
		['PAGE','15601',jdecode('Young+Drivers'),jdecode(''), jdecode('%2F15922%2F15601.html'), 'true',[],'',''],
		['PAGE','15622',jdecode('Safety+by+Design'),jdecode(''), jdecode('%2F15922%2F15622.html'), 'true',[],'',''],
		['PAGE','18401',jdecode('Low-level+Platforms'),jdecode(''), jdecode('%2F15922%2F18401.html'), 'true',[],'',''],
		['PAGE','23401',jdecode('Platform+Overcrowding'),jdecode(''), jdecode('%2F15922%2F23401.html'), 'true',[],'',''],
		['PAGE','23422',jdecode('Platform+Level+of+Service'),jdecode(''), jdecode('%2F15922%2F23422.html'), 'true',[],'',''],
		['PAGE','23443',jdecode('Pedestrian+Crossover'),jdecode(''), jdecode('%2F15922%2F23443.html'), 'true',[],'',''],
		['PAGE','23464',jdecode('Eyes+of+the+Train+Operator'),jdecode(''), jdecode('%2F15922%2F23464.html'), 'true',[],'',''],
		['PAGE','30223',jdecode('School+Bus+Stop'),jdecode(''), jdecode('%2F15922%2F30223.html'), 'true',[],'',''],
		['PAGE','30923',jdecode('Walking+on+Ice'),jdecode(''), jdecode('%2F15922%2F30923.html'), 'true',[],'',''],
		['PAGE','32823',jdecode('Bus+Occupant+Safety'),jdecode(''), jdecode('%2F15922%2F32823.html'), 'true',[],'','']
	],'',''],
	['PAGE','20901',jdecode('Published+cases'),jdecode(''), jdecode('%2F20901%2Findex.html'), 'true',[ 
		['PAGE','18601',jdecode('Blainey+v.+MTA+and+NYC'),jdecode(''), jdecode('%2F20901%2F18601.html'), 'true',[],'',''],
		['PAGE','20101',jdecode('Cohen+v.+MTA'),jdecode(''), jdecode('%2F20901%2F20101.html'), 'true',[],'',''],
		['PAGE','20122',jdecode('McIlvenny+v.+MetroNorth'),jdecode(''), jdecode('%2F20901%2F20122.html'), 'true',[],'',''],
		['PAGE','22701',jdecode('Navarro+v.+NYC+Transit'),jdecode(''), jdecode('%2F20901%2F22701.html'), 'true',[],'','']
	],'',''],
	['PAGE','28323',jdecode('Web+Seminars'),jdecode(''), jdecode('%2F28323%2Findex.html'), 'true',[ 
		['PAGE','28344',jdecode('Platform+Accidents'),jdecode(''), jdecode('%2F28323%2F28344.html'), 'true',[],'',''],
		['PAGE','28365',jdecode('Pedestrian+Rail+Accidents'),jdecode(''), jdecode('%2F28323%2F28365.html'), 'true',[],'',''],
		['PAGE','29123',jdecode('Rail+Crossing+Accidents'),jdecode(''), jdecode('%2F28323%2F29123.html'), 'true',[],'',''],
		['PAGE','31823',jdecode('Bus%2FLight+Rail+Safety'),jdecode(''), jdecode('%2F28323%2F31823.html'), 'true',[],'',''],
		['PAGE','33323',jdecode('School+Bus+Safety'),jdecode(''), jdecode('%2F28323%2F33323.html'), 'true',[],'',''],
		['PAGE','33344',jdecode('RR+Pedestrian+Accidents'),jdecode(''), jdecode('%2F28323%2F33344.html'), 'true',[],'',''],
		['PAGE','34923',jdecode('RR+Station+Accidents'),jdecode(''), jdecode('%2F28323%2F34923.html'), 'true',[],'','']
	],'','']];
var siteelementCount=34;
theSitetree.topTemplateName='Medium';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='2153';
theSitetree.keyvisualName='architektur2.jpg';
theSitetree.fontsetId='355';
theSitetree.graphicsetId='408';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7V'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Medium',
				paletteFamily: 	'000000',
				keyvisualId: 	'2153',
				keyvisualName: 	'architektur2.jpg',
				fontsetId: 		'355',
				graphicsetId: 	'408',
				contentColor: 	'DDDDDD',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'8EBFC6',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20110612-213544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14252',
internalId:  '',
customField: '20111110-174153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14273',
internalId:  '',
customField: '20101108-050147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14294',
internalId:  '',
customField: '20111004-123055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14315',
internalId:  '',
customField: '20111110-174437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14336',
internalId:  '',
customField: '20111110-175837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14357',
internalId:  '',
customField: '20111004-123148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15422',
internalId:  '',
customField: '20100516-194717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15401',
internalId:  '',
customField: '20100516-213749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20100516-185529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15622',
internalId:  '',
customField: '20100516-185646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15922',
internalId:  '',
customField: '20110912-073211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20101108-051016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18401',
internalId:  '',
customField: '20100517-082241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18601',
internalId:  '',
customField: '20100517-220906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20101',
internalId:  '',
customField: '20100520-212621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20122',
internalId:  '',
customField: '20100520-212927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20901',
internalId:  '',
customField: '20101114-062527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22701',
internalId:  '',
customField: '20100825-034743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23401',
internalId:  '',
customField: '20100825-034016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23422',
internalId:  '',
customField: '20100825-034432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23443',
internalId:  '',
customField: '20100802-202309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23464',
internalId:  '',
customField: '20100803-023314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28323',
internalId:  '',
customField: '20111110-173741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28344',
internalId:  '',
customField: '20111004-123401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28365',
internalId:  '',
customField: '20110303-071338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29123',
internalId:  '',
customField: '20110303-071438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30223',
internalId:  '',
customField: '20101128-110701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30923',
internalId:  '',
customField: '20101231-064718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31823',
internalId:  '',
customField: '20111004-123602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32823',
internalId:  '',
customField: '20110912-073359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33323',
internalId:  '',
customField: '20111110-173842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33344',
internalId:  '',
customField: '20111110-173935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34923',
internalId:  '',
customField: '20120122-084523'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050IN2HPJ';
var companyName   = 'Carl+Berkowitz%2C+PE%2C+PH.D.%2C+AICP';
var htmlTitle	  = '';
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();
};

