/* [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','601',jdecode('Home'),jdecode(''), jdecode('%2F601.html'), 'true',[],'',''],
	['PAGE','652',jdecode('About+us'),jdecode(''), jdecode('%2F652%2Findex.html'), 'true',[ 
		['PAGE','15701',jdecode('Her-story'),jdecode(''), jdecode('%2F652%2F15701.html'), 'true',[],'',''],
		['PAGE','673',jdecode('Co-Owners'),jdecode(''), jdecode('%2F652%2F673.html'), 'true',[],'',''],
		['PAGE','11101',jdecode('Consultants'),jdecode(''), jdecode('%2F652%2F11101.html'), 'true',[],'','']
	],'',''],
	['PAGE','694',jdecode('Our+LMEs'),jdecode(''), jdecode('%2F694%2Findex.html'), 'true',[ 
		['PAGE','715',jdecode('The+Guilford+Center'),jdecode(''), jdecode('%2F694%2F715.html'), 'true',[],'',''],
		['PAGE','736',jdecode('CenterPoint+Human+Services'),jdecode(''), jdecode('%2F694%2F736.html'), 'true',[],'',''],
		['PAGE','15722',jdecode('Alamance-Caswell+LME'),jdecode(''), jdecode('%2F694%2F15722.html'), 'true',[],'','']
	],'',''],
	['PAGE','778',jdecode('Services'),jdecode(''), jdecode('%2F778%2Findex.html'), 'true',[ 
		['PAGE','15743',jdecode('CAP+MR%2FDD'),jdecode(''), jdecode('%2F778%2F15743.html'), 'true',[],'',''],
		['PAGE','15785',jdecode('Specialized+Services'),jdecode(''), jdecode('%2F778%2F15785.html'), 'true',[],'',''],
		['PAGE','15806',jdecode('Continuing+Education+'),jdecode(''), jdecode('%2F778%2F15806.html'), 'true',[],'',''],
		['PAGE','15827',jdecode('Advocacy'),jdecode(''), jdecode('%2F778%2F15827.html'), 'true',[],'','']
	],'',''],
	['PAGE','35979',jdecode('Potential+Consultants'),jdecode(''), jdecode('%2F35979.html'), 'true',[],'',''],
	['PAGE','35988',jdecode('Potential+Consumers'),jdecode(''), jdecode('%2F35988.html'), 'true',[],'',''],
	['PAGE','33895',jdecode('Training'),jdecode(''), jdecode('%2F33895.html'), 'true',[],'',''],
	['PAGE','904',jdecode('Secure+Area'),jdecode(''), jdecode('%2F904%2Findex.html'), 'true',[ 
		['PAGE','25101',jdecode('Announcements'),jdecode(''), jdecode('%2F904%2F25101.html'), 'true',[],'',''],
		['PAGE','35997',jdecode('CEU%26%23x27%3Bs'),jdecode(''), jdecode('%2F904%2F35997.html'), 'true',[],'',''],
		['PAGE','15869',jdecode('Consumer+Calendars'),jdecode(''), jdecode('%2F904%2F15869.html'), 'true',[],'',''],
		['PAGE','15890',jdecode('Contact+Sheet'),jdecode(''), jdecode('%2F904%2F15890.html'), 'true',[],'',''],
		['PAGE','16401',jdecode('Email'),jdecode(''), jdecode('%2F904%2F16401.html'), 'true',[],'',''],
		['PAGE','36006',jdecode('Volunteer+Opportunity'),jdecode(''), jdecode('%2F904%2F36006.html'), 'true',[],'','']
	],'',''],
	['PAGE','10822',jdecode('CQL'),jdecode(''), jdecode('%2F10822.html'), 'true',[],'',''],
	['PAGE','21801',jdecode('Community+Events'),jdecode(''), jdecode('%2F21801.html'), 'true',[],'',''],
	['PAGE','925',jdecode('Contact+PRC'),jdecode(''), jdecode('%2F925.html'), 'true',[],'','']];
var siteelementCount=27;
theSitetree.topTemplateName='Billy';
theSitetree.paletteFamily='7179A3';
theSitetree.keyvisualId='7078';
theSitetree.keyvisualName='kv_7078.jpg';
theSitetree.fontsetId='16390';
theSitetree.graphicsetId='12122';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='7179A3';
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: 			'Billy',
				paletteFamily: 	'7179A3',
				keyvisualId: 	'7078',
				keyvisualName: 	'kv_7078.jpg',
				fontsetId: 		'16390',
				graphicsetId: 	'12122',
				contentColor: 	'FFFFFF',
				contentBGColor: '7179A3',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20111109-110623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20100428-204759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20101011-125436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20111109-113211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11101',
internalId:  '',
customField: '20111109-112416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20111027-095423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20080212-160411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20100428-210838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15722',
internalId:  '',
customField: '20100428-210914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '778',
internalId:  '',
customField: '20100513-210510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15743',
internalId:  '',
customField: '20080212-163618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15785',
internalId:  '',
customField: '20100428-211153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15806',
internalId:  '',
customField: '20100428-211243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15827',
internalId:  '',
customField: '20091028-112137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35997',
internalId:  '',
customField: '20111109-112319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36006',
internalId:  '',
customField: '20111109-112319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35979',
internalId:  '',
customField: '20111109-112319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35988',
internalId:  '',
customField: '20111109-112319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '904',
internalId:  '',
customField: '20080220-154721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25101',
internalId:  '',
customField: '20100428-212237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15869',
internalId:  '',
customField: '20111109-110045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15890',
internalId:  '',
customField: '20100513-210917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16401',
internalId:  '',
customField: '20100513-211038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10822',
internalId:  '',
customField: '20100428-212515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20111027-094721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '925',
internalId:  '',
customField: '20111027-094430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33895',
internalId:  '',
customField: '20100513-210621'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN2GLS';
var companyName   = 'Professional+Rehabilitation+Consultants';
var htmlTitle	  = 'Professional+Rehabilitation+Consultants';
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();
};

