/* [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','4201',jdecode('PSI+Home'),jdecode(''), jdecode('%2F4201.html'), 'true',[],'',''],
	['PAGE','4378',jdecode('Log+In+To+PSI'),jdecode(''), jdecode('%2F4378.html'), 'true',[],'',''],
	['PAGE','5801',jdecode('PSI+Services'),jdecode(''), jdecode('%2F5801.html'), 'true',[],'',''],
	['PAGE','4294',jdecode('PSI+News'),jdecode(''), jdecode('%2F4294.html'), 'true',[],'',''],
	['PAGE','4273',jdecode('PSI+Health+Risk+Testing'),jdecode(''), jdecode('%2F4273.html'), 'true',[],'',''],
	['PAGE','10001',jdecode('PSI+Drug+Testing'),jdecode(''), jdecode('%2F10001.html'), 'true',[],'',''],
	['PAGE','4252',jdecode('About+PSI'),jdecode(''), jdecode('%2F4252.html'), 'true',[],'',''],
	['PAGE','4336',jdecode('Benefits+of+PSI'),jdecode(''), jdecode('%2F4336.html'), 'true',[],'',''],
	['PAGE','4357',jdecode('Phlebotomist+page'),jdecode(''), jdecode('%2F4357.html'), 'true',[],'',''],
	['PAGE','16701',jdecode('Phlebotomy+Registry'),jdecode(''), jdecode('%2F16701.html'), 'true',[],'',''],
	['PAGE','18301',jdecode('Secure+Access'),jdecode(''), jdecode('%2F18301.html'), 'false',[],'',''],
	['PAGE','4399',jdecode('Contact+US'),jdecode(''), jdecode('%2F4399.html'), 'true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Easylife';
theSitetree.paletteFamily='AD1D1D';
theSitetree.keyvisualId='5814';
theSitetree.keyvisualName='kv_5814.jpg';
theSitetree.fontsetId='11095';
theSitetree.graphicsetId='11868';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hostway_generic',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Easylife',
				paletteFamily: 	'AD1D1D',
				keyvisualId: 	'5814',
				keyvisualName: 	'kv_5814.jpg',
				fontsetId: 		'11095',
				graphicsetId: 	'11868',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4201',
internalId:  '',
customField: '20111017-170332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4252',
internalId:  '',
customField: '20111018-103632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4294',
internalId:  '',
customField: '20100429-175156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4357',
internalId:  '',
customField: '20100429-192009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4378',
internalId:  '',
customField: '20111017-183321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4399',
internalId:  '',
customField: '20111017-163754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4273',
internalId:  '',
customField: '20100429-181036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20111018-104237'
};
webappMappings['7008']=webappMappings['7008-9921']={
webappId:    '7008',
documentId:  '16701',
internalId:  '9921',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4336',
internalId:  '',
customField: '20100429-191636'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20100429-184645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16701',
internalId:  '',
customField: '20111018-103756'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '4201',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US::;language:en;country:US;'
};
webappMappings['7050']=webappMappings['7050-2620']={
webappId:    '7050',
documentId:  '18301',
internalId:  '2620',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20101027-015939'
};
webappMappings['1501']=webappMappings['1501-9033922']={
webappId:    '1501',
documentId:  '4201',
internalId:  '9033922',
customField: '1501'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INZ8Q2';
var companyName   = 'Phlebotomy+Services+International+Inc.';
var htmlTitle	  = 'Phlebotomy+Services+International+Inc.';
var metaKeywords  = 'Phlebotomy+Services+International++Phlebotomist+Drug+Free+Work+Place+Policies+DOT+Non+DOT+Drug+Free+Work+Place+Policies+Home+healthcare%2C+Blood+Draw+technology++Early+Detection+%26+Diagnosis.+chronically+ill+patients+Clinical+Study+Collections++Doctor+Office+Draws+DOT+and+Non+DOT+Drug+Testing+Collections++On-Site+Phlebotomy+++Specimen+Logistics++Molecular+Diagnostic+Collections+++Health+Risk+Assessment+Programs+++Mobile+Specimen+Collections++Chronic+disease+treatment+%26+management+++Worker+Education+Random+Urine+Drug+Testing.+++Blood+Pressure+Check+Signet+Diagnostic++Worker+Education.++Random+Urine+Drug+Testing.+++Medical+Labs++Allergy+Research+++American+++Bio-Tech++Bio%2FChem+Research++XMRV+-+Xenotropic+murine+leukemia+virus-related+virus+-+Chronic+fatigue+syndrome+-+CFS+-+Prostate+cancer+-+Gamma-retrovirus+-+Pseudoallergy+-+Nonallergic+rhinopathy+%0D%0A%0D%0A';
var metaContents  = '+Your+24+hour+specimen+collection+service.';
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();
};

