/* [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','72',jdecode('Home'),jdecode(''),'/72.html','true',[],'',''],
	['PAGE','1244',jdecode('About+us'),jdecode(''),'/1244.html','false',[],'',''],
	['PAGE','1359',jdecode('Pre-Hire'),jdecode(''),'/1359.html','true',[],'',''],
	['PAGE','1368',jdecode('Post-Hire'),jdecode(''),'/1368.html','true',[],'',''],
	['PAGE','1441',jdecode('Virtual+HR'),jdecode(''),'/1441.html','true',[],'',''],
	['PAGE','1386',jdecode('FREE+DEMO'),jdecode(''),'/1386.html','true',[],'','']];
var siteelementCount=6;
theSitetree.topTemplateName='Analyzer';
theSitetree.paletteFamily='BC2025';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10557';
theSitetree.graphicsetId='10575';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Analyzer',
				paletteFamily: 	'BC2025',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10557',
				graphicsetId: 	'10575',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '72',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72',
internalId:  '',
customField: '20100320-163215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1386',
internalId:  '',
customField: '20100330-150028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1244',
internalId:  '',
customField: '20080401-175907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1359',
internalId:  '',
customField: '20100725-130937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1368',
internalId:  '',
customField: '20100726-175710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1441',
internalId:  '',
customField: '20100311-174058'
};
webappMappings['7008']=webappMappings['7008-8004']={
webappId:    '7008',
documentId:  '72',
internalId:  '8004',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INVWKW';
var companyName   = 'Human+Resource+Development+Technologies+-+';
var htmlTitle	  = 'Pre+Employment+Assessment%2C+Hr+Consulting%2C+Performance+Development+';
var metaKeywords  = 'pre+employment+assessment%2C+pre+employment+testing%2C+pre+employment+assessment+strategies%2C+personality+assessment+inventory%2C+personality+tests+online%2C+true+colors+personality+test%2C+pre+employment+psychological+assessments%2C+it+assessment%2C+authentic+assessment%2C+assessment+methods%2C+psychometrics%2C+performance+development+plan%2C+performance+development+process%2C+comments+on+performance+development+plan%2C+high+performance+development+model%2C+employee+performance+development%2C+performance+development+programs%2C+post+hire+performance+development%2C+management+consulting%2C+business+management%2C++organizational+development%2C+organizational+development+services%2C+seminar%2C+employee+attitude+survey%2C+employee+training+and+development%2C+employee+performance+management%2C+business+coaching+executive+services%2C+coaching+executive+program%2C+sales+negotiation+training%2C+sales+management+training%2C+recruiting%2Crecruitment+agency%2C+human+resources+management%2C+human+resources%2C+consulting+services%2C+training+seminars%2C+employee+surveys%2C+employee+satisfaction+survey%2C+myers+brigg+test%2C+emotional+intelligence%2C+multiple+intelligence+test%2C+intelligence+quotient%2C+online+iq+test%2C+prehire+screening%2C+candidate+screening%2C+preemployment+screening';
var metaContents  = 'HRDT+Is+Specialist+In+Pre+Employment+Assessment%2C+Post+Hire+Performance+Development+Programs%2C+Sales+Business+Development%2C+Leading+Hr+Consulting%2C+Candidate+Testing%2C+Sales+Development+Seminar%2C+Rainmaker%2C+And+More.+Catalog+and+free+demo+available.++';
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();
};
