/* [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','2201',jdecode('Home'),jdecode(''),'/2201.html','true',[],''],
	['PAGE','36301',jdecode('Our+Services'),jdecode(''),'/36301.html','true',[],''],
	['PAGE','2222',jdecode('Register+for+Work'),jdecode(''),'/2222.html','true',[],''],
	['PAGE','2294',jdecode('Time+Sheet'),jdecode(''),'/2294.html','true',[],''],
	['PAGE','39722',jdecode('Contact+Us'),jdecode(''),'/39722.html','true',[],'']];
var siteelementCount=5;
theSitetree.topTemplateName='Global';
theSitetree.paletteFamily='333399';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='85';
theSitetree.graphicsetId='105';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Global',
				paletteFamily: 	'333399',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'85',
				graphicsetId: 	'105',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'242E8A',
				b_color: 		'FF9900',
				c_color: 		'000000',
				d_color: 		'EAEAEA',
				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:  '2294',
internalId:  '',
customField: '20090811-084902'
};
webappMappings['7008']=webappMappings['7008-16121']={
webappId:    '7008',
documentId:  '2294',
internalId:  '16121',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2222',
internalId:  '',
customField: '20090811-085122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2201',
internalId:  '',
customField: '20091209-140338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36301',
internalId:  '',
customField: '20090811-085150'
};
webappMappings['7008']=webappMappings['7008-16126']={
webappId:    '7008',
documentId:  '2222',
internalId:  '16126',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-18159178']={
webappId:    '1501',
documentId:  '2201',
internalId:  '18159178',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39722',
internalId:  '',
customField: '20091023-163308'
};
webappMappings['7008']=webappMappings['7008-19602']={
webappId:    '7008',
documentId:  '39722',
internalId:  '19602',
customField: 'language:en;country:US;'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN37LG';
var companyName   = 'Staffing+America+with+Pride%21';
var htmlTitle	  = 'Veteran+Temps';
var metaKeywords  = 'Veteran+Temps%2C+Veterantemps%2C+VeteranTemps%2C+Veteran+Jobs%2C+temporary+employment+agency%2C+service%2C++manufacturing+jobs%2C+industrial+jobs%2C++factory+jobs%2C+medical+jobs%2C+healthcare+jobs%2C+professions%2C+security+clearance%2C+cleared%2C+staffing+agency%2C+staffing+services%2C+staffing+service%2C+Executive+recruiting%2C+pennsylvania+jobs%2C+altoona%2C+PA.+State+college%2C+PA+Johnstown%2C+PA.+Centre+county%2C+Blair+County+PA+jobs%2C+Cambria+County+PA+jobs%2C+Union+County+PA+jobs%2C+Clinton+County+PA+jobs%2C+Clearfield+County+PA+jobs%2C+Mifflin+County+PA+jobs%2C+Huntingdon+County+PA+jobs%2C+Allegheny+County%2C+PA+jobs%2C+Westmoreland+County%2C+PA+jobs.+++defense+contractor+job+technology+computer+programmer+systems+security+machinist%2C+welding%2C+clerical%2C+nursing%2C+maintenance+jobs%2C+us+military%2C+veteran+employment%2C+service%2C+college+degree%2C+officer%2C++personell%2C+recruiting+temp-hire%2C+contract+employment%2C+contract+recruiting%2C+contingency+contract%2C+software+developer%2C+contract+developer%2C+JD+Edwards%2C+Java%2C+Defense+industry%2C+defense+contractor%2C+somerset+county%2C+PA%2C+Harrisburg%2C+PA.++employment+';
var metaContents  = 'Veteran+Temps+is+a+veteran+owned+staffing+agency+located+in+Altoona%2C+PA.++We+service+industry+and+businesses+in+over+a+dozen+Pennsylvania+counties+spanning+from+the+Harrisburg+to+the+Pittsburgh%2C+PA+region.++We+strive+to+match+experienced%2C+well-trained+veterans+with+regional+employers+and+business+opportunities.++Veteran+Temps+matches+veteran+workers+with+employers+from+all+industries+who+will+benefit+from+specialized+training+and+other+benefits+realized+by+hiring+a+veteran.++Non-Military+and+disabled+applicants+are+strongly+encouraged+to+apply%21++';
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();
};

