/* [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','401',jdecode('Welcome'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','452',jdecode('About+us'),jdecode(''), jdecode('%2F452%2Findex.html'), 'true',[ 
		['PAGE','473',jdecode('The+team'),jdecode(''), jdecode('%2F452%2F473.html'), 'true',[],'','']
	],'',''],
	['PAGE','494',jdecode('Classes+Offered'),jdecode(''), jdecode('%2F494%2Findex.html'), 'true',[ 
		['PAGE','536',jdecode('Availability'),jdecode(''), jdecode('%2F494%2F536.html'), 'true',[],'',''],
		['PAGE','515',jdecode('Enrollment'),jdecode(''), jdecode('%2F494%2F515.html'), 'true',[],'',''],
		['PAGE','557',jdecode('Training'),jdecode(''), jdecode('%2F494%2F557.html'), 'true',[],'','']
	],'',''],
	['PAGE','578',jdecode('Class+Schedules+'),jdecode(''), jdecode('%2F578.html'), 'true',[],'',''],
	['PAGE','599',jdecode('Job+Search++'),jdecode(''), jdecode('%2F599.html'), 'true',[],'',''],
	['PAGE','80423',jdecode('Helpful+Hints'),jdecode(''), jdecode('%2F80423.html'), 'true',[],'',''],
	['PAGE','620',jdecode('Contact'),jdecode(''), jdecode('%2F620%2Findex.html'), 'true',[ 
		['PAGE','641',jdecode('Adresses'),jdecode(''), jdecode('%2F620%2F641.html'), 'true',[],'',''],
		['PAGE','662',jdecode('How+To+Find+Us'),jdecode(''), jdecode('%2F620%2F662.html'), 'true',[],'','']
	],'',''],
	['PAGE','82923',jdecode('Health+Wise'),jdecode(''), jdecode('%2F82923.html'), 'true',[],'',''],
	['PAGE','683',jdecode('Payment'),jdecode(''), jdecode('%2F683.html'), 'true',[],'',''],
	['PAGE','28712',jdecode('Privacy+'),jdecode(''), jdecode('%2F28712.html'), 'true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Toronto';
theSitetree.paletteFamily='3358C6';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16881';
theSitetree.graphicsetId='12318';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3358C6';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Toronto',
				paletteFamily: 	'3358C6',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16881',
				graphicsetId: 	'12318',
				contentColor: 	'FFFFFF',
				contentBGColor: '3358C6',
				a_color: 		'3358C6',
				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:  '82923',
internalId:  '',
customField: '20120105-040633'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80423',
internalId:  '',
customField: '20120107-205930'
};
webappMappings['7008']=webappMappings['7008-1125']={
webappId:    '7008',
documentId:  '578',
internalId:  '1125',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20120107-212143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20120105-040025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20110527-150622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28712',
internalId:  '',
customField: '20120105-041644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20111009-122518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20111008-184447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20120105-033610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20120105-033959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20110131-090142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20120105-034311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20120125-034315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '641',
internalId:  '',
customField: '20110527-150725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20100525-075652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '683',
internalId:  '',
customField: '20120107-214256'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INF80J';
var companyName   = '+JMS+Asbestos+Training+Center+%26+Environmental+Service+';
var htmlTitle	  = 'JMS+Asbestos+Training+Center+%26+Environmental+Services';
var metaKeywords  = 'Training%2C+Health+and+Safety%2C+Remediation%2C+Environmental%2C+Abatement%2C+Demolition%2C+Construction%2C+Contractors%2C+Consultants%2C+Continuing+Education%2C+Trade+Schools+';
var metaContents  = 'JMS+Asbestos+Training+Center+%26+Environmental+Services++++++%0A2868+East+Grand+Boulevard+Detroit%2C+MI+48202+++++%0A%28313%29+870-9079++++++%0AJMSasbestostrainingcenter.com%0AAccredited+Training%2C+Contracting%2C+Consulting++';
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();
};

