/* [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','5101',jdecode('Home'),jdecode(''),'/5101.html','true',[],'',''],
	['PAGE','5173',jdecode('About+us'),jdecode(''),'/5173/index.html','true',[ 
		['PAGE','5194',jdecode('Our+Lawyers'),jdecode(''),'/5173/5194.html','true',[],'','']
	],'',''],
	['PAGE','5152',jdecode('Legal+Services'),jdecode(''),'/5152.html','true',[],'',''],
	['PAGE','9585',jdecode('AAA+Arbitration+%26+Mediation'),jdecode(''),'/9585.html','false',[],'',''],
	['PAGE','37016',jdecode('Resources'),jdecode(''),'/37016.html','true',[],'',''],
	['PAGE','5257',jdecode('Contact'),jdecode(''),'/5257/index.html','true',[ 
		['PAGE','47331',jdecode('E-Mail+Form'),jdecode(''),'/5257/47331.html','true',[],'','']
	],'',''],
	['PAGE','20340',jdecode('PRF-Bio'),jdecode(''),'/20340/index.html','true',[ 
		['PAGE','51531',jdecode('2010+Lav+Law'),jdecode(''),'/20340/51531.html','true',[],'',''],
		['PAGE','40016',jdecode('2010+School+Conf'),jdecode(''),'/20340/40016.html','true',[],'',''],
		['PAGE','18185',jdecode('Media'),jdecode(''),'/20340/18185.html','true',[],'',''],
		['PAGE','32572',jdecode('Recollections'),jdecode(''),'/20340/32572.html','true',[],'',''],
		['PAGE','33082',jdecode('Publications'),jdecode(''),'/20340/33082.html','true',[],'',''],
		['PAGE','17385',jdecode('ICTLEP'),jdecode(''),'/20340/17385.html','true',[],'',''],
		['PAGE','20540',jdecode('1st+Conference'),jdecode(''),'/20340/20540.html','true',[],'',''],
		['PAGE','22030',jdecode('2nd+Conference'),jdecode(''),'/20340/22030.html','true',[],'',''],
		['PAGE','23030',jdecode('3rd+Conference'),jdecode(''),'/20340/23030.html','true',[],'',''],
		['PAGE','23051',jdecode('4th+Conference'),jdecode(''),'/20340/23051.html','true',[],'',''],
		['PAGE','27320',jdecode('5th+Conference'),jdecode(''),'/20340/27320.html','true',[],'',''],
		['PAGE','29045',jdecode('Photos'),jdecode(''),'/20340/29045.html','true',[],'','']
	],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='3E6E72';
theSitetree.keyvisualId='1751';
theSitetree.keyvisualName='gericht.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='354';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3E6E72';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'3E6E72',
				keyvisualId: 	'1751',
				keyvisualName: 	'gericht.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'354',
				contentColor: 	'FFFFFF',
				contentBGColor: '3E6E72',
				a_color: 		'3E6E72',
				b_color: 		'101C1D',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20110718-121318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5152',
internalId:  '',
customField: '20110125-112013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5173',
internalId:  '',
customField: '20110121-124137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5194',
internalId:  '',
customField: '20110718-121350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9585',
internalId:  '',
customField: '20080710-121613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5257',
internalId:  '',
customField: '20110121-130329'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '5257',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17385',
internalId:  '',
customField: '20110121-133938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18185',
internalId:  '',
customField: '20110121-133215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20340',
internalId:  '',
customField: '20110121-131859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20540',
internalId:  '',
customField: '20090127-111135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22030',
internalId:  '',
customField: '20091005-113901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23030',
internalId:  '',
customField: '20090127-105705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23051',
internalId:  '',
customField: '20090127-113159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27320',
internalId:  '',
customField: '20090127-175509'
};
webappMappings['7060']=webappMappings['7060-6c455418f4732d11516f4d4d1acc6ffa']={
webappId:    '7060',
documentId:  '29045',
internalId:  '6c455418f4732d11516f4d4d1acc6ffa',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29045',
internalId:  '',
customField: '20100621-121037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32572',
internalId:  '',
customField: '20110121-133259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33082',
internalId:  '',
customField: '20110121-133900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37016',
internalId:  '',
customField: '20110121-125842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40016',
internalId:  '',
customField: '20100223-120325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51531',
internalId:  '',
customField: '20100823-160603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47331',
internalId:  '',
customField: '20100524-174107'
};
webappMappings['7008']=webappMappings['7008-28360']={
webappId:    '7008',
documentId:  '47331',
internalId:  '28360',
customField: 'language:en;country:US;'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN2LKD';
var companyName   = 'Frye+and+Associates%2C+PLLC';
var htmlTitle	  = 'Frye+and+Associates%2C+PLLC';
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();
};

