/* [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 theSitetree=[ 
	['PAGE','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','552',jdecode('Who+We+Are'),jdecode(''),'/552/index.html','true',[ 
		['PAGE','10101',jdecode('Barbara+Colasuonno'),jdecode(''),'/552/10101.html','true',[],''],
		['PAGE','4001',jdecode('Beverly+Stevens'),jdecode(''),'/552/4001.html','true',[],''],
		['PAGE','4043',jdecode('Matt+Newhall'),jdecode(''),'/552/4043.html','true',[],''],
		['PAGE','4022',jdecode('Maggie+Rosen'),jdecode(''),'/552/4022.html','true',[],''],
		['PAGE','4064',jdecode('Iris+Greenberger'),jdecode(''),'/552/4064.html','true',[],'']
	],''],
	['PAGE','573',jdecode('What+We+Do'),jdecode(''),'/573/index.html','true',[ 
		['PAGE','594',jdecode('Financial+Services'),jdecode(''),'/573/594.html','true',[],''],
		['PAGE','615',jdecode('Legal+%26+Regulatory'),jdecode(''),'/573/615.html','true',[],''],
		['PAGE','20801',jdecode('Manufacturing+%26+Consumer+Services'),jdecode(''),'/573/20801.html','true',[],''],
		['PAGE','4085',jdecode('Medical+%26+Pharmaceutical'),jdecode(''),'/573/4085.html','true',[],''],
		['PAGE','24001',jdecode('Technology'),jdecode(''),'/573/24001.html','true',[],''],
		['PAGE','636',jdecode('Wine'),jdecode(''),'/573/636.html','true',[],'']
	],''],
	['PAGE','657',jdecode('Our+Clients'),jdecode(''),'/657.html','true',[],''],
	['PAGE','678',jdecode('Our+Work'),jdecode(''),'/678/index.html','true',[ 
		['PAGE','48111',jdecode('Advertising'),jdecode(''),'/678/48111.html','true',[],''],
		['PAGE','20201',jdecode('Annual+Reports'),jdecode(''),'/678/20201.html','true',[],''],
		['PAGE','720',jdecode('Articles'),jdecode(''),'/678/720.html','true',[],''],
		['PAGE','741',jdecode('Brochures'),jdecode(''),'/678/741.html','true',[],''],
		['PAGE','26301',jdecode('Event+Communications'),jdecode(''),'/678/26301.html','true',[],''],
		['PAGE','762',jdecode('Newsletters'),jdecode(''),'/678/762.html','true',[],''],
		['PAGE','783',jdecode('Presentations'),jdecode(''),'/678/783.html','true',[],''],
		['PAGE','804',jdecode('Speeches'),jdecode(''),'/678/804.html','true',[],''],
		['PAGE','16801',jdecode('Technical+Writing'),jdecode(''),'/678/16801.html','true',[],''],
		['PAGE','20243',jdecode('Websites'),jdecode(''),'/678/20243.html','true',[],''],
		['PAGE','825',jdecode('White+Papers'),jdecode(''),'/678/825.html','true',[],'']
	],''],
	['PAGE','4401',jdecode('Frequently+Asked+Questions'),jdecode(''),'/4401/index.html','true',[ 
		['PAGE','48460',jdecode('Cost'),jdecode(''),'/4401/48460.html','true',[],''],
		['PAGE','48478',jdecode('Typical+Projects'),jdecode(''),'/4401/48478.html','true',[],'']
	],''],
	['PAGE','7601',jdecode('Contact+Us'),jdecode(''),'/7601.html','true',[],'']];
var siteelementCount=31;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='479949';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10895';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Alpha',
				paletteFamily: 	'479949',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10895',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'479949',
				e_color: 		'479949',
				f_color: 		'479949',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20080605-132905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20080610-213529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '825',
internalId:  '',
customField: '20090520-093241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20080610-194456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10101',
internalId:  '',
customField: '20080610-213509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4001',
internalId:  '',
customField: '20080621-191024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4043',
internalId:  '',
customField: '20080613-023143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4022',
internalId:  '',
customField: '20080605-120849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4064',
internalId:  '',
customField: '20080611-115326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20080611-115629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20080611-194038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20080605-124549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20801',
internalId:  '',
customField: '20080605-124823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4085',
internalId:  '',
customField: '20080611-193120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24001',
internalId:  '',
customField: '20080605-125349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20080605-125246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20080610-193400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48111',
internalId:  '',
customField: '20080626-123953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20201',
internalId:  '',
customField: '20080605-132050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '720',
internalId:  '',
customField: '20080610-175008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '741',
internalId:  '',
customField: '20080611-193345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26301',
internalId:  '',
customField: '20080611-193428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '762',
internalId:  '',
customField: '20080731-143853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '783',
internalId:  '',
customField: '20080605-140748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '804',
internalId:  '',
customField: '20080612-003112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16801',
internalId:  '',
customField: '20080610-213841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20243',
internalId:  '',
customField: '20080611-115830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4401',
internalId:  '',
customField: '20080731-184940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48460',
internalId:  '',
customField: '20080731-184626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48478',
internalId:  '',
customField: '20080731-184711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20080604-150214'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INX2SY';
var companyName   = '';
var htmlTitle	  = 'writersandeditors';
var metaKeywords  = 'pHEADwriters%2FHEAD++HEADeditors%2FHEAD++HEADtranslators%2FHEAD++HEADfinancial+writers%2FHEAD++HEADprofessional+editors%2FHEAD++HEADwriter%2FHEAD++HEADeditor%2FHEAD++HEADtranslator%2FHEAD++HEADfinancial+writer%2FHEADHEADwriters%2FHEAD++HEADtechnical+editors%2FHEAD++HEADtechnical+translators%2FHEAD++HEADtechnical+writers%2FHEAD++HEADtechnical+editor%2FHEAD++HEADspeechwriter%2FHEAD++++';
var metaContents  = 'HEADwriters%2FHEAD++HEADeditors%2FHEAD++HEADtranslators%2FHEAD++HEADfinancial+writers%2FHEAD++HEADprofessional+editors%2FHEAD++HEADwriter%2FHEAD++HEADeditor%2FHEAD++HEADtranslator%2FHEAD++HEADfinancial+writer%2FHEADHEADwriters%2FHEAD++HEADtechnical+editors%2FHEAD++HEADtechnical+translators%2FHEAD++HEADtechnical+writers%2FHEAD++HEADtechnical+editor%2FHEAD++HEADspeechwriter%2FHEAD++++++';
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();
};

