/* [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','5227',jdecode('Home'),jdecode(''),'/5227/index.html','true',[ 
		['PAGE','9801',jdecode('Nail+Program'),jdecode(''),'/5227/9801.html','true',[],''],
		['PAGE','50101',jdecode('Contact+Us'),jdecode(''),'/5227/50101.html','true',[],''],
		['PAGE','11201',jdecode('Testimonials'),jdecode(''),'/5227/11201.html','true',[],''],
		['PAGE','10001',jdecode('Beauty+Services'),jdecode(''),'/5227/10001.html','true',[],''],
		['PAGE','23001',jdecode('Director%26%23x27%3Bs+Desk'),jdecode(''),'/5227/23001.html','true',[],''],
		['PAGE','44901',jdecode('Special+Offers'),jdecode(''),'/5227/44901.html','true',[],''],
		['PAGE','9301',jdecode('About+Us'),jdecode(''),'/5227/9301.html','true',[],''],
		['PAGE','10501',jdecode('Directions'),jdecode(''),'/5227/10501.html','true',[],''],
		['PAGE','10101',jdecode('Resources'),jdecode(''),'/5227/10101.html','true',[],'']
	],''],
	['PAGE','12501',jdecode('Photo+Gallery'),jdecode(''),'/12501/index.html','true',[ 
		['PAGE','24322',jdecode('Manicure'),jdecode(''),'/12501/24322.html','true',[],''],
		['PAGE','24343',jdecode('Pedicure'),jdecode(''),'/12501/24343.html','true',[],''],
		['PAGE','51901',jdecode('Reception+Area'),jdecode(''),'/12501/51901.html','true',[],''],
		['PAGE','51101',jdecode('Clinical+Room'),jdecode(''),'/12501/51101.html','true',[],''],
		['PAGE','51122',jdecode('Lecture+Room'),jdecode(''),'/12501/51122.html','true',[],''],
		['PAGE','35701',jdecode('Computer+Testing+Area'),jdecode(''),'/12501/35701.html','true',[],''],
		['PAGE','51143',jdecode('Lounge+Room'),jdecode(''),'/12501/51143.html','true',[],''],
		['PAGE','51164',jdecode('Restrooms'),jdecode(''),'/12501/51164.html','true',[],'']
	],''],
	['PAGE','11901',jdecode('P%C3%A1gina+Principal'),jdecode(''),'/11901/index.html','true',[ 
		['PAGE','11943',jdecode('Programa+de+Estudios'),jdecode(''),'/11901/11943.html','true',[],''],
		['PAGE','50201',jdecode('Contactenos'),jdecode(''),'/11901/50201.html','true',[],''],
		['PAGE','12048',jdecode('Testimonios'),jdecode(''),'/11901/12048.html','true',[],''],
		['PAGE','11964',jdecode('Servicios+de+Belleza'),jdecode(''),'/11901/11964.html','true',[],''],
		['PAGE','23022',jdecode('Escritorio+de+la+Directora'),jdecode(''),'/11901/23022.html','true',[],''],
		['PAGE','44922',jdecode('Ofertas+Especiales'),jdecode(''),'/11901/44922.html','true',[],''],
		['PAGE','11922',jdecode('Quienes+Somos'),jdecode(''),'/11901/11922.html','true',[],''],
		['PAGE','12006',jdecode('Direcciones'),jdecode(''),'/11901/12006.html','true',[],''],
		['PAGE','11985',jdecode('Recursos'),jdecode(''),'/11901/11985.html','true',[],'']
	],'']];
var siteelementCount=29;
theSitetree.topTemplateName='Gaudy';
theSitetree.paletteFamily='5C5D96';
theSitetree.keyvisualId='5969';
theSitetree.keyvisualName='kv_5969.jpg';
theSitetree.fontsetId='11113';
theSitetree.graphicsetId='11905';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='6E8BCE';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Gaudy',
				paletteFamily: 	'5C5D96',
				keyvisualId: 	'5969',
				keyvisualName: 	'kv_5969.jpg',
				fontsetId: 		'11113',
				graphicsetId: 	'11905',
				contentColor: 	'FFFFFF',
				contentBGColor: '6E8BCE',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5227',
internalId:  '',
customField: '20080801-141222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9301',
internalId:  '',
customField: '20080406-171958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9801',
internalId:  '',
customField: '20080407-181332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20080412-112235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10101',
internalId:  '',
customField: '20080412-120158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20080406-172204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20080801-122250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12048',
internalId:  '',
customField: '20080801-121932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11901',
internalId:  '',
customField: '20080801-132240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11922',
internalId:  '',
customField: '20080406-172719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11943',
internalId:  '',
customField: '20080407-181437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11964',
internalId:  '',
customField: '20080412-111907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11985',
internalId:  '',
customField: '20080412-120139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12006',
internalId:  '',
customField: '20080412-131258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50101',
internalId:  '',
customField: '20091109-074323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12501',
internalId:  '',
customField: '20080406-201523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23001',
internalId:  '',
customField: '20080801-180812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23022',
internalId:  '',
customField: '20080801-181203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51901',
internalId:  '',
customField: '20080801-172854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24322',
internalId:  '',
customField: '20080407-175406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24343',
internalId:  '',
customField: '20080407-193314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35701',
internalId:  '',
customField: '20080801-221702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44901',
internalId:  '',
customField: '20090720-083306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44922',
internalId:  '',
customField: '20090720-083418'
};
webappMappings['7008']=webappMappings['7008-22927']={
webappId:    '7008',
documentId:  '50201',
internalId:  '22927',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-22926']={
webappId:    '7008',
documentId:  '50101',
internalId:  '22926',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50201',
internalId:  '',
customField: '20091109-074427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51101',
internalId:  '',
customField: '20080801-171821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51122',
internalId:  '',
customField: '20080801-171646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51143',
internalId:  '',
customField: '20080801-173650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51164',
internalId:  '',
customField: '20080801-175457'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2DAW';
var companyName   = 'Mafy%27s+Nails+Academy';
var htmlTitle	  = 'Nail+Technology+Training+at+Mafys+Nails+Academy';
var metaKeywords  = '';
var metaContents  = '';
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();
};
