/* [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','32',jdecode('Who+is+PDM%3F'),jdecode(''),'/32.html','true',[],'',''],
	['PAGE','1081',jdecode('Performance+Checklist'),jdecode(''),'/1081.html','true',[],'',''],
	['PAGE','53',jdecode('Performance+Services'),jdecode(''),'/53.html','true',[],'',''],
	['PAGE','52501',jdecode('Chiro+Claim+Collections'),jdecode(''),'/52501/index.html','true',[ 
		['PAGE','57801',jdecode('Endorsement'),jdecode(''),'/52501/57801.html','true',[],'','']
	],'',''],
	['PAGE','5209',jdecode('Your+Data+is+Secure%21'),jdecode(''),'/5209/index.html','true',[ 
		['PAGE','49401',jdecode('HIPPA+Compliance'),jdecode(''),'/5209/49401.html','true',[],'','']
	],'',''],
	['PAGE','4654',jdecode('How+We+Manage+your+Data'),jdecode(''),'/4654.html','true',[],'',''],
	['PAGE','62',jdecode('Our+Management+Expertise'),jdecode(''),'/62.html','true',[],'',''],
	['PAGE','29118',jdecode('Successful+Projects'),jdecode(''),'/29118.html','true',[],'',''],
	['PAGE','71',jdecode('Contact+Us'),jdecode(''),'/71.html','true',[],'','']];
var siteelementCount=11;
theSitetree.topTemplateName='Angkor';
theSitetree.paletteFamily='879ED6';
theSitetree.keyvisualId='6864';
theSitetree.keyvisualName='kv_6864.jpg';
theSitetree.fontsetId='11211';
theSitetree.graphicsetId='12030';
theSitetree.contentColor='354B86';
theSitetree.contentBGColor='94AAE1';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Angkor',
				paletteFamily: 	'879ED6',
				keyvisualId: 	'6864',
				keyvisualName: 	'kv_6864.jpg',
				fontsetId: 		'11211',
				graphicsetId: 	'12030',
				contentColor: 	'354B86',
				contentBGColor: '94AAE1',
				a_color: 		'94AAE1',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1081',
internalId:  '',
customField: '20090126-165340'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC24G']={
webappId:    '5003',
documentId:  '32',
internalId:  'tid:1;pid:WSCSYSSSSLYTC24G',
customField: 'en:US::;language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20090129-120821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62',
internalId:  '',
customField: '20091209-130216'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '32',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53',
internalId:  '',
customField: '20090126-170518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57801',
internalId:  '',
customField: '20090303-193723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52501',
internalId:  '',
customField: '20091209-124733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5209',
internalId:  '',
customField: '20070411-165414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4654',
internalId:  '',
customField: '20060829-181228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29118',
internalId:  '',
customField: '20090129-085748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71',
internalId:  '',
customField: '20100204-094624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49401',
internalId:  '',
customField: '20090129-122800'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3NK5';
var companyName   = 'Performance+Data+Management+LLC';
var htmlTitle	  = 'Performance+Data+Management';
var metaKeywords  = 'accounting%2C+affordable%2C+analyses%2C+analysis%2C+custom+reports%2C+analytical+reports%2C+contreras%2C+data%2C+data+analysis+and+presentation%2C+data+management%2C+database%2C+chiropractors%2C+Eclipse%2C+practice+management+software%2C+chiropractic+billing+collection%2C+collection%2C+doug+contreras%2C+douglas+h.+contreras%2C+efficiency%2C+equipment%2C+goals%2C+inventory%2C+maintenance%2C+manage%2C+management%2C+operation%2C+pdm%2C+performance%2C+performance+data%2C+performance+data+management%2C+performance+management%2C+presentation%2C+pricing%2C+Increase+your+Productivity%2C+Reduce+your+Labor%2C+Cut+your+Inventory%2C+Improve+your+Quality%2C+Oversee+your+Projects%2C+Control+your+Maintenance%2C+Set-up++Manage+your+Procedures%2C+Prioritize+your+Actions%2C+Locate+places+where+to+best+to+Invest+your+Capital%2C+production%2C+productivity%2C+project%2C+quality%2C+report%2C+spreadsheet%2C+standards%2C+http%3A%2F%2Fwww.linkedin.com%2Fin%2Fdougcontreras%2C+LinkedIn+Doug+Contreras%2C+LinkedIn%2C+MIND+YOUR+OWN+BUSINESS%21%2C+consulting%2C+small+business%2C+off-site+data+management%2C+maintenance%2C+production%2C+Permanent+Label+Corp.%2C+Laminall+Inc.%2C+Contract+Filling+Inc.%2C';
var metaContents  = 'Performance+Data+Management+LLC+collects%2C+stores+and+provides+analytical+reports+on+key+operational+information+in+exclusive+and+secure+databases+custom+built+for+each+client.';
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();
};
