/* [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','5101',jdecode('Home'),jdecode(''),'/5101.html','true',[],''],
	['PAGE','5215',jdecode('Cheating+Spouse'),jdecode(''),'/5215.html','true',[],''],
	['PAGE','244612',jdecode('Process+Servers'),jdecode(''),'/244612.html','true',[],''],
	['PAGE','5173',jdecode('Employee+Investigations'),jdecode(''),'/5173.html','true',[],''],
	['PAGE','200422',jdecode('Workman%26%23x27%3Bs+Compensation'),jdecode(''),'/200422.html','true',[],''],
	['PAGE','5152',jdecode('Child+Custody'),jdecode(''),'/5152.html','true',[],''],
	['PAGE','5236',jdecode('Stalking'),jdecode(''),'/5236.html','true',[],''],
	['PAGE','5194',jdecode('Background+Checks'),jdecode(''),'/5194.html','true',[],''],
	['PAGE','200212',jdecode('People+Locates'),jdecode(''),'/200212.html','true',[],''],
	['PAGE','200233',jdecode('Criminal+Records'),jdecode(''),'/200233.html','true',[],''],
	['PAGE','200254',jdecode('Property+Records'),jdecode(''),'/200254.html','true',[],''],
	['PAGE','200275',jdecode('Court+Records'),jdecode(''),'/200275.html','true',[],''],
	['PAGE','200296',jdecode('Number+Trace'),jdecode(''),'/200296.html','true',[],''],
	['PAGE','200317',jdecode('Work+History'),jdecode(''),'/200317.html','true',[],''],
	['PAGE','200338',jdecode('Marriage+Records'),jdecode(''),'/200338.html','true',[],''],
	['PAGE','200359',jdecode('Email+Trace'),jdecode(''),'/200359.html','true',[],''],
	['PAGE','200380',jdecode('Tag+Lookup'),jdecode(''),'/200380.html','true',[],''],
	['PAGE','130212',jdecode('About+Us'),jdecode(''),'/130212.html','true',[],''],
	['PAGE','100812',jdecode('Links'),jdecode(''),'/100812.html','true',[],''],
	['PAGE','200401',jdecode('Signs+of+Cheating'),jdecode(''),'/200401.html','true',[],''],
	['PAGE','207412',jdecode('Cheating+Spouse+Profile'),jdecode(''),'/207412.html','false',[],'']];
var siteelementCount=21;
theSitetree.topTemplateName='Rectangle';
theSitetree.paletteFamily='FFFFFF';
theSitetree.keyvisualId='2506';
theSitetree.keyvisualName='business.jpg';
theSitetree.fontsetId='451';
theSitetree.graphicsetId='506';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Rectangle',
				paletteFamily: 	'FFFFFF',
				keyvisualId: 	'2506',
				keyvisualName: 	'business.jpg',
				fontsetId: 		'451',
				graphicsetId: 	'506',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20100104-002931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5152',
internalId:  '',
customField: '20100103-224630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5173',
internalId:  '',
customField: '20100103-224317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5194',
internalId:  '',
customField: '20100103-224826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5215',
internalId:  '',
customField: '20100104-003702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5236',
internalId:  '',
customField: '20100103-224736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '200401',
internalId:  '',
customField: '20100103-224426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130212',
internalId:  '',
customField: '20100103-225951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100812',
internalId:  '',
customField: '20081219-002232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '200422',
internalId:  '',
customField: '20100103-224540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '200212',
internalId:  '',
customField: '20100103-225037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '200233',
internalId:  '',
customField: '20100103-225146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '200254',
internalId:  '',
customField: '20100103-225320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '200275',
internalId:  '',
customField: '20100103-225411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '200296',
internalId:  '',
customField: '20100103-225522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '200359',
internalId:  '',
customField: '20100103-225803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '200380',
internalId:  '',
customField: '20100103-225848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '200317',
internalId:  '',
customField: '20100103-225614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '200338',
internalId:  '',
customField: '20100103-225712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '207412',
internalId:  '',
customField: '20091224-172746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '244612',
internalId:  '',
customField: '20100103-230614'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN2OBK';
var companyName   = 'Complete+Detective+Company';
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();
};
