/* [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','1801',jdecode('Home'),jdecode(''), jdecode('%2F1801.html'), 'true',[],'',''],
	['PAGE','11129',jdecode('Courses%3A+Prices%2CDates'),jdecode(''), jdecode('%2F11129%2Findex.html'), 'true',[ 
		['PAGE','28548',jdecode('Course+Prices'),jdecode(''), jdecode('%2F11129%2F28548.html'), 'true',[],'',''],
		['PAGE','28569',jdecode('Course+Lengths'),jdecode(''), jdecode('%2F11129%2F28569.html'), 'true',[],'',''],
		['PAGE','1915',jdecode('Course+Dates'),jdecode(''), jdecode('%2F11129%2F1915.html'), 'true',[],'','']
	],'',''],
	['PAGE','2020',jdecode('Before+Class+Preparation'),jdecode(''), jdecode('%2F2020%2Findex.html'), 'true',[ 
		['PAGE','23048',jdecode('OFF+SITE+CPR+Simulator'),jdecode(''), jdecode('%2F2020%2F23048.html'), 'true',[],'',''],
		['PAGE','2041',jdecode('First+Aid'),jdecode(''), jdecode('%2F2020%2F2041.html'), 'true',[],'','']
	],'',''],
	['PAGE','2062',jdecode('AHA+ACLS+Information'),jdecode(''), jdecode('%2F2062.html'), 'true',[],'',''],
	['PAGE','5915',jdecode('Where+to+find+us'),jdecode(''), jdecode('%2F5915%2Findex.html'), 'true',[ 
		['PAGE','29448',jdecode('Satellite+View'),jdecode(''), jdecode('%2F5915%2F29448.html'), 'true',[],'','']
	],'',''],
	['PAGE','29348',jdecode('Professional+Lounge'),jdecode(''), jdecode('%2F29348%2Findex.html'), 'true',[ 
		['PAGE','8950',jdecode('Bulletin+board'),jdecode(''), jdecode('%2F29348%2F8950.html'), 'true',[],'',''],
		['PAGE','9629',jdecode('What+do+you+think+of+this%3F'),jdecode(''), jdecode('%2F29348%2F9629.html'), 'true',[],'','']
	],'',''],
	['PAGE','29369',jdecode('Rick%26%23x27%3Bs+other+interests'),jdecode(''), jdecode('%2F29369%2Findex.html'), 'true',[ 
		['PAGE','1999',jdecode('Kung+Fu'),jdecode(''), jdecode('%2F29369%2F1999.html'), 'true',[],'',''],
		['PAGE','20246',jdecode('My+E-Book+Collections'),jdecode(''), jdecode('%2F29369%2F20246.html'), 'true',[],'','']
	],'',''],
	['PAGE','29748',jdecode('Our+Curves+Gym'),jdecode(''), jdecode('%2F29748%2Findex.html'), 'true',[ 
		['PAGE','30048',jdecode('Delta+Curves'),jdecode(''), jdecode('%2F29748%2F30048.html'), 'true',[],'','']
	],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Layers';
theSitetree.paletteFamily='82B3CD';
theSitetree.keyvisualId='608';
theSitetree.keyvisualName='artzttasche.jpg';
theSitetree.fontsetId='130';
theSitetree.graphicsetId='148';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E6EAEF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Layers',
				paletteFamily: 	'82B3CD',
				keyvisualId: 	'608',
				keyvisualName: 	'artzttasche.jpg',
				fontsetId: 		'130',
				graphicsetId: 	'148',
				contentColor: 	'000000',
				contentBGColor: 'E6EAEF',
				a_color: 		'006699',
				b_color: 		'CCCCCC',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20120114-054354'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2020',
internalId:  '',
customField: '20110825-164730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2041',
internalId:  '',
customField: '20091217-202236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2062',
internalId:  '',
customField: '20100717-102603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1999',
internalId:  '',
customField: '20100210-152052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1915',
internalId:  '',
customField: '20110818-101252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20246',
internalId:  '',
customField: '20100423-224855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11129',
internalId:  '',
customField: '20110630-145007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23048',
internalId:  '',
customField: '20100424-073816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29348',
internalId:  '',
customField: '20100711-165716'
};
webappMappings['1003']=webappMappings['1003-avfl30inpp20126b9c2d197']={
webappId:    '1003',
documentId:  '20246',
internalId:  'avfl30inpp20126b9c2d197',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5915',
internalId:  '',
customField: '20120114-060909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8950',
internalId:  '',
customField: '20091217-203915'
};
webappMappings['1003']=webappMappings['1003-avfl30inpp2012439e2cd70']={
webappId:    '1003',
documentId:  '9629',
internalId:  'avfl30inpp2012439e2cd70',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9629',
internalId:  '',
customField: '20091217-194741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28548',
internalId:  '',
customField: '20101209-154020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28569',
internalId:  '',
customField: '20100717-100558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29369',
internalId:  '',
customField: '20100717-101627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29448',
internalId:  '',
customField: '20100711-115955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29748',
internalId:  '',
customField: '20120114-055449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30048',
internalId:  '',
customField: '20110125-123222'
};
webappMappings['1501']=webappMappings['1501-15319285']={
webappId:    '1501',
documentId:  '1801',
internalId:  '15319285',
customField: '1501'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INPP20';
var companyName   = 'True+Care+Services%2C+Inc';
var htmlTitle	  = 'True+Care+CPR+First+Aid+ACLS+Lansing+Michigan+Curves';
var metaKeywords  = 'CPR+First+Aid+ACLS+classes+Lansing+Michigan++Curves';
var metaContents  = 'True+Care+Services+providing+CPR%2C+First+Aid+and+ACLS+training+since+1996.';
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();
};

